Provides an abstraction of the confusion matrix values.
Inheritance: System.ComponentModel.PropertyDescriptor
示例#1
0
        /// <summary>
        ///   Gets the values of the multidimensional array as properties.
        /// </summary>
        ///
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            GeneralConfusionMatrix matrix = Owner.Matrix;
            int classes = matrix.Classes;

            PropertyDescriptor[] columns = new PropertyDescriptor[classes + 1];

            for (int i = 0; i < classes; i++)
            {
                columns[i] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[i], i);
            }
            columns[classes] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[classes], -1);

            return(new PropertyDescriptorCollection(columns));
        }
        /// <summary>
        ///   Gets the values of the multidimensional array as properties.
        /// </summary>
        /// 
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            GeneralConfusionMatrix matrix = Owner.Matrix;
            int classes = matrix.Classes;

            PropertyDescriptor[] columns = new PropertyDescriptor[classes + 1];

            for (int i = 0; i < classes; i++)
                columns[i] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[i], i);
            columns[classes] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[classes], -1);

            return new PropertyDescriptorCollection(columns);
        }