2
$\begingroup$

I just started working with the Mathematica machine learning package. When I use Predict, I can predict only numerical values like

Predict[{"ab"->1, "de"->2}]

Can I predict somehow non numerical values like

Predict[{"ab"->"c", "de"->"f"}]

or this

Predict[{"ab" -> {22, 33}, "de" -> {44, 55}}]

By default it does not work and gives an error message:

Predict:Incompatible variable type (Numerical) and variable value({22,33})

$\endgroup$
1
  • 1
    $\begingroup$ The documentation does not explicitly say that Predict uses methods that only return numerical values, but the implicit message of all the examples is that it is so constrained. $\endgroup$
    – m_goldberg
    Commented Dec 9, 2017 at 2:34

1 Answer 1

1
$\begingroup$

No, Predict is only for regression problems (so should be numerical). Based on your example it looks like you want Classify[] (or with ab -> c maybe SequencePredict[]).

$\endgroup$
1
  • $\begingroup$ Thanks a lot. Classify is not my case. I want to get unknown value, not something already existing. I will check SequencePredict. $\endgroup$
    – Zlelik
    Commented Dec 12, 2017 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.