Safe Haskell | None |
---|
HLearn.Models.Classifiers.Common
- indicator :: Num a => Bool -> a
- bool2num :: Num a => Bool -> a
- num2bool :: (Ord a, Num a) => a -> Bool
- class Labeled dp where
- type Label dp
- type Attributes dp
- getLabel :: dp -> Label dp
- getAttributes :: dp -> Attributes dp
- class Labeled (Datapoint model) => ProbabilityClassifier model where
- type ResultDistribution model
- probabilityClassify :: model -> Attributes (Datapoint model) -> ResultDistribution model
- class MarginClassifier model where
- class Labeled (Datapoint model) => Classifier model where
- classify :: model -> Attributes (Datapoint model) -> Label (Datapoint model)
- class (Classifier model, Ring model ~ Label (Datapoint model)) => Regression model
Documentation
class Labeled (Datapoint model) => ProbabilityClassifier model whereSource
Associated Types
type ResultDistribution model Source
Methods
probabilityClassify :: model -> Attributes (Datapoint model) -> ResultDistribution modelSource
Instances
class MarginClassifier model whereSource
class Labeled (Datapoint model) => Classifier model whereSource
Instances
Floating ring => Classifier (PowerLaw ring) | |
(ProbabilityClassifier (Bayes labelLens dist), ~ * (Label (Datapoint (Bayes labelLens dist))) (Datapoint (Margin labelLens dist)), Mean (Margin labelLens dist)) => Classifier (Bayes labelLens dist) |
class (Classifier model, Ring model ~ Label (Datapoint model)) => Regression model Source
this is a default instance that any instance of Classifier should satisfy if it is also an instance of ProbabilityClassifier instance ( Label (Datapoint model) ~ Datapoint (ResultDistribution model) , Mean (ResultDistribution model) , ProbabilityClassifier model ) => Classifier model where classify model dp = mean $ probabilityClassify model dp
Regression is classification where the class labels are (isomorphic to) real numbers. The constraints could probably be better specified, but they're close enough for now.
Instances
(Classifier model, ~ * (Ring model) (Label (Datapoint model))) => Regression model |