Multiple Input Multiple Output Gaussian Regression Model

24 views (last 30 days)
Is there any Multiple Input Multiple Output Gaussian Regression Model function in matlab?
Or, should i estasblish it myself?

Answers (1)

Ayush
Ayush on 21 Aug 2025
Yes, MATLAB provides a function called fitgmdist that can be used to create a Multiple Input Multiple Output (MIMO) Gaussian regression model. This function is part of the Statistics and Machine Learning Toolbox.
Here's an example of how you can use fitgmdist to create a MIMO Gaussian regression model:
% Generate random data for demonstration
X = randn(100, 2); % Input variables
Y = X(:, 1) + 2*X(:, 2) + randn(100, 1); % Output variables
% Fit MIMO Gaussian regression model
numComponents = 2; % Specify the desired number of Gaussian components as an integer
model = fitgmdist(X, numComponents);
Warning: Failed to converge in 100 iterations for gmdistribution with 2 components
% Predict using the trained model
X_new = randn(10, 2); % New input data for prediction
Y_pred = posterior(model, X_new); % Predict the output variables
% Display the predicted output
disp(Y_pred);
0.1455 0.8545 0.2077 0.7923 0.4041 0.5959 0.0331 0.9669 0.2001 0.7999 0.0259 0.9741 0.3439 0.6561 0.1129 0.8871 0.0253 0.9747 0.3163 0.6837
Also, fitgmdist is a clustering method in MATLAB. It is used to fit a Gaussian mixture model to a dataset.
You can read more about fitgmdist function here in the official documentation: https://www.mathworks.com/help/stats/fitgmdist.html
Hope it helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!