| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.SVM
Description
Linear support vector classification: L2-regularized squared hinge via
FISTA (sklearn's LinearSVC default). fit trains a one-vs-rest LinearSVCModel;
predict is the arg-max class margin (no predict_proba, as in sklearn).
Synopsis
- module DataFrame.Model
- data LinearSVCModel a = LinearSVCModel {
- svcClasses :: !(Vector a)
- svcModels :: !(Vector LinearModel)
- data SVCConfig = SVCConfig {}
- defaultSVCConfig :: SVCConfig
- svcMarginExprs :: (Columnable a, Ord a) => LinearSVCModel a -> Map a (Expr Double)
- data LinearModel = LinearModel {
- lmWeights :: !(Vector Double)
- lmIntercept :: !Double
- lmFeatureNames :: !(Vector Text)
Documentation
module DataFrame.Model
data LinearSVCModel a Source #
A fitted one-vs-rest linear SVC: class labels and their margin sub-models.
Constructors
| LinearSVCModel | |
Fields
| |
Instances
| Show a => Show (LinearSVCModel a) Source # | |||||
Defined in DataFrame.SVM Methods showsPrec :: Int -> LinearSVCModel a -> ShowS # show :: LinearSVCModel a -> String # showList :: [LinearSVCModel a] -> ShowS # | |||||
| (Columnable a, Ord a) => Predict (LinearSVCModel a) Source # | |||||
Defined in DataFrame.SVM Associated Types
Methods predict :: LinearSVCModel a -> Prediction (LinearSVCModel a) Source # | |||||
| Eq a => Eq (LinearSVCModel a) Source # | |||||
Defined in DataFrame.SVM Methods (==) :: LinearSVCModel a -> LinearSVCModel a -> Bool # (/=) :: LinearSVCModel a -> LinearSVCModel a -> Bool # | |||||
| type Prediction (LinearSVCModel a) Source # | |||||
Defined in DataFrame.SVM | |||||
Hyper-parameters. svcC is the inverse regularization strength (sklearn C).
Instances
| Show SVCConfig Source # | |||||||||
| Eq SVCConfig Source # | |||||||||
| (Columnable a, Ord a) => Fit SVCConfig (Expr a) Source # | |||||||||
Defined in DataFrame.SVM Associated Types
| |||||||||
| type FrameReq SVCConfig (Expr a) Source # | |||||||||
Defined in DataFrame.SVM | |||||||||
| type ModelOf SVCConfig (Expr a) Source # | |||||||||
Defined in DataFrame.SVM | |||||||||
svcMarginExprs :: (Columnable a, Ord a) => LinearSVCModel a -> Map a (Expr Double) Source #
The raw margin expression for each class.
Surfaced by LinearSVCModel.svcModels.
data LinearModel #
A fitted linear classifier: predicts the positive class when
sum (weights .* features) + intercept > 0. Weights of exactly 0 mark
features dropped by the L1 penalty (filtered out by modelToExpr).
Constructors
| LinearModel | |
Fields
| |
Instances
| Show LinearModel | |
Defined in DataFrame.LinearSolver Methods showsPrec :: Int -> LinearModel -> ShowS # show :: LinearModel -> String # showList :: [LinearModel] -> ShowS # | |
| Eq LinearModel | |
Defined in DataFrame.LinearSolver | |