Exemple #1
0
        /// <summary>
        ///   Gets a value from the array.
        /// </summary>
        ///
        public override object GetValue(object component)
        {
            try
            {
                ConfusionMatrixRowView rowView = component as ConfusionMatrixRowView;
                return(rowView.GetValue(ColumnIndex));
            }
            catch (ArgumentException e)
            {
                Debug.WriteLine(e);
            }
            catch (IndexOutOfRangeException e)
            {
                Debug.WriteLine(e);
            }

            return(null);
        }
Exemple #2
0
        private void init(GeneralConfusionMatrix matrix)
        {
            this.Matrix = matrix;

            int classes = matrix.Classes;

            rows        = new ConfusionMatrixRowView[classes + 1];
            RowNames    = new String[classes + 1];
            ColumnNames = new String[classes + 1];

            for (int i = 0; i < classes; i++)
            {
                rows[i]        = new ConfusionMatrixRowView(this, i);
                RowNames[i]    = "Expected " + i;
                ColumnNames[i] = "Actual " + i;
            }

            rows[classes] = new ConfusionMatrixRowView(this, -1);

            RowNames[classes]    = "Total";
            ColumnNames[classes] = "Total";
        }