Click or drag to resize
Accord.NET (logo)

ClassesGetRatio Method (Boolean, Int32, Int32)

Gets the percentage of positive samples in a set of class labels.

Namespace:  Accord.Statistics
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
public static double GetRatio(
	this bool[] y,
	out int positives,
	out int negatives
Request Example View Source


Type: SystemBoolean
The class labels.
Type: SystemInt32
The number of positive samples in y.
Type: SystemInt32
The number of negatives samples in y.

Return Value

Type: Double
The percentage of positive samples in y.

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