haskell / haskell/statistics

Statistics.Sample.KernelDensity.Simple is deprecated?

未关闭
#112 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Haskell
星标
309
派生
76
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

I wanted to learn more about this module's deprecation. I want to specify the lower and upper bounds for an estimate, where the lower and upper bounds extend beyond the range of the sample data. I was unable to get the results I want with `Statistics.Sample.KernelDensity.kde_`, but found that `Statistics.Sample.KernelDensity.Simple.estimatePDF` works perfectly. My question is, should `kde_` be able to do everything that `estimatePDF` can? Is there something I need to do to the data I pass into `kde_`? Here's an example:

With the following test data:

```haskell
let demoData = V.fromList $ concat $ zipWith replicate [5, 4, 3, 7] [0..3]
```

The following estimate:

```haskell
-- xValues has 'n' values ranging from 'a' to 'b'.
Stats.estimatePDF Stats.gaussianKernel bw demoData (Points xs)
```

Returns an estimate like this:

![__amby](https://cloud.githubusercontent.com/assets/197051/20458700/b0f45c84-ae79-11e6-8995-dc93cf41bac3.png)

While the following code:

```haskell
Stats.kde_ n a b demoData
```

Returns an estimate like this:

![__amby](https://cloud.githubusercontent.com/assets/197051/20458688/6da22ae2-ae79-11e6-987f-0c216fbd645e.png)

Thanks

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。