Trying to learn the new Dataset
features, I am playing with the iris
dataset:
iris=SemanticImport["http://aima.cs.berkeley.edu/data/iris.csv"];
iris[1;;3]
Now I would like to use Classify
to predict the Species from the other Variables. From the documentation of Classify
it seems I need to write a query that outputs something like
{{{5.1,3.5,1.4,0.2} -> "setosa"}, {{4.9,3.,1.4,.2} -> "setosa"}}
and so on. But here I am stuck. How do I write this query function? I tried
trainQuery = Function[row,
Rule[row[All, 1;;4], row[All, 5]]
];
but this fails.
Any help appreciated!
iris
dataset? It's not available fromExampleData["Dataset"]
. $\endgroup$ – m_goldberg Oct 15 '14 at 15:00iris
. $\endgroup$ – Karsten W. Oct 15 '14 at 17:45ExampleData[{"Statistics", "FisherIris"}]
. $\endgroup$ – J. M.'s ennui♦ Oct 21 '15 at 21:18