Copyright | (c) Fabricio Olivetti 2021 - 2024 |
---|---|
License | BSD3 |
Maintainer | fabricio.olivetti@gmail.com |
Stability | experimental |
Portability | FlexibleInstances, DeriveFunctor, ScopedTypeVariables, ConstraintKinds |
Safe Haskell | None |
Language | Haskell2010 |
Utility library to handle regression datasets
this module exports only the loadDataset
function.
Documentation
loadDataset :: FilePath -> Bool -> IO ((SRMatrix, PVector, SRMatrix, PVector), String, String) Source #
loadDataset
loads a dataset with a filename in the format:
filename.ext:start_row:end_row:target:features
it returns the X_train, y_train, X_test, y_test, varnames, target name
where varnames are a comma separated list of the name of the vars
and target name is the name of the target
where
- *start_row:end_row** is the range of the training rows (default 0:nrows-1). every other row not included in this range will be used as validation
- *target** is either the name of the PVector (if the datafile has headers) or the index of the target variable
- *features** is a comma separated list of SRMatrix names or indices to be used as input variables of the regression model.