CrossValidation Module

Types and nested modules

Type/Module Description

Error

CrossValidationResult<'a>

Functions and values

Function or value Description

createCrossValidationResult error errorStDev

Full Usage: createCrossValidationResult error errorStDev

Parameters:
    error : 'a
    errorStDev : 'a

Returns: CrossValidationResult<'a>
error : 'a
errorStDev : 'a
Returns: CrossValidationResult<'a>

kFold k xData yData fit error

Full Usage: kFold k xData yData fit error

Parameters:
Returns: ^T
Modifiers: inline
Type parameters: ^T

Computes a k fold cross-validation,
k: training set size (and number of iterations),
xData: rowwise x-coordinate matrix,
yData: yData vector
fit: x and y data lead to function that maps a rowwise matrix of xCoordinates to a y-coordinate,
error: defines the error of the fitted y-coordinate and the actual y-coordinate

k : int

xData : Matrix<^T>

yData : Vector<^T>

fit : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T

error : ^T -> ^T -> ^T

Returns: ^T

Example

loocv xData yData fitFunc error

Full Usage: loocv xData yData fitFunc error

Parameters:
Returns: ^T
Modifiers: inline
Type parameters: ^T

Computes a leave one out cross-validation
xData: rowwise x-coordinate matrix,
yData: yData vector
fit: x and y data lead to function that maps an xData row vector to a y-coordinate,
error: defines the error of the fitted y-coordinate and the actual y-coordinate

xData : Matrix<^T>
yData : Vector<^T>
fitFunc : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T
error : ^T -> ^T -> ^T
Returns: ^T

Example

repeatedKFold k iterations xData yData fit error getStDev

Full Usage: repeatedKFold k iterations xData yData fit error getStDev

Parameters:
    k : int
    iterations : int
    xData : Matrix<^T>
    yData : Vector<^T>
    fit : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T
    error : ^T -> ^T -> ^T
    getStDev : seq<^T> -> ^T

Returns: CrossValidationResult<^T>
Modifiers: inline
Type parameters: ^T

Computes a repeated k fold cross-validation,
k: training set size (and number of iterations),
iterations: number of random subset creation,
xData: rowwise x-coordinate matrix,
yData: yData vector
fit: x and y data lead to function that maps a xData row vector to a y-coordinate,
error: defines the error of the fitted y-coordinate and the actual y-coordinate,
getStDev: function that calculates the standard deviation from a seq<^T>. (Seq.stDev)

k : int
iterations : int
xData : Matrix<^T>
yData : Vector<^T>
fit : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T
error : ^T -> ^T -> ^T
getStDev : seq<^T> -> ^T
Returns: CrossValidationResult<^T>

Example

shuffelAndSplit p iterations xData yData fit error getStDev

Full Usage: shuffelAndSplit p iterations xData yData fit error getStDev

Parameters:
    p : float
    iterations : int
    xData : Matrix<^T>
    yData : Vector<^T>
    fit : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T
    error : ^T -> ^T -> ^T
    getStDev : seq<^T> -> ^T

Returns: CrossValidationResult<^T>
Modifiers: inline
Type parameters: ^T

Computes a repeated shuffel-and-split cross validation
p: percentage of training set size from original size,
iterations: number of random subset creation,
xData: rowwise x-coordinate matrix,
yData: yData vector
fit: x and y data lead to function that maps a xData row vector to a y-coordinate,
error: defines the error of the fitted y-coordinate and the actual y-coordinate,
getStDev: function that calculates the standard deviation from a seq<^T>. (Seq.stDev)

p : float
iterations : int
xData : Matrix<^T>
yData : Vector<^T>
fit : Matrix<^T> -> Vector<^T> -> RowVector<^T> -> ^T
error : ^T -> ^T -> ^T
getStDev : seq<^T> -> ^T
Returns: CrossValidationResult<^T>

Example