Represents a row from a ConfusionMatrixView.
Inheritance: ICustomTypeDescriptor
        /// <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);
        }
Exemplo n.º 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";
        }
Exemplo n.º 3
0
 /// <summary>
 ///   Multidimensional arrays do not support Array copying.
 /// </summary>
 /// 
 public void CopyTo(ConfusionMatrixRowView[] array, int index)
 {
     rows.CopyTo(array, index);
 }
Exemplo n.º 4
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";
        }