Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML00 ex01 (correction): Wrong examples #233

Open
6 tasks
mli42 opened this issue Aug 17, 2022 · 4 comments · May be fixed by #234
Open
6 tasks

ML00 ex01 (correction): Wrong examples #233

mli42 opened this issue Aug 17, 2022 · 4 comments · May be fixed by #234
Labels
enhancement New feature or request fixme

Comments

@mli42
Copy link

mli42 commented Aug 17, 2022

  • Day: 05
  • Exercise: 01 (TinyStatistician)

The correction page gives this test:

import TinyStatistician as ts
data = [42, 7, 69, 18, 352, 3, 650, 754, 438, 2659]
epsilon = 1e-5
err = "Error, grade 0 :("
tstat = ts.TinyStatistician()
assert abs(tstat.mean(data) - 499.2) < epsilon, err
assert abs(tstat.median(data) - 210.5) < epsilon, err
quartile = tstat.quartile(data)
assert abs(quartile[0] - 18) < epsilon, err
assert abs(quartile[1] - 650) < epsilon, err
assert abs(tstat.percentile(data, 10) - 3) < epsilon, err
assert abs(tstat.percentile(data, 28) - 18) < epsilon, err
assert abs(tstat.percentile(data, 83) - 754) < epsilon, err
assert abs(tstat.var(data) - 654661) < epsilon, err
assert abs(tstat.std(data) - 809.11) < epsilon, err

But my code (which is right with the subject's examples) has different result for quartile/percentile/var/std.
(Apparently an issue for var and std already exist)

Definition of done

  • correction of the formula of sample variance and standard deviation.
  • fix of the examples according to update of the formula in the subject and scale
  • investigate issue with quartile and percentile methods
  • fix examples in the subject and in the scale

Fixed on:

  • Github
  • Gitlab
@mli42 mli42 added the fixme label Aug 17, 2022
@mli42
Copy link
Author

mli42 commented Aug 17, 2022

Ping @madvid

@ezalos ezalos added the enhancement New feature or request label Aug 17, 2022
@madvid madvid linked a pull request Aug 21, 2022 that will close this issue
@madvid
Copy link
Collaborator

madvid commented Aug 21, 2022

fix en cours (PR sont open), les valeurs sont corrigés sur la scale de correction et les formules de la variance et de la deviation standard dans le cadre d'un échantillon sont corrigées aussi.

Je me mets sur le pb de quartile et percentile

@madvid
Copy link
Collaborator

madvid commented Aug 21, 2022

Du coup @mli42, j'ai update la partie sur les percentiles (sujet + exemples et correction).
Pour plus qu'il y ait de débat, on demande comme le comportement par défaut numpy (interpolation entre les 2 quantiles les plus proches, les valeurs au sein de la liste).
Parce qu'il y a plusieurs définition et que l'erreur venait justement de définitions différentes

@mli42
Copy link
Author

mli42 commented Aug 21, 2022

Super ! Merci bcp @madvid 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants