public void FeatureSelectionExperiment(ClassificationAlgorithmType algorithmType, string targetTag, FeatureSelectorType featureSelectorType) { var classifierParamses = Enumerable .Range(1, 40) .Where(i => i <= 5 || i % 5 == 0) .Select(i => ClassifierParams .Create(ClassifierType.Simple, algorithmType, targetTag) .SelectFeatures(featureSelectorType, 0, i, 0, 1000)) .ToArray(); EvaluateManyClassifiers(classifierParamses, targetTag, x => string.Format("Selector {0} with selection percent {1}", x.FeatureSelectionParams.Type, x.FeatureSelectionParams.UpperBoundPercent)); }
public ClassifierParams SelectFeatures(FeatureSelectorType featureSelectorType, int lowerBoundPercent, int upperBoundPercent, int minDocCount, int maxDocCount) { FeatureSelectionParams = new FeatureSelectionParams { Type = featureSelectorType, LowerBoundPercent = lowerBoundPercent, UpperBoundPercent = upperBoundPercent, MinDocCount = minDocCount, MaxDocCount = maxDocCount, TargetTag = TargetTag }; return this; }