I have an input file with categorical variable. To convert these to numbers, I am using "Category to Number (Apply)" node. This node requires two inputs - date file and PMML document for value mapping. The problem I am facing is Knime is throwing the following error:
ERROR Category To Number (Apply) 0:11 Execute failed: The PMML modelis not complete. Missing element in InlineTable.
Can not figure out why this error. I am attaching the source data fie (train3.csv), pmml file (as.pmml). Appreciate help from the forum.
the Category to Number (apply) node is typically used to apply to a different dataset the same mapping of a previous Category to Number node. The input PMML model to the former is usually the output from the latter.
Did you try using the Category to Number node directly? You seem to have only 1 categorical variable in your data with two possible values, so it shouldn't be that much of a problem to configure it properly.
Thanks for the reply.
The sample files I have shared is for a proof of concept. Hence it is simplified and has got only one categorical variable. In actual file, I have more than 50 categorical variables. The values of these variables are shared i.e. for example categorical variable1 has values A, B and C; and variable2 has values B, C, D and E. Therefore when I convert A, B, C, D and E to number, I need to convert the values consistently for both variables. Hence I tried to use Category to Number (apply) node.
Since the number of variables are more than 50, if I use Category to number node, I need to repeat the same node 50 times (as it work for only one column in my understanding). I guess that is not the right way.
please see the attached workflow which takes a slightly different approach. It's fully commented.
See whether that solves your needs, otherwise feel free to post again here.
I am indebted for your help. Unfortunately, I can not import a knwf file. Is it possible to package the workflow as zip ? My knime version is 3.1.1.