IT13122256 Ranawaka R.A.S.M - 1 year ago 96

Python Question

I'm using a linear regression model to predict the weather data for one year. Prediction is done using Python's

`sklearn`

`r value`

0.0919309031356

Coefficients:

[-20.01071429 0. ]

Residual sum of squares: 19331.78

Variance score: -0.23

The problem is that I need to show the accuracy as a percentage. How do I do that? Do I need use a tool to find out the accuracy?

Answer Source

Maybe this question is more complicated than I think, but why not just

```
r = str((r**2) * 100) + '%'
```