/** * Indicates whether feature selection needs to be performed at all for this experiment. * * @return Wheter feature selection needs to be performed at all for this experiment * @throws Exception */ public static boolean NeedToSelectFeatures() throws Exception { for (AbstractDataProcessor processor : Singletons.ProcessorVault.IndependentVariableDataProcessors) for (FeatureSelectionAlgorithm fsAlgorithm : Singletons.Config.GetFeatureSelectionAlgorithms(processor)) if (FeatureSelectionEvaluator.NeedToSelectFeatures(processor, fsAlgorithm)) return true; return false; }
/** * Indicates how many different combinations of data processor, feature-selection algorithm, and * classification algorithm there are in this experiment. * * @param includeNumFeaturesOptions Whether to count each number of features options as separate * classification algorithm * @return Number of unique combinations * @throws Exception */ private static int GetNumberClassificationCombinations(boolean includeNumFeaturesOptions) throws Exception { int count = 0; for (AbstractDataProcessor processor : Singletons.ProcessorVault.IndependentVariableDataProcessors) for (FeatureSelectionAlgorithm fsAlgorithm : Singletons.Config.GetFeatureSelectionAlgorithms(processor)) for (ClassificationAlgorithm classificationAlgorithm : Singletons.Config.GetMainClassificationAlgorithms()) count += (includeNumFeaturesOptions ? Singletons.Config.GetNumFeaturesOptions(processor, fsAlgorithm).size() : 1); return count; }