|
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
)
<ExtensionAttribute>
Public Shared Function GetRatio (
y As Boolean(),
<OutAttribute> ByRef positives As Integer,
<OutAttribute> ByRef negatives As Integer
) As Double
Request Example
View SourceParameters
- 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:
DoubleThe 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