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

n_sample -> N #113

Closed
hbaniecki opened this issue Apr 21, 2020 · 1 comment · Fixed by #114
Closed

n_sample -> N #113

hbaniecki opened this issue Apr 21, 2020 · 1 comment · Fixed by #114
Labels
maintenance 🔨 Code enhancements, tests and maintenance

Comments

@hbaniecki
Copy link
Member

Following ModelOriented/DALEX#175 I want to deprecate n_samples.
Additionally, @pbiecek why is this sampling using replace?

sampled_rows <- sample.int(nrow(data), n_sample, replace = TRUE)

No such behaviour here:

ndata <- data[sample(1:nrow(data), N),]

@pbiecek
Copy link
Member

pbiecek commented Apr 21, 2020

replace = TRUE means that nrow(data) can be smaller than n_sample (because some observations ill be reused).
On average it shall not make any difference if we use sampling with/without replacement.

@hbaniecki hbaniecki added the maintenance 🔨 Code enhancements, tests and maintenance label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance 🔨 Code enhancements, tests and maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants