@AeroG Thanks for the question. You are correct that when using Automated ML in Azure Machine Learning, there is no explicit option to perform multivariate regression. However, you can still use Automated ML to train a model that predicts multiple target variables simultaneously.
One way to achieve this is to concatenate your target variables into a single column and use that as the target variable for regression. For example, if you have two target variables y1
and y2
, you can concatenate them into a single column y
with the following code:
import pandas as pd
# Load your data into a pandas DataFrame
data = pd.read_csv('your_data.csv')
# Concatenate the target variables into a single column
data['y'] = data['y1'].astype(str) + ',' + data['y2'].astype(str)
# Drop the original target variables
data = data.drop(['y1', 'y2'], axis=1)
# Save the modified data to a new CSV file
data.to_csv('your_modified_data.csv', index=False)
Then, when you run Automated ML, you can specify the y
column as the target variable for regression. The resulting model will predict both y1
and y2
simultaneously.
Keep in mind that this approach assumes that the target variables are correlated and can be predicted jointly. If the target variables are not correlated, it may be better to train separate models for each target variable.