Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am using SSE R plug in for a decision tree in Qlik sense.
In the sample qvf, the decision tree could be successfully generated by:
R.ScriptAggrExStr('SNSN',' library(rpart); library(partykit); library(d3r); library(grid); library(jsonlite); d3_party(rpart(survived ~ ., data=q, method="class")); ', sex, pclass, age_b, survived)
Now I want to use the generated decision tree to get the prediction result in the "Table", so I tried to use the code below:
R.ScriptEvalExStr('SNSN',' library(rpart); library(partykit); library(d3r); library(grid); library(jsonlite); model<-rpart(survived ~ ., data=q, method="class"); predict(model,type="class"); ' , sex, pclass, age_b, survived)
But it did not work, and SSEtoRserve.exe was saying:
Error: variables 'sex', 'pclass', 'age_b' were specified with different types from the fit
Any one with some ideas about this?
Thanks in advance.
Hello,
You expect SNSN. Can you change the respective number variables in:
-->num(pclass) as pclassNumber
-->num(survived) as survivedNumber
/Christos K.
Hello,
You expect SNSN. Can you change the respective number variables in:
-->num(pclass) as pclassNumber
-->num(survived) as survivedNumber
/Christos K.