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, ConstraintKinds
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SRTree.Datasets

Description

Utility library to handle regression datasets this module exports only the loadDataset function.

Synopsis

Documentation

loadDataset :: FilePath -> Bool -> IO ((SRMatrix, PVector, SRMatrix, PVector), String, String) #

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.