Safe Haskell | None |
---|

- crossvalidation :: (HomTrainer model, Monoid ret, Monoid (container (Datapoint model)), Partitionable container, PartitionableConstraint container (Datapoint model), Foldable container, Functor container) => container (Datapoint model) -> (model -> container (Datapoint model) -> ret) -> Int -> ret
- type LossFunction model = model -> [Datapoint model] -> Double
- leaveOneOut :: [dp] -> [[dp]]
- folds :: Int -> [dp] -> [[dp]]
- errorRate :: (Classifier model, Labeled (Datapoint model), Eq (Label (Datapoint model))) => LossFunction model
- crossValidate :: (HomTrainer model, Eq (Datapoint model)) => [[Datapoint model]] -> LossFunction model -> Normal Double
- crossValidate_monoid :: (HomTrainer model, Eq (Datapoint model)) => [[Datapoint model]] -> LossFunction model -> Normal Double
- crossValidate_group :: (HomTrainer model, Group model) => [[Datapoint model]] -> LossFunction model -> Normal Double
- listAllBut2 :: Monoid a => [a] -> [a]
- listAllBut :: Monoid a => [a] -> [a]
- genTestList :: Monoid a => [a] -> [(a, a)]

# Documentation

crossvalidation :: (HomTrainer model, Monoid ret, Monoid (container (Datapoint model)), Partitionable container, PartitionableConstraint container (Datapoint model), Foldable container, Functor container) => container (Datapoint model) -> (model -> container (Datapoint model) -> ret) -> Int -> retSource

This is the standard cross-validation technique for use with the HomTrainer type class. It is asymptotically faster than standard k-fold cross-validation (implemented with lame_crossvalidation), yet is guaranteed to get the exact same answer.

type LossFunction model = model -> [Datapoint model] -> DoubleSource

leaveOneOut :: [dp] -> [[dp]]Source

errorRate :: (Classifier model, Labeled (Datapoint model), Eq (Label (Datapoint model))) => LossFunction modelSource

crossValidate :: (HomTrainer model, Eq (Datapoint model)) => [[Datapoint model]] -> LossFunction model -> Normal DoubleSource

crossValidate_monoid :: (HomTrainer model, Eq (Datapoint model)) => [[Datapoint model]] -> LossFunction model -> Normal DoubleSource

crossValidate_group :: (HomTrainer model, Group model) => [[Datapoint model]] -> LossFunction model -> Normal DoubleSource

listAllBut2 :: Monoid a => [a] -> [a]Source

listAllBut :: Monoid a => [a] -> [a]Source

genTestList :: Monoid a => [a] -> [(a, a)]Source