0

Like the figure below, the distribution of the predicted values is different from ground truth - y_test.
Can I fit the distribution of the predicted values to the distribution of all data?
Here are some pseudo data.

import numpy as np
import seaborn as sns
y_test = np.random.gamma(2, 2, 1000)
y_predict = np.random.normal(2, 2, 1000)
sns.distplot(y_test)
sns.distplot(y_predict)

enter image description here

Dawei
  • 1,046
  • 12
  • 21
  • 1
    You could use histogram matching, typically it is used for images, but it works for 1d distributions as well, see foe example this https://stackoverflow.com/questions/32655686/histogram-matching-of-two-images-in-python-2-x – Anvar Kurmukov Aug 24 '20 at 08:26
  • @AnvarKurmukov Great! That is what I want. – Dawei Aug 24 '20 at 08:33

0 Answers0