| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Metrics.Report
Description
Bundled, pretty-printing evaluation summaries: a labelled confusion matrix
and scikit-learn-style regression / classification reports. The *Expr variants
take a model's prediction expression and a truth column directly, so a full
report is a one-liner after fitting.
Synopsis
- data ConfusionMatrix = ConfusionMatrix {}
- confusionMatrix :: Vector Double -> Vector Double -> ConfusionMatrix
- confusionMatrixExpr :: Expr Double -> Expr Double -> DataFrame -> ConfusionMatrix
- data RegressionReport = RegressionReport {}
- regressionReport :: Vector Double -> Vector Double -> RegressionReport
- regressionReportExpr :: Expr Double -> Expr Double -> DataFrame -> RegressionReport
- data ClassStats = ClassStats {}
- data ClassificationReport = ClassificationReport {
- crPerClass :: ![(Double, ClassStats)]
- crAccuracy :: !Double
- crMacroF1 :: !Double
- crWeightedF1 :: !Double
- classificationReport :: Vector Double -> Vector Double -> ClassificationReport
- classificationReportExpr :: Expr Double -> Expr Double -> DataFrame -> ClassificationReport
Documentation
data ConfusionMatrix Source #
A labelled confusion matrix: class order plus row-major actual×predicted.
Constructors
| ConfusionMatrix | |
Instances
| Show ConfusionMatrix Source # | |
Defined in DataFrame.Metrics.Report Methods showsPrec :: Int -> ConfusionMatrix -> ShowS # show :: ConfusionMatrix -> String # showList :: [ConfusionMatrix] -> ShowS # | |
| Eq ConfusionMatrix Source # | |
Defined in DataFrame.Metrics.Report Methods (==) :: ConfusionMatrix -> ConfusionMatrix -> Bool # (/=) :: ConfusionMatrix -> ConfusionMatrix -> Bool # | |
confusionMatrix :: Vector Double -> Vector Double -> ConfusionMatrix Source #
Confusion matrix over the class set of truth ∪ preds.
confusionMatrixExpr :: Expr Double -> Expr Double -> DataFrame -> ConfusionMatrix Source #
Confusion matrix from a prediction expression and a truth column.
data RegressionReport Source #
Regression metrics bundle.
Constructors
| RegressionReport | |
Instances
| Show RegressionReport Source # | |
Defined in DataFrame.Metrics.Report Methods showsPrec :: Int -> RegressionReport -> ShowS # show :: RegressionReport -> String # showList :: [RegressionReport] -> ShowS # | |
| Eq RegressionReport Source # | |
Defined in DataFrame.Metrics.Report Methods (==) :: RegressionReport -> RegressionReport -> Bool # (/=) :: RegressionReport -> RegressionReport -> Bool # | |
regressionReport :: Vector Double -> Vector Double -> RegressionReport Source #
Regression report from prediction/truth vectors.
regressionReportExpr :: Expr Double -> Expr Double -> DataFrame -> RegressionReport Source #
Regression report from a prediction expression and a truth column.
data ClassStats Source #
Per-class precisionrecallF1/support.
Constructors
| ClassStats | |
Instances
| Show ClassStats Source # | |
Defined in DataFrame.Metrics.Report Methods showsPrec :: Int -> ClassStats -> ShowS # show :: ClassStats -> String # showList :: [ClassStats] -> ShowS # | |
| Eq ClassStats Source # | |
Defined in DataFrame.Metrics.Report | |
data ClassificationReport Source #
A scikit-learn-style classification report: per-class stats plus accuracy and macro/weighted F1.
Constructors
| ClassificationReport | |
Fields
| |
Instances
| Show ClassificationReport Source # | |
Defined in DataFrame.Metrics.Report Methods showsPrec :: Int -> ClassificationReport -> ShowS # show :: ClassificationReport -> String # showList :: [ClassificationReport] -> ShowS # | |
| Eq ClassificationReport Source # | |
Defined in DataFrame.Metrics.Report Methods (==) :: ClassificationReport -> ClassificationReport -> Bool # (/=) :: ClassificationReport -> ClassificationReport -> Bool # | |
classificationReport :: Vector Double -> Vector Double -> ClassificationReport Source #
Classification report from prediction/truth vectors.
classificationReportExpr :: Expr Double -> Expr Double -> DataFrame -> ClassificationReport Source #
Classification report from a prediction expression and a truth column.