예제 #1
0
 public PerceptronCloud(double extraFactor = 2.0, PerceptronTrainingMode trainingMode = PerceptronTrainingMode.TRAIN_ALL_DATA, PerceptronClassificationMode classificationMode = PerceptronClassificationMode.NOFLAGS, double cloudSizeStDev = 0, bool normalizePerceptrons = true)
 {
     this.perceptronCountFactor = extraFactor;
     this.trainingMode          = trainingMode;
     this.classificationMode    = classificationMode;
     this.cloudSizeStDev        = cloudSizeStDev;
     this.normalizePerceptrons  = normalizePerceptrons;
 }
예제 #2
0
        public static IEnumerable <Tuple <string, IProbabalisticClassifier> > EnumeratePerceptrons(double oversamplingFactor)
        {
            foreach (PerceptronTrainingMode trainingMode in PerceptronTrainingMode.GetValues(typeof(PerceptronTrainingMode)))
            {
                foreach (PerceptronClassificationMode classificationMode in PerceptronClassificationMode.GetValues(typeof(PerceptronClassificationMode)))
                {
                    foreach (bool normalize in new[] { false })
                    {
//					foreach(bool normalize in new[]{true, false}){
                        foreach (double dist in new[] { 0, 1, 2 })
                        {
                            yield return(new Tuple <string, IProbabalisticClassifier>(
                                             ("Perceptron Cloud: t: " + trainingMode.ToString() + ", c: " + classificationMode.ToString() + ", " + "dist: " + dist + (normalize ? " (normalized out)" : "")).Replace("_", " "),
                                             new PerceptronCloud(oversamplingFactor, trainingMode, classificationMode, dist, normalize)));
                        }
                    }
                }
            }
        }