0

I'm trying to get a score that tells me the probability of a value belongs to distribution or not. Score that maybe i wrongly called likelihood. For example:

A = [4,5,5,6,4,16,15,14,15,16]
b = 5

In this case my score should be low and i want a low score even if b = 15 otherwise I would an high score if b = 10 or worse if b = 100.

I tried to use Kernel Density to fit a mixture of gaussians on my data A and then I tried to get a score for b. But it doesn't seem what I really want.

kde = KernelDensity(kernel='gaussian').fit(A)
score = kde.score(b)

Do you have any suggestion to model the problem in a better way ?

EDIT: A is a list of value generates from neural network and b is the real value that I'm trying to predict. KernelDensity doesn't seem good because when A and b are for example:

A = [40,50,50,60,40,160,150,140,150,160]
b = 50

the score is higher than the first case while it should be the same.

  • Hi, can you explain what did you get with this and why it does not fit your expectation ? – Dorian Turba Jan 15 '19 at 10:20
  • A is the whole probability distribution ? or is it a sample ? Are you talking about a continuous or a discrete distribution ? You should provide more explanation. This question sounds like a questions in Statistics rather than programming – Oleg Jan 15 '19 at 10:29
  • I edited the question, A it's a list of samples from the distrubition that i'm trying to rebuild. – Roberto Landi Jan 15 '19 at 10:39

0 Answers0