I was reading this answer and thought I would ask a question since it had been asked ~5 years ago. Now there is a line in the answer where it states that to train the classifier, you can use the code:
cfun = titUnclass["Train", Classify @* Values, #Features -> #Objective &];
I had never seen this "at star" notation before, so I looked it up, and discovered it was called Composition
(@*
). Now I know for Classify
that it can specify several methods, however, written like this, it seems that Mathematica goes through several methods before determining the best to use.
My issue is this: I would like to specify the method, however I do not know enough to figure out how to rewrite this line to do so. I tried
cfun = titUnclass["Train", Classify[Values, Method -> "DecisionTree"], #Features -> #Objective &];
and
Composition[Classify][Values]
but received the error (for both)
Classify::bdfmt: Argument Values should be a rule, a list of rules, or an association.
If someone could point me in the right direction for tackling this, it would be greatly appreciated.
FullForm[Classify @* Values]
. Then, look at the result of(f @* g)[x]
. $\endgroup$Classify[Values[stuff]]
, which you want to modify toClassify[Values[stuff], Method -> "DecisionTree"]
. Since you're calling it inside aDataset[]
, you'd need to use#
and&
somewhere in there. $\endgroup$cfun = titUnclass["Train", (Classify[#,Method->"DecisionTree"]&)@*Values, #Features -> #Objective &];
work? $\endgroup$