Multiple Objective Regression Using Python
Multi-objective regression refers to the situation where the model needs to predict multiple output variables at the same time, also known as multi-output regression. In this case, our dataset contains multiple target variables instead of a single target variable. This article will introduce how to use Python for multi-objective regression, and provide the corresponding source code.
- data preparation
First, we need to prepare a dataset with multiple target variables. In this example, we will use the Boston house price dataset from the sklearn library. The dataset contains 13 input features and 3 output target variables (i.e. median house price, violent crime rate, and residential tax rate). Here is the code to load the dataset:
from sklearn.datasets import load_boston
boston = load_boston()
X, y = boston.data, boston.target
- model training
Next, we will use Multi-Task Elast