2016-04-08 22:36:48 +00:00
|
|
|
# CsvDataset
|
|
|
|
|
|
|
|
Helper class that loads data from CSV file. It extends the `ArrayDataset`.
|
|
|
|
|
2019-11-02 10:41:34 +00:00
|
|
|
### Constructor Parameters
|
2016-04-08 22:36:48 +00:00
|
|
|
|
|
|
|
* $filepath - (string) path to `.csv` file
|
|
|
|
* $features - (int) number of columns that are features (starts from first column), last column must be a label
|
2019-11-02 10:41:34 +00:00
|
|
|
* $headingRow - (bool) define if the file has a heading row (if `true` then first row will be ignored)
|
2016-04-08 22:36:48 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
$dataset = new CsvDataset('dataset.csv', 2, true);
|
|
|
|
```
|
|
|
|
|
2017-01-05 20:06:10 +00:00
|
|
|
See [ArrayDataset](array-dataset.md) for more information.
|