Click or drag to resize
Accord.NET (logo)

ClassesGetRatio Method (Int32, Int32, Int32)

Calculates the prevalence of a class.

Namespace:  Accord.Statistics
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static double[] GetRatio(
	this int[][] data,
	int positiveColumn,
	int negativeColumn
)
Request Example View Source

Parameters

data
Type: SystemInt32
A matrix containing counted, grouped data.
positiveColumn
Type: SystemInt32
The index for the column which contains counts for occurrence of the first class.
negativeColumn
Type: SystemInt32
The index for the column which contains counts for occurrence of the second class.

Return Value

Type: Double
An array containing the proportion of the first class over the total of occurrences.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also