I would like to create a List of Rules
data structure to be used in the Classify
function.
I have sample input data stored in one .csv file and target output values in another. There are four columns in the data file and one column in the target file. The information in one row of the four columns in the data file map to one row in the one column in the target file.
I can import the data and get it into a Data structure
with:
X = Dataset[Import["x_data.csv"]];
Y = Dataset[Import["y_data.csv"]];
How would I construct a List of Rules
mapping the four entries in each row in X to the entry in the one column in Y?
The required structure should look something like:
{x1,x2,x3,x4}->y
Note: This is a standard way to set up Machine Learning data in Scikit-learn in Python (the tool I have been using), if there is another better way in Mathematica, I would be interested in knowing.
This is what the input data looks like:
This is the target data (note that this is category data and further on there is non-zero data):
{x1,x2,x3,x4}->y
, or something else? $\endgroup$ – rogerl Mar 5 '17 at 3:48{x1,x2,x3,x4}->y
is basically what I want, (I think). $\endgroup$ – Mike Mar 5 '17 at 4:05