Visitar URL original
DataFrame.ModelSelection
dataframe-learn-2.5.0.1: Interpretable, expression-returning machine learning for the dataframe ecosystem.
Safe HaskellNone
LanguageHaskell2010

DataFrame.ModelSelection

Description

Cross-validation and grid search for hyperparameter tuning.

Synopsis

Documentation

crossValScore :: Int -> Int -> (DataFrame -> DataFrame -> Double) -> DataFrame -> [Double] Source #

Per-fold scores from k-fold cross-validation.

crossValidate :: Int -> Int -> Metric -> Expr Double -> (DataFrame -> Expr Double) -> DataFrame -> [Double] Source #

Fit on each training fold and score predictions on the held-out fold.

stratifiedFoldIds :: Int -> Int -> Vector Double -> Vector Int Source #

A class-balanced fold number in [0, k) for every row.

outOfFold :: Vector Int -> (DataFrame -> DataFrame -> Vector Double) -> DataFrame -> Vector Double Source #

Out-of-fold scores: each row is scored by a model not trained on it.

data GridSearchResult c Source #

The outcome of a grid search: the best config, its score, and all results.

Constructors

GridSearchResult 

Fields

Instances

Instances details
Show c => Show (GridSearchResult c) Source # 
Instance details

Defined in DataFrame.ModelSelection

gridSearch :: Int -> Int -> [c] -> (c -> DataFrame -> DataFrame -> Double) -> DataFrame -> GridSearchResult c Source #

Search configurations by mean cross-validated score, returning the best.