php-ml/docs/machine-learning/datasets/csv-dataset.md

16 lines
518 B
Markdown
Raw Normal View History

2016-04-08 22:36:48 +00:00
# CsvDataset
Helper class that loads data from CSV file. It extends the `ArrayDataset`.
### Constructors Parameters
* $filepath - (string) path to `.csv` file
* $features - (int) number of columns that are features (starts from first column), last column must be a label
* $headingRow - (bool) define is file have a heading row (if `true` then first row will be ignored)
```
$dataset = new CsvDataset('dataset.csv', 2, true);
```
2016-05-02 11:49:19 +00:00
See [ArrayDataset](machine-learning/datasets/array-dataset/) for more information.