Data Pre-Processing With Orange tool
Preprocessing data is very crucial and import step in any machine learning project. For Data preprocessing is the process of transforming raw data into an understandable format.
Data Preprocessing includes techniques like:
- Feature Scaling
- Standardization
- Encoding
- Discritization
- Randomization
- Handling missing values(Imputation)
Now we’re all set to perform preprocessing.
For performing preprocessing we’ll use preprocess widget.
Let’s create workflow for it.
Here I’m importing train_x and train_y and merging them and select Target variable and finally adding preprocess widget to it.
Now we’ll perform all task in preprocess widget.
Feature Scaling
Feature scaling is a scaling technique in which values are shifted and rescaled so that they end up ranging between 0 and 1 or maximum absolute value of each feature is scaled to unit size.
Standardization
Standardization means making distribution to mean 0 and standard deviation 1.
Let’s select that option in preprocess widget.
Encoding
For performing encoding you can use Continuize Discrete Variables option.
Discritization
Discretization methods are used to chop a continuous function (i.e., the real solution to a system of differential equations in CFD) into discrete function, where the solution values are defined at each point in space and time. Discretizatin simply refers to the spacing between each point in your solution space.
In preprocess widget you there is a option called Discretize Continuous Variables.
You can also achieved same results using python script but there you have to hardcode the things you want to achieve.
Randomization
You can achieved randomization using same preprocess widget. Just seect randomized widget and use builtin options as per your need.
Handling Missing Values
We can handle missing values with preprocess widget in orange.
There are 3 options available.
- Add average or most frequent observation at the place of empty observation.
- Replace with random value from dataset.
- Remove entire instance.
Conclusion
We’ve covered a lot of content in this article about data preprocessing with orange.