Пример #1
0
            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++;
            }
Пример #2
0
            public void Add(MetricsInput input)
            {
                _correctlyClasified += input.ClassPrediction == input.ClassLabel
                    ? 1
                    : 0;

                _count++;
            }
Пример #3
0
 public MetricsGenerator()
 {
     _bag   = new Dictionary <MetricsType, IMetric>();
     _input = new MetricsInput();
 }