public void Add(MetricsInput input) { var cluster = input.ClassPrediction; var label = input.ClassLabel; if (_clusterDict.ContainsKey(cluster)) { if (_clusterDict[cluster].ContainsKey(label)) { _clusterDict[cluster][label]++; } else { _clusterDict[cluster].Add(label, 1); } } else { _clusterDict.Add(cluster, new Dictionary <int, int>() { { label, 1 } }); } _count++; }
public void Add(MetricsInput input) { _correctlyClasified += input.ClassPrediction == input.ClassLabel ? 1 : 0; _count++; }
public MetricsGenerator() { _bag = new Dictionary <MetricsType, IMetric>(); _input = new MetricsInput(); }