dataframe-learn-2.4.1.0: Interpretable, expression-returning machine learning for the dataframe ecosystem.
Safe HaskellNone
LanguageHaskell2010

DataFrame.DecisionTree

Description

Interpretable decision trees on DataFrames (CART refined by TAO). The curated public surface: classifier/regressor configs, fitted-model records, and their Fit/Predict instances.

Synopsis

Estimators

Fitted-model records with their Fit/Predict instances and the estimator classes (via DataFrame.Model).

Classifier configuration

newtype ColumnOrdering #

Which column types support ordering for splits. Register a type with orderable and combine with <>.

Constructors

ColumnOrdering (Map SomeTypeRep OrdDict) 

orderable :: (Columnable a, Ord a) => ColumnOrdering #

Register a type as orderable for decision-tree splits.

defaultColumnOrdering :: ColumnOrdering #

All standard numeric, text, and primitive types.

withOrdFrom :: Columnable a => ColumnOrdering -> (Ord a => r) -> Maybe r #

Run k with the Ord a instance recovered from the ordering registry, or Nothing when a is not registered.

Regressor configuration

data RegTreeConfig Source #

Stopping criteria for the regression tree.

Fitted tree structure

data Tree a #

A fitted tree: a leaf value, or an internal node testing a boolean expression with True routing left.

Constructors

Leaf !a 
Branch !(Expr Bool) !(Tree a) !(Tree a) 

Instances

Instances details
Show a => Show (Tree a) 
Instance details

Defined in DataFrame.DecisionTree.Types

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Solver configuration (fills TreeConfig.linearSolverConfig)

data SolverConfig #

Hyper-parameters for the FISTA solver.

Constructors

SolverConfig 

Fields

  • scL1Lambda :: !Double

    Strength of the L1 penalty on weights (intercept is not regularized).

  • scL2Lambda :: !Double

    Strength of the L2 penalty (λ₂/2)·|w|² (Elastic Net; Zou & Hastie 2005). Combined with scL1Lambda this is the elastic-net objective; 0 reduces the solver to pure L1.

  • scMaxIter :: !Int

    Maximum number of FISTA iterations.

  • scTol :: !Double

    Convergence tolerance on the weight delta (L-inf norm).

  • scSampleWeights :: !(Maybe (Vector Double))

    Optional per-row sample weights, length n (Nothing is uniform). Weights should have mean 1 (i.e. Σ w_i = N) so the Lipschitz bound stays valid; see fitLinearCandidate for the class-balanced construction.

Instances

Instances details
Show SolverConfig 
Instance details

Defined in DataFrame.LinearSolver

Eq SolverConfig 
Instance details

Defined in DataFrame.LinearSolver