pierreroudier / clhs

A R implementation of the conditioned Latin Hypercube Sampling method
12 stars 9 forks source link

Enable mandatory samples #10

Closed BenjaminLouis closed 6 years ago

BenjaminLouis commented 6 years ago

Hi Pierre,

I'm glad my last PR fit your package. I am totally ok with you adding me in the contributor's list in the DESCRIPTION file (Firstname : Benjamin, Name : Louis, email : contact@benjaminlouis-stat.fr). By the way, I found your cost-constrained implementation very interesting (as well as your paper).

Here an other PR with a feature that I used from time to time. It allows the user to give row indexes to target data from x that must be included in the final sample. It can be useful when data have already been measured and you want to incorporate them in a bigger cLHS sampling design. Again, the changes in the code are not significant but I think the feature might interest some users.

Thanks for your feedback and for the package!

BenjaminLouis commented 6 years ago

I forgot to mention that I took the liberty to put the cost of mandatory data to 0 (lines 66-69 of the clhs-data.frame.R file) as I thought these mandatory data shouldn't influence in the cost-constraint (because they will be in the final sample anyway). Fell free to remove this or tell me how this should be handled!

dylanbeaudette commented 6 years ago

This is a great idea @BenjaminLouis, thank you for suggesting it along with an implementation. I can think of several use cases!

pierreroudier commented 6 years ago

@BenjaminLouis Thanks a lot -- that's something I had an ugly, never commited hack for... Thanks for the cleaner/official implementation!