DataFrame
typedef struct {
double *data;
int numRows;
int numCols;
char **featureNames;
} DataFrame;
Represents a matrix with names for each column.
Data is stored as a row-major flattened array.
note
Added in version 0.0.0
Struct Members
double* data
← Flattened arrayint numRows
← Number of rows (samples)int numCols
← Number of columns (features) per rowchar** featureNames
← Array of column/feature names
Related Functions
DF_addColumn
→int
Adds a single column/feature to an existing DataFrame.
Params:DataFrame *df
double *data
char *name
DF_free
→void
Frees all allocated memory by the DataFrame.
Params:DataFrame *df
DF_fromArray
→DataFrame
Creates a DataFrame with one feature from the given array.
Params:double *data
int numRows
char *name