srtree-2.0.0.0: A general library to work with Symbolic Regression expression trees.
Copyright(c) Fabricio Olivetti 2021 - 2024
LicenseBSD3
Maintainerfabricio.olivetti@gmail.com
Stabilityexperimental
PortabilityFlexibleInstances, DeriveFunctor, ScopedTypeVariables
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SRTree.Eval

Description

Evaluation of SRTree expressions

Synopsis

Documentation

evalTree :: SRMatrix -> PVector -> Fix SRTree -> SRVector #

Evaluates the tree given a vector of variable values, a vector of parameter values and a function that takes a Double and change to whatever type the variables have. This is useful when working with datasets of many values per variables.

evalOp :: Floating a => Op -> a -> a -> a #

evalFun :: Floating a => Function -> a -> a #

cbrt :: Floating a => a -> a #

inverseFunc :: Function -> Function #

Returns the inverse of a function. This is a partial function.

invertibles :: [Function] #

List of invertible functions

evalInverse :: Floating a => Function -> a -> a #

evals the inverse of a function

invright :: Floating a => Op -> a -> a -> a #

evals the right inverse of an operator

invleft :: Floating a => Op -> a -> a -> a #

evals the left inverse of an operator

type SRVector = Array D Ix1 Double #

Vector of target values

type PVector = Array S Ix1 Double #

Vector of parameter values. Needs to be strict to be readily accesible.

type SRMatrix = Array S Ix2 Double #

Matrix of features values

Orphan instances

Index ix => Floating (Array D ix Double) # 
Instance details

Index ix => Num (Array D ix Double) # 
Instance details

Methods

(+) :: Array D ix Double -> Array D ix Double -> Array D ix Double #

(-) :: Array D ix Double -> Array D ix Double -> Array D ix Double #

(*) :: Array D ix Double -> Array D ix Double -> Array D ix Double #

negate :: Array D ix Double -> Array D ix Double #

abs :: Array D ix Double -> Array D ix Double #

signum :: Array D ix Double -> Array D ix Double #

fromInteger :: Integer -> Array D ix Double #

Index ix => Fractional (Array D ix Double) # 
Instance details