Gradient Boost trees learner - target column

hi,

Newbie here. in the “Gradient Boosted Trees Learner”, don’t why the only the string columns are shown in the target column dropdown. Why integer columns are not shown? In addition, there is an error message “Target column ‘…workspace’ does not exist or is not of the correct type”. Not sure what mistake I make.

Please help. Thanks,
Sam

Hi @sammuelsum,

there are only strings shown in the target column because you use a classification decision tree. If you would like to use an integer value for classification you would have to cast it beforehand to string. You can use the number to string node.
If you would like to do a regression model you would have to use:
image

As for the error I would have to get a copy of your workflow and your data to look into it.

Best Regards,

Paul

3 Likes

hi Paul,

Thanks so much. Oh it works a bit different for KNIME. I thought usually you need to convert string to number for machine learning such as working in jupyter notebook. Attached is the workflow and data.

Thanks,
Sam
workflow


knime_data.xlsx (10.8 KB)
knime project and data

Hi @sammuelsum,

the problem was/is that you have a flow variable in den gradiant tree for the target column:

If you remove it works and there is no more error.

Best regards,

Paul

3 Likes

hi Paul

Thanks very much. Your help is much appreciated. I deleted the variable, but still have the same error. Not sure need to refresh or not. I deleted the node and created it again without the variable. Then, it works.

Thanks very much,
Sam

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.