Bug: LinearTransform shift
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Haskell
- Stelle
- 309
- Fork
- 77
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di haskell/statistics
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
haskell/statistics#235 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
haskell/statistics#237 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
haskell/statistics#236 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
haskell/statistics#231 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
haskell/statistics#215 ·
Tutte le issue di haskell/statistics
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
pkg:crucible-mir type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Heroes in statisticsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GaloisInc/llvm-pretty#211 ·