use of edu.neu.ccs.pyramid.classification.lkboost.LKBoostOptimizer in project pyramid by cheng-li.
the class SparkCBMOptimizer method updateMultiClassBoost.
private void updateMultiClassBoost() {
int numComponents = cbm.numComponents;
int numIterations = numIterationsMultiClass;
double shrinkage = shrinkageMultiClass;
LKBoost boost = (LKBoost) this.cbm.multiClassClassifier;
RegTreeConfig regTreeConfig = new RegTreeConfig().setMaxNumLeaves(numLeavesMultiClass);
RegTreeFactory regTreeFactory = new RegTreeFactory(regTreeConfig);
regTreeFactory.setLeafOutputCalculator(new LKBOutputCalculator(numComponents));
LKBoostOptimizer optimizer = new LKBoostOptimizer(boost, dataSet, regTreeFactory, gammas);
optimizer.setShrinkage(shrinkage);
optimizer.initialize();
optimizer.iterate(numIterations);
}
use of edu.neu.ccs.pyramid.classification.lkboost.LKBoostOptimizer in project pyramid by cheng-li.
the class CBMNoiseOptimizerFixed method updateBinaryBoosting.
private void updateBinaryBoosting(int componentIndex, int labelIndex) {
int numIterations = numIterationsBinary;
double shrinkage = shrinkageBinary;
LKBoost boost = (LKBoost) this.cbm.binaryClassifiers[componentIndex][labelIndex];
RegTreeConfig regTreeConfig = new RegTreeConfig().setMaxNumLeaves(numLeavesBinary);
RegTreeFactory regTreeFactory = new RegTreeFactory(regTreeConfig);
regTreeFactory.setLeafOutputCalculator(new LKBOutputCalculator(2));
LKBoostOptimizer optimizer = new LKBoostOptimizer(boost, dataSet, regTreeFactory, gammasT[componentIndex], binaryTargetsDistributions[labelIndex]);
optimizer.setShrinkage(shrinkage);
optimizer.initialize();
optimizer.iterate(numIterations);
}
use of edu.neu.ccs.pyramid.classification.lkboost.LKBoostOptimizer in project pyramid by cheng-li.
the class CBMNoiseOptimizerFixed method updateMultiClassBoost.
private void updateMultiClassBoost() {
int numComponents = cbm.numComponents;
int numIterations = numIterationsMultiClass;
double shrinkage = shrinkageMultiClass;
LKBoost boost = (LKBoost) this.cbm.multiClassClassifier;
RegTreeConfig regTreeConfig = new RegTreeConfig().setMaxNumLeaves(numLeavesMultiClass);
RegTreeFactory regTreeFactory = new RegTreeFactory(regTreeConfig);
regTreeFactory.setLeafOutputCalculator(new LKBOutputCalculator(numComponents));
LKBoostOptimizer optimizer = new LKBoostOptimizer(boost, dataSet, regTreeFactory, gammas);
optimizer.setShrinkage(shrinkage);
optimizer.initialize();
optimizer.iterate(numIterations);
}
use of edu.neu.ccs.pyramid.classification.lkboost.LKBoostOptimizer in project pyramid by cheng-li.
the class CBMUtilityOptimizer method updateBinaryBoosting.
private void updateBinaryBoosting(int componentIndex, int labelIndex) {
int numIterations = numIterationsBinary;
double shrinkage = shrinkageBinary;
LKBoost boost = (LKBoost) this.cbm.binaryClassifiers[componentIndex][labelIndex];
RegTreeConfig regTreeConfig = new RegTreeConfig().setMaxNumLeaves(numLeavesBinary);
RegTreeFactory regTreeFactory = new RegTreeFactory(regTreeConfig);
regTreeFactory.setLeafOutputCalculator(new LKBOutputCalculator(2));
LKBoostOptimizer optimizer = new LKBoostOptimizer(boost, dataSet, regTreeFactory, gammasT[componentIndex], binaryTargetsDistributions[labelIndex]);
optimizer.setShrinkage(shrinkage);
optimizer.initialize();
optimizer.iterate(numIterations);
}
use of edu.neu.ccs.pyramid.classification.lkboost.LKBoostOptimizer in project pyramid by cheng-li.
the class CBMUtilityOptimizer method updateMultiClassBoost.
private void updateMultiClassBoost() {
int numComponents = cbm.numComponents;
int numIterations = numIterationsMultiClass;
double shrinkage = shrinkageMultiClass;
LKBoost boost = (LKBoost) this.cbm.multiClassClassifier;
RegTreeConfig regTreeConfig = new RegTreeConfig().setMaxNumLeaves(numLeavesMultiClass);
RegTreeFactory regTreeFactory = new RegTreeFactory(regTreeConfig);
regTreeFactory.setLeafOutputCalculator(new LKBOutputCalculator(numComponents));
LKBoostOptimizer optimizer = new LKBoostOptimizer(boost, dataSet, regTreeFactory, gammas);
optimizer.setShrinkage(shrinkage);
optimizer.initialize();
optimizer.iterate(numIterations);
}
Aggregations