| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.LinearModel.Logistic
Description
Logistic regression: binary and one-vs-rest multiclass over the FISTA
solver. fit trains a LogisticModel; predict is the arg-max class decision.
Per-class margins and (normalized) probabilities stay available as named
auxiliary expressions.
Synopsis
- module DataFrame.Model
- newtype LogisticConfig = LogisticConfig {}
- defaultLogisticConfig :: LogisticConfig
- data LogisticModel a = LogisticModel {
- lgClasses :: !(Vector a)
- lgModels :: !(Vector LinearModel)
- logisticMarginExprs :: (Columnable a, Ord a) => LogisticModel a -> Map a (Expr Double)
- logisticProbExprs :: (Columnable a, Ord a) => LogisticModel a -> Map a (Expr Double)
Documentation
module DataFrame.Model
newtype LogisticConfig Source #
Hyperparameters for logistic regression (the FISTA solver config).
Constructors
| LogisticConfig | |
Fields | |
Instances
data LogisticModel a Source #
A fitted (one-vs-rest) logistic model: parallel vectors of class labels and
their binary sub-models. lgModels carries sklearn's per-class coef_.
Constructors
| LogisticModel | |
Fields
| |
Instances
| Show a => Show (LogisticModel a) Source # | |||||
Defined in DataFrame.LinearModel.Logistic Methods showsPrec :: Int -> LogisticModel a -> ShowS # show :: LogisticModel a -> String # showList :: [LogisticModel a] -> ShowS # | |||||
| (Columnable a, Ord a) => Predict (LogisticModel a) Source # | |||||
Defined in DataFrame.LinearModel.Logistic Associated Types
Methods predict :: LogisticModel a -> Prediction (LogisticModel a) Source # | |||||
| Eq a => Eq (LogisticModel a) Source # | |||||
Defined in DataFrame.LinearModel.Logistic Methods (==) :: LogisticModel a -> LogisticModel a -> Bool # (/=) :: LogisticModel a -> LogisticModel a -> Bool # | |||||
| type Prediction (LogisticModel a) Source # | |||||
Defined in DataFrame.LinearModel.Logistic | |||||
logisticMarginExprs :: (Columnable a, Ord a) => LogisticModel a -> Map a (Expr Double) Source #
The raw margin Expr for each class.
logisticProbExprs :: (Columnable a, Ord a) => LogisticModel a -> Map a (Expr Double) Source #
Per-class probability expressions: 1 / (1 + exp(-margin)).