Importing jupyter codes to python script

I wanted to load isolation forest code in python script. I played with isolation forest node already and it went well. But next task given to me is to load isolation forest code in python script and to compare the results. How can I copy my jupyter code in python script? Can you help

1 Like

I have made a sample workflow here that works fine with Python script and Isolation forest, used the sample code from the documentation
isolation_forest.knwf (15.2 KB) IsolationForest example — scikit-learn 0.24.2 documentation

Please let me know if this is useful.


Thankyou for the code.
But it shows the error as follows
No module named ‘sklearn’
Traceback (most recent call last):
File “”, line 5, in
ModuleNotFoundError: No module named ‘sklearn’