Copyright | (c) David Banas 2018 |
---|---|
License | BSD-3 |
Maintainer | capn.freako@gmail.com |
Stability | experimental |
Portability | ? |
Safe Haskell | None |
Language | Haskell2010 |
- data Iris
- data Attributes = Attributes {}
- type Sample = (Attributes, Iris)
- readIrisData :: String -> IO [Sample]
- attributeToVector :: Attributes -> R 4
- irisTypeToVector :: Iris -> R 3
- classificationAccuracy :: KnownNat n => [R n] -> [R n] -> Double
- printVector :: KnownNat n => R n -> String
- printVecPair :: (KnownNat m, KnownNat n) => (R m, R n) -> String
- mkSmplsUniform :: [Sample] -> [Sample]
- asciiPlot :: [Double] -> String
- calcMeanList :: Fractional a => [a] -> a
- for :: [a] -> (a -> b) -> [b]
Documentation
The 3 classes of iris are represented by the 3 constructors of this type.
data Attributes Source #
Data type representing the set of attributes for a sample in the Iris dataset.
type Sample = (Attributes, Iris) Source #
A single sample in the dataset is a pair of a list of attributes and a classification.
attributeToVector :: Attributes -> R 4 Source #
Convert a value of type Attributes
to a value of type R
4.
irisTypeToVector :: Iris -> R 3 Source #
classificationAccuracy :: KnownNat n => [R n] -> [R n] -> Double Source #
Calculate the classification accuracy, given:
- a list of results vectors, and
- a list of reference vectors.
mkSmplsUniform :: [Sample] -> [Sample] Source #
Rescale all feature values, to fall in [0,1].
calcMeanList :: Fractional a => [a] -> a Source #
Calculate the mean value of a list.