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

DataFrame.SymbolicRegression.Expr

Description

The symbolic-regression expression tree: a small first-order ADT with vectorized evaluation and a total translation to a dataframe 'Expr Double'. Division, log, and sqrt are protected so evaluation never produces NaN.

Synopsis

Documentation

data SRExpr Source #

A symbolic-regression expression over feature variables and constants.

Instances

Instances details
Show SRExpr Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Eq SRExpr Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

(==) :: SRExpr -> SRExpr -> Bool #

(/=) :: SRExpr -> SRExpr -> Bool #

Ord SRExpr Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

data BinOp Source #

Constructors

SAdd 
SSub 
SMul 
SDiv 

Instances

Instances details
Bounded BinOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Enum BinOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Show BinOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

showsPrec :: Int -> BinOp -> ShowS #

show :: BinOp -> String #

showList :: [BinOp] -> ShowS #

Eq BinOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

(==) :: BinOp -> BinOp -> Bool #

(/=) :: BinOp -> BinOp -> Bool #

Ord BinOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

compare :: BinOp -> BinOp -> Ordering #

(<) :: BinOp -> BinOp -> Bool #

(<=) :: BinOp -> BinOp -> Bool #

(>) :: BinOp -> BinOp -> Bool #

(>=) :: BinOp -> BinOp -> Bool #

max :: BinOp -> BinOp -> BinOp #

min :: BinOp -> BinOp -> BinOp #

data UnOp Source #

Constructors

SNeg 
SSin 
SCos 
SExp 
SLog 
SSqrt 

Instances

Instances details
Bounded UnOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Enum UnOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

succ :: UnOp -> UnOp #

pred :: UnOp -> UnOp #

toEnum :: Int -> UnOp #

fromEnum :: UnOp -> Int #

enumFrom :: UnOp -> [UnOp] #

enumFromThen :: UnOp -> UnOp -> [UnOp] #

enumFromTo :: UnOp -> UnOp -> [UnOp] #

enumFromThenTo :: UnOp -> UnOp -> UnOp -> [UnOp] #

Show UnOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

showsPrec :: Int -> UnOp -> ShowS #

show :: UnOp -> String #

showList :: [UnOp] -> ShowS #

Eq UnOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

(==) :: UnOp -> UnOp -> Bool #

(/=) :: UnOp -> UnOp -> Bool #

Ord UnOp Source # 
Instance details

Defined in DataFrame.SymbolicRegression.Expr

Methods

compare :: UnOp -> UnOp -> Ordering #

(<) :: UnOp -> UnOp -> Bool #

(<=) :: UnOp -> UnOp -> Bool #

(>) :: UnOp -> UnOp -> Bool #

(>=) :: UnOp -> UnOp -> Bool #

max :: UnOp -> UnOp -> UnOp #

min :: UnOp -> UnOp -> UnOp #

evalSR :: Vector (Vector Double) -> Int -> SRExpr -> Vector Double Source #

Evaluate over a feature matrix given column-major (feats ! j is feature j across all rows). Protected operators keep results finite.

toDataFrameExpr :: Vector Text -> SRExpr -> Expr Double Source #

Translate to a dataframe expression over the named feature columns.

constants :: SRExpr -> [Double] Source #

The constant values in left-to-right traversal order.

setConstants :: [Double] -> SRExpr -> SRExpr Source #

Replace the constants in traversal order; extra values are ignored.