How to draw a linear regression plot?

Hi everyone.
I trained LSTM network for forecasting price.I want to draw a plot like the one below for the actual and predicted values and get R-Squared value. Which command can I use to do this?Please help me.Thanks

 Respuesta aceptada

Kevin Holly
Kevin Holly el 14 de Oct. de 2021

0 votos

You can use fitlm.

1 comentario

Nazila Pourhajy
Nazila Pourhajy el 14 de Oct. de 2021
But when I use this command to plot;I get this result as below:
Do you know,why?

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 14 de Oct. de 2021

Comentada:

el 14 de Oct. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by