* Key: -randomprojection.numberselected
*
* Default: 1
*
* Constraint: ≥1 *
*/ public static final OptionID NUMBER_SELECTED_ATTRIBUTES_ID = new OptionID("randomprojection.numberselected", "number of selected attributes"); /** * Optional parameter to specify a seed for random projection. If unused, * system time is used as seed. ** Key: {@code -randomprojection.seed} *
*/ public static final OptionID SEED_ID = new OptionID("randomprojection.seed", "Seed for random selection of projection attributes."); /** * Number of attributes to select. */ protected int k = 0; /** * Random generator. */ protected RandomFactory rnd; @Override protected void makeOptions(Parameterization config) { super.makeOptions(config); IntParameter kP = new IntParameter(NUMBER_SELECTED_ATTRIBUTES_ID, 1) // .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if(config.grab(kP)) { k = kP.intValue(); } RandomParameter rndP = new RandomParameter(SEED_ID); if(config.grab(rndP)) { rnd = rndP.getValue(); } } @Override protected NumberVectorRandomFeatureSelectionFilter