This module provides capabilities to compute statistical data over the underlying data for features in data sets. This assumes features are numeric and uses the math/statistics module for actual calculations.
> (requirerml/data)> (definedataset'csv(list> stats'#hash(("petal-length" . #<future>)
("petal-width" . #<future>)
("sepal-length" . #<future>)
("sepal-width" . #<future>))
(statistics 4.4 7.9 135.0 ...)
#<data-set>
predicate
( statistics-hash? a)→boolean?
a:any?
procedure
( compute-statistics dataset[feature-names])→statistics-hash?
dataset:data-set?
These are performed concurrently. The result is a hash of string names to statistics structures (or a future if the computation has not yet completed). Using the feature-statistics accessor will always return a statistics structure.
accessor
stats-hash:statistics-hash?feature-name:string?
transform
dataset:data-set?statistics-hash:statistics-hash?
From Scholarpedia:
… removes scale effects caused by use of features with different measurement scales. For example, if one feature is based on patient weight in units of kg and another feature is based on blood protein values in units of ng/dL in the range [-3,3], then patient weight will have a much greater influence on the distance between samples and may bias the performance of the classifier. Standardization transforms raw feature values into z-scores using the mean and standard deviation of a feature values over all input samples }