On Tue, Apr 22, 2014 at 8:30 PM, Padarn Wilson <
pad...@gmail.com> wrote:
>
>
> On Wednesday, April 23, 2014 6:35:16 AM UTC+10, jseabold wrote:
>>
>> On Tue, Apr 22, 2014 at 4:31 PM, baba <
esse...@gmail.com> wrote:
>> > For this purpose you'd need to load the data I'm using, so I've attached
>> > a
>> > text file.
>> >
>> > In [1]: data = np.loadtxt('out.txt', usecols=(1,))
>> >
>> > In [2]: data = np.log10(data)
>> >
>> > In [3]: entries, edges = np.histogram(data, 80, normed=True)
>> >
>> > In [4]: kde = sm.nonparametric.KDEUnivariate(entries)
>> >
>> > In [5]: kde.fit()
>> >
>> > In [6]: pyplot.plot(kde.support, kde.density)
>> >
>> > The plot is not where I'd expect to be, all values are in the range 16.
>> > -
>> > 18.5, and the peak at 17. more or less.
>>
>> Well you're taking the KDE of entries not data. You should pass data
>> to KDEUnivariate not the normed bin values from histogram.
>>
>
> I think this is almost certainly the problem. However, if you really want to
> evaluate this estimated density over a different support you can use the
> kde.evaluate() function to evaluate it over whatever support you like.
>