ml

Copyright(c) Guilherme S I Aldeia 2018
Heitor R Savegnago 2018
LicenseGPL-3
Maintainerguilherme.aldeia@aluno.ufabc.edu.br heitor.rodrigues@aluno.ufabc.edu.br
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone

Dataset

Description

Module containing implementation of dataset functions. The dataset is the holder for the data used to train the AInet algorithm. Due to the necessity of performing many matrix operations, the dataset is defined as a tuple of matrices (Data.Matrix).

Synopsis

Documentation

type X = Matrix Double #

Matrix of explanatory variables

type Y = Matrix Double #

Column matrix of target variables

type Dataset = (X, Y) #

Tuple with explanatory variables associated with the target variable

type DataPoint = ([Double], Double) #

A single line from a Dataset in a function friendly type

listsToDataset :: [[Double]] -> Dataset #

Takes a list of lists and split all lists in the last element. The first n-1 elements are considered explaratory variables, and the last element of each list is considered the target variable. Returns a dataset.

(#) :: Int -> Dataset -> DataPoint #

Takes a index (must be positive and smaller than the number of rows of the dataset) and a dataset. Returns the equivalent row from the dataset, in the form of ([Double], Double). This makes the processing of those values easier than having to deal with the Matrix functions.