This topic describes how to use the Binning component to implement the discretization of continuous features.
Prerequisites
A project is created. For more information, see Create a project.
Background information
Feature discretization is a process of converting continuous data into multiple discrete intervals. To implement feature discretization, Machine Learning Platform for AI (PAI) provides the Binning component. This component supports the following binning modes: equal frequency binning, equal width binning, and automated binning.
In this topic, the Read MaxCompute Table component is used to read data from the pai_online_project.iris_data table. Then, the Binning component is used to put the data that is read into different bins. Finally, the Data Conversion Module component is used to convert the original continuous data in the bins into discrete data.
Procedure
- Go to the Machine Learning Studio console.
- Log on to the PAI console.
- In the left-side navigation pane, choose .
- On the PAI Visualization Modeling page, find the project in which you want to create an experiment and click Machine Learning in the Operation column.
- Create an experiment.
- Configure the experiment.
- In the left-side navigation pane, click Components.
- In the navigation tree, click Data Source/Target. Then, drag and drop the Read MaxCompute Table component onto the canvas.
- In the navigation tree, click Financials. Then, drag and drop the Binning and Data Conversion Module components onto the canvas.
- Connect the preceding components.
- Configure component parameters.
- In the top toolbar of the canvas, click Run.
- View the experiment results.
- After the experiment is executed, right-click the Data Conversion Module component on the canvas and select View Data. Then, you can view the discretization results.
- Right-click the Binning component on the canvas and select Binning.
- Click Details in the Action column that corresponds to the feature you want to view. The f1 feature is used in this example.
- Click the Charts tab to view the binning results.
- After the experiment is executed, right-click the Data Conversion Module component on the canvas and select View Data. Then, you can view the discretization results.