I would like to run a simple python code (Logistic Regression) inside a KNIME workflow but it fails.
Although the script works fine in Anacoda (I connected the KNIME workflow with Anaconda), when I try to run the same script inside KNIME, the code fails.
I get the following error:
“This solver needs samples of at least 2 classes in the data, but the data contains only one class: ‘1’”
(I have 2 classes, 0 & 1)
After spending a lot of time in “googling” this, it seems that in some cases, there is a bug in “sklearn”. Tried to fix this by shuffling the dataset but still the same error.
The question here is, why this does not fail in Anacoda, but only inside KNIME (same dataset, same code, same environment).
Could someone help me with this?