Skip to content

0.22.4

Compare
Choose a tag to compare
@yoshoku yoshoku released this 22 Feb 23:44
· 224 commits to main since this release
  • Added classifier and regressor classes with voting-based ensemble method that combines estimators using majority voting.
require 'numo/openblas'
require 'parallel'
require 'rumale'

# ... Loading dataset

clf = Rumale::Ensemble::VotingClassifier.new(
  estimators: {
    log: Rumale::LinearModel::LogisticRegression.new(random_seed: 1),
    rnd: Rumale::Ensemble::RandomForestClassifier.new(n_jobs: -1, random_seed: 1),
    ext: Rumale::Ensemble::ExtraTreesClassifier.new(n_jobs: -1, random_seed: 1)
  },
  weights: {
    log: 0.5,
    rnd: 0.3,
    ext: 0.2
  },
  voting: 'soft'
)

clf.fit(x, y)