Icon

06_​Train_​Machine_​Learning_​Model_​using_​Scikit-learn_​package

Train Python Scikit-learn (sklearn) models in KNIME

This workflow shows how to read the data in as KNIME tables and perform various data manipulations and transformations. Further a classification model is trained using the Python scikit learn library in the Python Script node. At last we evaluate the performance of this classifier.


Read and Transform Data Train the Scikit-learn model Predict and Evaluate Configure the Python Script node for Training Scikit-learnmodelThe Python Script node can be provide with input table or object and it canoutput a table, object or an image based on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Click on the three dots on the node to add an object output portStep 3: Write your script in the "Script" tab and press "execute script" tounderstand if the execution was successful. Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflow uses a node from KNIME Python Integration, which installsPython and a number of pre-defined packages on your system. Supported on KNIME Analytics Platform 4.7 or higher. adult csvuse selected columnsas featuresConvert labelsinto binaryTrain a scikit-learnclassifierPort 0: Train setPort 1: Test setPrediction on test setusing scikit-learn modelEvaluate the model CSV Reader Column Filter Rule Engine Python Script Partitioning Python Script Scorer Read and Transform Data Train the Scikit-learn model Predict and Evaluate Configure the Python Script node for Training Scikit-learnmodelThe Python Script node can be provide with input table or object and it canoutput a table, object or an image based on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Click on the three dots on the node to add an object output portStep 3: Write your script in the "Script" tab and press "execute script" tounderstand if the execution was successful. Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflow uses a node from KNIME Python Integration, which installsPython and a number of pre-defined packages on your system. Supported on KNIME Analytics Platform 4.7 or higher. adult csvuse selected columnsas featuresConvert labelsinto binaryTrain a scikit-learnclassifierPort 0: Train setPort 1: Test setPrediction on test setusing scikit-learn modelEvaluate the model CSV Reader Column Filter Rule Engine Python Script Partitioning Python Script Scorer

Nodes

Extensions

Links