Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ protected void initEnsemble(Instance instance) {
break;
case StreamingRandomPatchesMB.TRAIN_RANDOM_SUBSPACES:
case StreamingRandomPatchesMB.TRAIN_RANDOM_PATCHES:
if (this.subspaces.isEmpty()) break;
int selectedValue = this.classifierRandom.nextInt(subspaces.size());
ArrayList<Integer> subsetOfFeatures = this.subspaces.get(selectedValue);
subsetOfFeatures.add(instance.classIndex());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import moa.capabilities.Capability;
import moa.capabilities.ImmutableCapabilities;
import moa.classifiers.AbstractClassifierMiniBatch;
import moa.classifiers.Classifier;
import moa.classifiers.MultiClassClassifier;
import moa.core.Example;
Expand Down Expand Up @@ -217,6 +218,9 @@ protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository) {
if (immediateResultStream != null) {
immediateResultStream.close();
}
if (learner instanceof AbstractClassifierMiniBatch) {
((AbstractClassifierMiniBatch) learner).trainingHasEnded();
}
return learningCurve;
}

Expand Down