public HsvClassifier() { kmeans = new KNearestClassifier(); Dictionary<float[], int> data = new Dictionary<float[], int>(); foreach (KeyValuePair<float[], int> item in GenerateTrainPairs()) { data.Add(item.Key, item.Value); } kmeans.Train(data); }
public BgrClassifier() { kmeans = new KNearestClassifier(); Dictionary<float[], string> data = new Dictionary<float[], string>(); foreach (KeyValuePair<float[], string> item in TrainCsv()) { data.Add(item.Key, item.Value); } kmeans.Train(data); }