LinearRegression with 20 columns features ~ Label

I am pretty new to Matlab so sorry if this is a newbie question: i have a dataframe with 20features and the last column my label. How do i fit a linearModel with this dataframe using all features and also one features at a time and plot the graphs. i need something like this:
fitlm(data, 'LABEL', 'FEATURE1')
fitllm(data, 'LABEL', 'FEATURE2')....untill FEATURE20
Then i want to plot this 20 graphs...
How can i do it?
Thanks

Respuestas (1)

Star Strider
Star Strider el 27 de Mzo. de 2021

0 votos

If the data are in a table, it is possible to use the Wilkinson notation, as described in the doeucmnetaion section Fit Linear Regression Using Data in Table . That is the closest I can find to the sort of syntax described.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 27 de Mzo. de 2021

Respondida:

el 27 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by