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
Syntax
public static double GetRatio(
	this bool[] y,
	out int positives,
	out int negatives
)
Request Example View Source

Parameters

y
Type: SystemBoolean
The class labels.
positives
Type: SystemInt32
The number of positive samples in y.
negatives
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