RfastOfficial / Rfast

A collection of Rfast functions for data analysis. Note 1: The vast majority of the functions accept matrices only, not data.frames. Note 2: Do not have matrices or vectors with have missing data (i.e NAs). We do no check about them and C++ internally transforms them into zeros (0), so you may get wrong results. Note 3: In general, make sure you give the correct input, in order to get the correct output. We do no checks and this is one of the many reasons we are fast.
139 stars 19 forks source link

Setting the seed in knn.cv #56

Closed merolagio closed 2 years ago

merolagio commented 2 years ago

Hi, thanks for the great package.

I would like to be able to set the seed in knn.cv.

I modified the generateFolds() function changing at line 6

set.seed(1234) to set.seed(seed)

This assumes that seed can either be logical or numeric (if seed = TRUE -> set.seed(1)) and it works like a charm.

I hope this feature can be added in the next release

Many thanks

statlink commented 2 years ago

I fixed it Merolagio.

You will see this in the next update.

merolagio commented 2 years ago

great, thanks