Regression of a four variable function
3 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/562821/image.png)
Hi, I have a data sheet as attached and I need to find the function y = f(x1, x2, x3, x4). As a beginner I have no clue and I couldn't get anywhere other than introducing the data to MATLAB. How should I proceed to get this function?
1 个评论
John D'Errico
2021-3-25
编辑:John D'Errico
2021-3-25
First of all, pasting in your data asa picture of numbers makes it impossible to help you with that data. Do we need to type in your numbers by hand? Why would you want to make it MORE difficult for someone to help you, when you could trivially have psted in the data as text, or attached as a .mat file.
Next, what function do you expect here? You cannot simply know the function, and there are infinitely many functions we might guess. Of course, given as little data as you have, you can probably fit this with at most a linear function in each variable, plus a constant.
And, yes, I might just tell you generally what you might do. But if I do that, I would be foolish, as I would first want to look at your data before I suggested any model.
回答(1 个)
Aditya Patil
2021-3-30
You can use the statistics and machine learning toolbox for regression. To get started, check the regression doc page. I recommend starting with the Regression Learner App, as it is the easiest way.
Depending on what your goal is, different models might be appropriate for the task. For example, if you want a simple explainable model, you can use linear regression. If you want a more robust model, while sacrificing some of the explainability, you can use support vectors, Tree Ensembles, or Neural Networks. If instead you want to get a distribution for each of the predicate, you need to use bayesian regression techniques.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!