public void internalValidationCalibration(ILCSMetric selfAcc) { final VotingClassificationStrategy str = rep .new VotingClassificationStrategy( (float) SettingsLoader.getNumericSetting("datasetLabelCardinality", 1)); rep.setClassificationStrategy(str); final InternalValidation ival = new InternalValidation(this, str, selfAcc); ival.calibrate(10); }
public VotingClassificationStrategy proportionalCutCalibration() { final VotingClassificationStrategy str = rep .new VotingClassificationStrategy( (float) SettingsLoader.getNumericSetting("datasetLabelCardinality", 1)); rep.setClassificationStrategy(str); str.proportionalCutCalibration(this.instances, rulePopulation); return str; }
/** * Constructor. * * @throws IOException */ public GMlASLCS2() throws IOException { inputFile = SettingsLoader.getStringSetting("filename", ""); numberOfLabels = (int) SettingsLoader.getNumericSetting("numberOfLabels", 1); iterations = (int) SettingsLoader.getNumericSetting("trainIterations", 1000); populationSize = (int) SettingsLoader.getNumericSetting("populationSize", 1500); final IGeneticAlgorithmStrategy ga = new SteadyStateGeneticAlgorithm( new RouletteWheelSelector(AbstractUpdateStrategy.COMPARISON_MODE_EXPLORATION, true), new SinglePointCrossover(this), CROSSOVER_RATE, new UniformBitMutation(MUTATION_RATE), THETA_GA, this); rep = new GenericMultiLabelRepresentation( inputFile, PRECISION_BITS, numberOfLabels, GenericMultiLabelRepresentation.EXACT_MATCH, LABEL_GENERALIZATION_RATE, ATTRIBUTE_GENERALIZATION_RATE, this); rep.setClassificationStrategy(rep.new BestFitnessClassificationStrategy()); final MlASLCS2UpdateAlgorithm strategy = new MlASLCS2UpdateAlgorithm( ASLCS_N, ASLCS_ACC0, ASLCS_EXPERIENCE_THRESHOLD, ga, numberOfLabels, this); this.setElements(rep, strategy); rulePopulation = new ClassifierSet( new FixedSizeSetWorstFitnessDeletion( this, populationSize, new RouletteWheelSelector(AbstractUpdateStrategy.COMPARISON_MODE_DELETION, true))); }
public void useBestClassificationMode() { rep.setClassificationStrategy(rep.new BestFitnessClassificationStrategy()); }