ISmCART.ROCcurve

Syntax

ROCcurve: IROCcurve;

ROCcurve: Prognoz.Platform.Interop.Stat.IROCcurve;

Description

The ROCcurve property returns ROC curve parameters.

Comments

A ROC curve is a graph that enables the user to assess the quality of binary classification. A ROC curve displays relation between the share of objects from the total number of attribute bearers that are correctly identifier as attribute bearers, and the share of objects from the total number of objects that are not attribute bearers and that are by error identifier as attribute bearers on varying of decision rule threshold.

Thus, a ROC curve is calculated if an explanatory series is binary.

A ROC curve is plotted by laying off the obtained sensitivity values along the Y axis, and (1 - specificity) along the X axis.

Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    res, i: Integer;
    CART: SmCART;
    ROCcurve: IROCcurve;
    y: Array[
16Of Integer;
    x1: Array[
16Of Integer;
    x2: Array[
16Of Integer;
    x3dbl: Array[
16Of Double;
    x4cat: Array[
16Of Integer;
    OneMinusSpecificity, Sensitivity: Array 
Of Double;
Begin
    
// Create a method
    CART := New SmCART.Create;
    
// Set initial data
    // Set values corresponding to  age group
    y[0] := 1000; y[1] := 1000; y[2] := 1000; y[3] := 1000;
    y[
4] := 1000; y[5] := 1000; y[6] := 1000; y[7] := 1000;
    y[
8] := 1000; y[9] := 5002; y[10] := 5002; y[11] := 5002;
    y[
12] := 5002; y[13] := 5002; y[14] := 5002; y[15] := 5002;
    
// Set values, corresponding to social status
    x1[0] := 0; x1[1] := 0; x1[2] := 0; x1[3] := 0;
    x1[
4] := 0; x1[5] := 0; x1[6] := 0; x1[7] := 0;
    x1[
8] := 0; x1[9] := 1; x1[10] := 1; x1[11] := 1;
    x1[
12] := 1; x1[13] := 1; x1[14] := 1; x1[15] := 1;
    
// Set values, corresponding to social status
    x2[0] := 10; x2[1] := 10; x2[2] := 10; x2[3] := 10;
    x2[
4] := 10; x2[5] := 20; x2[6] := 20; x2[7] := 20;
    x2[
8] := 20; x2[9] := 10; x2[10] := 10; x2[11] := 20;
    x2[
12] := 20; x2[13] := 20; x2[14] := 20; x2[15] := 20;

    // Set values of explanatory quantitative series
    x3dbl[0] := 1; x3dbl[1] := 2; x3dbl[2] := 3; x3dbl[3] := 5;
    x3dbl[
4] := 4; x3dbl[5] := 6; x3dbl[6] := 7; x3dbl[7] := 8;
    x3dbl[
8] := 9; x3dbl[9] := 9; x3dbl[10] := 10; x3dbl[11] := 10;
    x3dbl[
12] := 11; x3dbl[13] := 12; x3dbl[14] := 13; x3dbl[15] := 14;
    
// Set values of explanatory categorical series
    x4cat[0] := 1; x4cat[1] := 1; x4cat[2] := 1; x4cat[3] := 1;
    x4cat[
4] := 1; x4cat[5] := 1; x4cat[6] := 1; x4cat[7] := 2;
    x4cat[
8] := 2; x4cat[9] := 2; x4cat[10] := 2; x4cat[11] := 2;
    x4cat[
12] := 3; x4cat[13] := 3; x4cat[14] := 3; x4cat[15] := 3;
    
// Determine maximum number of levels in tree
    CART.TreeSizeSpecification.MaximumNumberOfLevels := 3;
    
// Determine minimum number of observations that can be in tree node
    CART.TreeSizeSpecification.MinimumNumberOfCases := 2;
    
// Consider each category as an attribute
    CART.TreeSizeSpecification.ReduceCategories := True;
    
// Set explained series
    CART.Dependent.Value := y;
    
// Set explanatory sequence series
    CART.ExplanatoriesOrdered.Add.Value := x1;
    CART.ExplanatoriesOrdered.  Add.Value := x2;    
    CART.ExplanatoriesContinuous.Add.Value := x3dbl;
    CART.ExplanatoriesCategorical.Add.Value := x4cat;
    
// Execute calculation and display values to the console window
    res := CART.Execute;
    ROCcurve := CART.ROCcurve;
    Debug.WriteLine(CART.Errors);
    
If res <> 0 Then
        Debug.WriteLine(
"Failed");
    
Else
        
If ROCcurve <> Null Then
            Debug.WriteLine(
"ROC curve data:");
            Debug.Indent;
            Debug.WriteLine(
"Specifity:");
            Debug.Indent;
            OneMinusSpecificity := ROCcurve.OneMinusSpecificity;
            
For i := 0 To OneMinusSpecificity.Length - 1 Do
                Debug.WriteLine(OneMinusSpecificity[i]);
            
End For;
            Debug.Unindent;
            Debug.WriteLine(
"Sensitivity:");
            Debug.Indent;
            Sensitivity := ROCcurve.Sensitivity;
            
For i := 0 To Sensitivity.Length - 1 Do
                Debug.WriteLine(Sensitivity[i]);
            
End For;
        End If;
        
// Display classification quality criteria
        Debug.Unindent;
        Debug.Unindent;
        Debug.WriteLine(
" == Qualification criteria of classification == ");
        Debug.WriteLine(
"Overall accuracy: " + CART.RelevanceMeasure.Accuracy.ToString);
        Debug.WriteLine(
"F - estimate: " + CART.RelevanceMeasure.F1.ToString);
        Debug.WriteLine(
"Number of truly positive values: " + CART.RelevanceMeasure.TruePositive.ToString);
        Debug.WriteLine(
"Number of truly negative values: " + CART.RelevanceMeasure.TrueNegative.ToString);
    
End If;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    res, i: integer;
    CART: SmCART;
    ROCcurve: IROCcurve;
    y: Array[
16Of integer;
    x1: Array[
16Of integer;
    x2: Array[
16Of integer;
    x3dbl: Array[
16Of double;
    x4cat: Array[
16Of integer;
    OneMinusSpecificity, Sensitivity: System.Array;
Begin
    
// Create a method
    CART := New SmCART.Create();
    
// Set initial data
    // Set values corresponding to  age group
    y[0] := 1000; y[1] := 1000; y[2] := 1000; y[3] := 1000;
    y[
4] := 1000; y[5] := 1000; y[6] := 1000; y[7] := 1000;
    y[
8] := 1000; y[9] := 5002; y[10] := 5002; y[11] := 5002;
    y[
12] := 5002; y[13] := 5002; y[14] := 5002; y[15] := 5002;
    
// Set values, corresponding to social status
    x1[0] := 0; x1[1] := 0; x1[2] := 0; x1[3] := 0;
    x1[
4] := 0; x1[5] := 0; x1[6] := 0; x1[7] := 0;
    x1[
8] := 0; x1[9] := 1; x1[10] := 1; x1[11] := 1;
    x1[
12] := 1; x1[13] := 1; x1[14] := 1; x1[15] := 1;
    
// Set values, corresponding to social status
    x2[0] := 10; x2[1] := 10; x2[2] := 10; x2[3] := 10;
    x2[
4] := 10; x2[5] := 20; x2[6] := 20; x2[7] := 20;
    x2[
8] := 20; x2[9] := 10; x2[10] := 10; x2[11] := 20;
&nbsp;&nbsp;&nbsp;&nbsp;x2[</font><font color="#008000">12</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">20</font><font color="#000000">;&nbsp;x2[</font><font color="#008000">13</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">20</font><font color="#000000">;&nbsp;x2[</font><font color="#008000">14</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">20</font><font color="#000000">;&nbsp;x2[</font><font color="#008000">15</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">20</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Set&nbsp;values&nbsp;of explanatory&nbsp;quantitative&nbsp;series<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;x3dbl[</font><font color="#008000">0</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">1</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">2</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">3</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">5</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x3dbl[</font><font color="#008000">4</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">4</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">5</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">6</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">6</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">7</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">7</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">8</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x3dbl[</font><font color="#008000">8</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">9</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">9</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">9</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">10</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">10</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">11</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">10</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x3dbl[</font><font color="#008000">12</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">11</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">13</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">12</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">14</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">13</font><font color="#000000">;&nbsp;x3dbl[</font><font color="#008000">15</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">14</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Set&nbsp;values&nbsp;of explanatory&nbsp;categorical&nbsp;series<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;x4cat[</font><font color="#008000">0</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">1</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">2</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">3</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x4cat[</font><font color="#008000">4</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">5</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">6</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">1</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">7</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x4cat[</font><font color="#008000">8</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">9</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">10</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">11</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">2</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;x4cat[</font><font color="#008000">12</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">13</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">14</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;&nbsp;x4cat[</font><font color="#008000">15</font><font color="#000000">]&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Determine&nbsp;maximum&nbsp;number&nbsp;of levels&nbsp;in&nbsp;tree<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;CART.TreeSizeSpecification.MaximumNumberOfLevels&nbsp;:=&nbsp;</font><font color="#008000">3</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Determine&nbsp;minimum&nbsp;number&nbsp;of observations&nbsp;that&nbsp;can be&nbsp;in a&nbsp;tree&nbsp;node<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;CART.TreeSizeSpecification.MinimumNumberOfCases&nbsp;:=&nbsp;<font color="#008000">2</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Consider&nbsp;each&nbsp;category&nbsp;as&nbsp;a separate&nbsp;attribute<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;CART.TreeSizeSpecification.ReduceCategories&nbsp;:=&nbsp;</font><font color="#008080">True</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Set&nbsp;explained&nbsp;series<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;CART.Dependent.Value&nbsp;:=&nbsp;y;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Set&nbsp;explanatory&nbsp;ordinal<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;CART.ExplanatoriesOrdered.Add().Value&nbsp;:=&nbsp;x1;<br/> &nbsp;&nbsp;&nbsp;&nbsp;CART.ExplanatoriesOrdered.Add().Value&nbsp;:=&nbsp;x2;<br/> &nbsp;&nbsp;&nbsp;&nbsp;CART.ExplanatoriesContinuous.Add().Value&nbsp;:=&nbsp;x3dbl;<br/> &nbsp;&nbsp;&nbsp;&nbsp;CART.ExplanatoriesCategorical.Add().Value&nbsp;:=&nbsp;x4cat;<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Calculate&nbsp;and&nbsp;display&nbsp;values&nbsp;to&nbsp;console&nbsp;window<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;res&nbsp;:=&nbsp;CART.Execute();<br/> &nbsp;&nbsp;&nbsp;&nbsp;ROCcurve&nbsp;:=&nbsp;CART.ROCcurve;<br/> &nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(CART.Errors);<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">If</font><font color="#000000">&nbsp;res&nbsp;&lt;&gt;&nbsp;</font><font color="#008000">0</font><font color="#000000">&nbsp;</font><font color="#008080">Then</font><font color="#000000"><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Error&nbsp;occurred&quot;</font><font color="#000000">);<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">Else</font><font color="#000000"><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">If</font><font color="#000000">&nbsp;ROCcurve&nbsp;&lt;&gt;&nbsp;</font><font color="#008080">Null</font><font color="#000000">&nbsp;</font><font color="#008080">Then</font><font color="#000000"><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Data&nbsp;of ROC curve:&quot;</font><font color="#000000">);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Indent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Specificity:&quot;</font><font color="#000000">);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Indent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OneMinusSpecificity&nbsp;:=&nbsp;ROCcurve.OneMinusSpecificity;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">For</font><font color="#000000">&nbsp;i&nbsp;:=&nbsp;</font><font color="#008000">0</font><font color="#000000">&nbsp;</font><font color="#008080">To</font><font color="#000000">&nbsp;OneMinusSpecificity.Length&nbsp;-&nbsp;</font><font color="#008000">1</font><font color="#000000">&nbsp;</font><font color="#008080">Do</font><font color="#000000"><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(OneMinusSpecificity[i]);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">End</font><font color="#000000">&nbsp;</font><font color="#008080">For</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Unindent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Sensitivity:&quot;</font><font color="#000000">);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Indent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sensitivity&nbsp;:=&nbsp;ROCcurve.Sensitivity;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">For</font><font color="#000000">&nbsp;i&nbsp;:=&nbsp;</font><font color="#008000">0</font><font color="#000000">&nbsp;</font><font color="#008080">To</font><font color="#000000">&nbsp;Sensitivity.Length&nbsp;-&nbsp;</font><font color="#008000">1</font><font color="#000000">&nbsp;</font><font color="#008080">Do</font><font color="#000000"><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(Sensitivity[i]);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">End</font><font color="#000000">&nbsp;</font><font color="#008080">For</font><font color="#000000">;<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font><font color="#000000">&nbsp;</font><font color="#008080">If</font><font color="#000000">;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008000">//&nbsp;Display&nbsp;criteria&nbsp;of classification&nbsp;quality<br/> </font><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Unindent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Unindent();<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;&nbsp;==&nbsp;Criteria&nbsp;of classification&nbsp;quality&nbsp;==&nbsp;&quot;</font><font color="#000000">);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Overall&nbsp;accuracy:&nbsp;&quot;</font><font color="#000000">&nbsp;+&nbsp;CART.RelevanceMeasure.Accuracy.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;F&nbsp;-&nbsp;estimate:&nbsp;&quot;</font><font color="#000000">&nbsp;+&nbsp;CART.RelevanceMeasure.F1.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Number&nbsp;of truly positive&nbsp;values:&nbsp;&quot;</font><font color="#000000">&nbsp;+&nbsp;CART.RelevanceMeasure.TruePositive.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(</font><font color="#800000">&quot;Number&nbsp;of truly negative&nbsp;values:&nbsp;&quot;</font><font color="#000000">&nbsp;+&nbsp;CART.RelevanceMeasure.TrueNegative.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#008080">End</font><font color="#000000">&nbsp;</font><font color="#008080">If</font><font color="#000000">;<br/> </font><font color="#008080">End</font><font color="#000000">&nbsp;</font><font color="#008080">Sub</font><font color="#000000">;</font>

After executing the example, the console window will display ROC curve data and classification quality criteria.

See also:

ISmCART