Safe Haskell | None |
---|---|
Language | Haskell2010 |
DataFrame.Operations.Statistics
Synopsis
- frequencies :: Text -> DataFrame -> DataFrame
- mean :: Text -> DataFrame -> Maybe Double
- median :: Text -> DataFrame -> Maybe Double
- standardDeviation :: Text -> DataFrame -> Maybe Double
- skewness :: Text -> DataFrame -> Maybe Double
- variance :: Text -> DataFrame -> Maybe Double
- interQuartileRange :: Text -> DataFrame -> Maybe Double
- correlation :: Text -> Text -> DataFrame -> Maybe Double
- _getColumnAsDouble :: Text -> DataFrame -> Maybe (Vector Double)
- sum :: (Columnable a, Num a, Unbox a) => Text -> DataFrame -> Maybe a
- applyStatistic :: (Vector Double -> Double) -> Text -> DataFrame -> Maybe Double
- applyStatistics :: (Vector Double -> Vector Double) -> Text -> DataFrame -> Maybe (Vector Double)
- summarize :: DataFrame -> DataFrame
- roundTo :: Int -> Double -> Double
- toPct2dp :: Double -> String
Documentation
frequencies :: Text -> DataFrame -> DataFrame Source #
Show a frequency table for a categorical feaure.
Examples:
ghci> df <- D.readCsv "./data/housing.csv" ghci> D.frequencies "ocean_proximity" df ---------------------------------------------------------------------------- index | Statistic | <1H OCEAN | INLAND | ISLAND | NEAR BAY | NEAR OCEAN ------|----------------|-----------|--------|--------|----------|----------- Int | Text | Any | Any | Any | Any | Any ------|----------------|-----------|--------|--------|----------|----------- 0 | Count | 9136 | 6551 | 5 | 2290 | 2658 1 | Percentage (%) | 44.26% | 31.74% | 0.02% | 11.09% | 12.88%
mean :: Text -> DataFrame -> Maybe Double Source #
Calculates the mean of a given column as a standalone value.
median :: Text -> DataFrame -> Maybe Double Source #
Calculates the median of a given column as a standalone value.
standardDeviation :: Text -> DataFrame -> Maybe Double Source #
Calculates the standard deviation of a given column as a standalone value.
skewness :: Text -> DataFrame -> Maybe Double Source #
Calculates the skewness of a given column as a standalone value.
variance :: Text -> DataFrame -> Maybe Double Source #
Calculates the variance of a given column as a standalone value.
interQuartileRange :: Text -> DataFrame -> Maybe Double Source #
Calculates the inter-quartile range of a given column as a standalone value.
correlation :: Text -> Text -> DataFrame -> Maybe Double Source #
Calculates the Pearson's correlation coefficient between two given columns as a standalone value.
sum :: (Columnable a, Num a, Unbox a) => Text -> DataFrame -> Maybe a Source #
Calculates the sum of a given column as a standalone value.