I have fit KDEs in two different data sources and would like to get to a "score" that estimates how likely a new sample is to belong to data source 1 or 2.
Assuming I fit the KDEs with something like this:
data1 = np.random((5000))+1.
data2 = np.random((5000))+2.
kde1 = scipy.stats.gaussian_kde(data1)
kde2 = scipy.stats.gaussian_kde(data2)
and I have a new sample to be evaluated:
sample = 1.5
How do I get to a score telling me how likely this sample is to belong to either of those kdes? Ideally, I would have a score where "0." is absolute certainty that the sample belongs to kde1 and "1." is absolute certainty that sample belongs to kde2, but any numerical range is fine if easily interpretable.