Clear Filters
Clear Filters

Regression of a four variable function

3 views (last 30 days)
Murat Muhammet Dülger
Murat Muhammet Dülger on 25 Mar 2021
Answered: Aditya Patil on 30 Mar 2021
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 Comment
John D'Errico
John D'Errico on 25 Mar 2021
Edited: John D'Errico on 25 Mar 2021
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.

Sign in to comment.

Answers (1)

Aditya Patil
Aditya Patil on 30 Mar 2021
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.


Community Treasure Hunt

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

Start Hunting!