Bug: LinearTransform shift
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
Start by reading Statistics.Distribution.Transform and the implementations of mean, maybeMean, entropy, maybeEntropy, and complCumulative; the issue does not name test files. Check how shifted and scaled exponential distributions behave, including negative scales and far-tail complements. Done means the reported mean is 4.0 and the listed scale, entropy, and complement cases behave correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, I was working on some statistical exercises in Haskell. It's been a while since I took a course in the topic so I am a bit rusty.
While working on the assignments I needed to use shifted linear transforms of exponential distributions and things looked odd. I am using latest statistics-0.16.5.0
import Statistics.Distribution
import Statistics.Distribution.Exponential
import Statistics.Distribution.Transform
e = exponential 1 -- E(1): mean 1, variance 1, entropy 1
-- >>> mean (LinearTransform 0 3 e)
-- 1.0
-- expected: 4.0
I am able to produce a fix for that, but since I have some blind spots I used LLM to analyze the code and it report other issues:
meanandmaybeMeandrop the scaleentropyandmaybeEntropyignore the scale- A negative scale returns the complement of the right answer
complCumulativeis not defined, so the far tail is lost
If LLM contributions are welcome the following branch can be used https://github.com/haskell/statistics/compare/master...bcardiff:statistics:fix-linear-transform. Let me know if you want me to open a PR with that.
- Ngôn ngữ chính
- Haskell
- Star
- 309
- Fork
- 77
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của haskell/statistics
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
haskell/statistics#235 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
haskell/statistics#237 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
haskell/statistics#236 ·
-
Test failure Pearson correlationĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
haskell/statistics#231 · 3 bình luận ·
-
test failure in "1 - CDF match"Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
haskell/statistics#215 ·
Tất cả issue của haskell/statistics
Issue tương tự
-
bug dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
alunduil/network-arbitrary#251 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
pkg:crucible-mir type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Heroes in statisticsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100