- Analyze Time Series Data : https://www.mathworks.com/help/releases/R2024b/stats/time-series-regression-of-airline-passenger-data.html
- Manually Perform Time Series Forecasting Using Ensembles of Boosted Regression Trees : https://www.mathworks.com/help/releases/R2024b/stats/time-series-forecasting-using-ensemble-of-boosted-regression-trees.html
- Model and Simulate Electricity Spot Prices Using the Skew-Normal Distribution : https://www.mathworks.com/help/releases/R2024b/econ/model-and-simulate-electricity-spot-prices-using-skew-normal-distribution.html
Is it possible to make Machine Learning model to predict multiple outputs with Statistics and Machine Learning Toolbox?
54 次查看(过去 30 天)
显示 更早的评论
I'd like to create a model to predict two output signals based on the following seven input signals, by using Statistics and Machine Learning Toolbox.
This csv is a the data (about 4,200 rows) used as training data.
This data is a time series every 0.025 seconds.
I think the model type is Regressin model if you create a model from this data.
(Data type of each Signal is double type.)
Input Signals:
- V_TGT_Vehicle
- P_DCDC_PNT_W
- P_HVAC_PNT_W
- SOC_BT_Hi_PNT_per
- open_accel_Driver_per
- open_break_Driver_per
- w_MG_PNT_radps
Output Signals:
- trq_MG2_tgtCalc1
- trq_MG2_tgtCalc2
I've been going through Statistics and Machine Learning Toolbox documentation, I'm not sure if it's possible to create a machine learning model like above.
I'd like to export the model as Simulink block.
Do you have any ideas?
How do I make this with Statistics and Machine Learning Toolbox?
0 个评论
回答(2 个)
Jacob Mathew
2024-9-25,3:35
Hey 翼,
The Statistics and Machine Learning Toolbox deals with classical machine learning models like linear regression and decision tree ensemble approaches which deal with a single output. If there are any data preprocessing or transformation which allows single parameter output for the dataset then the following examples are worth exploring:
However, if you have require the output to have two signals, then you will require the Deep Learning Toolbox to create regression neural networks. The link to the Toolbox is :
Refer to the following example to get started with Time Series Forecasting:
Once the model has been trained, it can be exported using the exportNetworkToSimulink function. The link to the function’s documentation is below:
3 个评论
Jacob Mathew
2024-9-26,4:57
You can compare the requirements of both Toolboxes at the link belo. There is dropdown where you can check the requirements for any Toolbox you may need to use as well:
In regards to creating the a model to predict 2 outputs, refer to the Time Series Forecasting example in Deep Learning Toolbox mentioned above. A snippet from the example shows that it has more than one output, which is suitable for your requirement:
Yifeng Tang
2024-9-30,23:52
Using Regression Learner App, you can build a regression model for EACH of the outputs. That is to say you need to build TWO models. The app support saving the resulting regression model for use in Simulink for newer versions. Looks like you are using R2024b, so it should be OK.
Here is an example of brining one regression model to Simulink: https://www.mathworks.com/help/stats/predict-responses-using-regression-gp-predict-block.html. You just need to use two of this.
Here are examples of similar workflow for other types of models: https://www.mathworks.com/help/stats/examples.html?category=code-generation&s_tid=CRUX_topnav
You can also do this using MATLAB Function in Simulink. Here is an example: https://www.mathworks.com/help/stats/predict-class-labels-using-matlab-function-block.html. The class label model can be replaced with any regression model. You can modify the MATLAB function to accept multiple regression models and produce multiple outputs. However, each regression model is multi-input-single-output.
4 个评论
Yifeng Tang
2024-10-4,15:18
Are you able to save the "net" variable, which is the trained model, to a .mat file and share that file? I can take a look and see if there is a way to embed that into Simulink. I think it's do-able.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!