bin_width_estimator {SBCK} | R Documentation |
bin_width_estimator method
Description
Lenght of cell to compute an histogram
Usage
bin_width_estimator(X, method = "auto")
Arguments
X |
[matrix] A matrix containing data, nrow = n_samples, ncol = n_features |
method |
[string] Method to estimate bin_width, values are "auto", "FD" (Friedman Draconis, robust over outliners) or "Sturges". If "auto" is used and if nrow(X) < 1000, "Sturges" is used, else "FD" is used. |
Value
[vector] Lenght of bins
Examples
X = base::cbind( stats::rnorm( n = 2000 ) , stats::rexp(2000) )
## Friedman Draconis is used
binw_width = SBCK::bin_width_estimator( X , method = "auto" )
X = stats::rnorm( n = 500 )
## Sturges is used
binw_width = SBCK::bin_width_estimator( X , method = "auto" )
[Package SBCK version 1.0.0 Index]