dataFrame.columns.stat — binaryAsymmetry()
Description
The binaryAsymmetry() method of the stat object identifies binary columns whose majority category proportion exceeds the specified asymmetry threshold.
Signature
dataFrame.columns(...columnNames).stat.binaryAsymmetry({ threshold: 0.2 })Arguments
...columnNames( string[] )- The name of the columns from which to compute the binary asymmetry detection.
options(object)- Binary asymmetry detection options.
Option
threshold(string)- The maximum tolerated proportion of the minority category. (Default:
0.2.)
Returns
stat( object[] )- An array containing the asymmetry details for each selected column.
column(string)- The column name.
proportion(number)- The proportion of the majority category.
asymmetric(boolean)- Indicates whether the majority category proportion exceeds the specified threshold.
- If asymmetric:
true - Otherwise:
false
- If asymmetric:
Notes
- Only binary columns are evaluated.
- proportion represents the proportion of the majority category and ranges from
0.5to1. - A column is considered asymmetric when the proportion of its majority category exceeds
1 - threshold. - With the default threshold of
0.2, a binary column is considered asymmetric when one category represents more than80%of the observations.
Example
// test the binary symmetry of 2 columns of the dataFrame
var stat = dataFrame.columns('groupA', 'groupB').stat.binaryAsymmetry();
// log the stat details
notebook.log(stat);