v2026.5.3
All Bundles
Bundle Machine learning library with linear regression, logistic regression, k-means clustering, and matrix operations. Designed for tabular data; supports training, prediction, and model evaluation. Compile with -lib ml.

MatrixReader

Utilities for reading data from CSV data sources

Operations

LoadMatrices # function

Load input and output data into matrices

function : LoadMatrices(filename:String, target_offset:Int) ~ Vector[]<FloatMatrixRef>

Parameters

NameTypeDescription
filenameStringfile to process
target_offsetIntindex of first column with target data

Return

TypeDescription
Vectorinput and output matrix data

LoadSplitMatrices # function

Load input and output data into split matrices for training and testing

function : LoadSplitMatrices(filename:String, target_offset:Int, training_perc:Float, line_ending:String) ~ Vector[]<FloatMatrixRef>

Parameters

NameTypeDescription
filenameStringfile to process
target_offsetIntindex of first column with output data
training_percFloatpercentage of data used for training
line_endingStringCSV line ending (i.e. Unix, Windows, etc.), default CRLF per the spec

Return

TypeDescription
Vectorsplit matrices for training and testing, first two matrices are training, latter two test data