Click or drag to resize
Accord.NET (logo)

ClassesGetRatio Method (Int32, 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(
	int[] y,
	out int positives,
	out int negatives
)
Request Example View Source

Parameters

y
Type: SystemInt32
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.
See Also