May 2020
Intermediate to advanced
530 pages
17h 8m
English
Many machine learning frameworks already have routines for reading the CSV file format to their internal representations. In the following code sample, we show how to load a CSV file with the Shark-ML library to the ClassificationDataset object. The CSV parser in this library assumes that all values in a file have a numerical type only, so it is unable to read the original file with the Iris dataset we used in the previous example. However, in the previous section, we already fixed this problem by replacing string values with numeric ones, and we can use our new file named iris_fix.csv.
To read a CSV file with the Shark-ML library, we have to include corresponding headers, as follows:
#include <shark/Data/Csv.h> ...
Read now
Unlock full access