I have a model that predicts frequencies. True frequencies are close to 1 therefore the frequencies that predicted are mostly close to 1. Sample frequencies are:
true = [0.9999930241642949,0.9999930128563443,0.9999930160769908,0.9999928480496632,0.9999790561295727,
0.9999930202691384,0.9999924134373198,0.9995322143714916,0.9990997780848302,0.9999441699466823]
prediction = [0.9685569, 0.8430407, 0.93365747, 0.915529, 0.8040398, 0.8197026, 0.8163535,
0.9588296,0.9716148,0.8882043]
However when I plot true frequencies vs predictions I get something like this:
The code I use for plotting:
import pandas as pd
data = pd.DataFrame({
'true': true,
'prediction': prediction,
})
sns.jointplot(x='true', y='prediction', data=data)
import numpy as np
import scipy.stats
r = np.corrcoef(prediction, true)
print(r)
scipy.stats.spearmanr(prediction, true)
But it perhaps not the right way to visualise it. And when I do spearman coorelation I get -0.097. How do you suggest I transform my frequencies? I was thinking of transforming these frequencies so that I can draw a linear regression line between these true and predicted. How do you suggest I can do that?