Click or drag to resize
Accord.NET (logo)

ClassesGetRatio Method (Int32, Int32)

Calculates the prevalence of a class for each variable.

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

Parameters

positives
Type: SystemInt32
An array of counts detailing the occurrence of the first class.
negatives
Type: SystemInt32
An array of counts detailing the occurrence of the second class.

Return Value

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