spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <so...@cloudera.com>
Subject Re: Does the kFold in Spark always give you the same split?
Date Fri, 30 Jan 2015 17:22:02 GMT
Have a look at the source code for MLUtils.kFold. Yes, there is a
random element. That's good; you want the folds to be randomly chosen.
Note there is a seed parameter, as in a lot of the APIs, that lets you
fix the RNG seed and so get the same result every time, if you need
to.

On Fri, Jan 30, 2015 at 4:12 PM, Jianguo Li <flyingfromchina@gmail.com> wrote:
> Hi,
>
> I am using the utility function kFold provided in Spark for doing k-fold
> cross validation using logistic regression. However, each time I run the
> experiment, I got different different result. Since everything else stays
> constant, I was wondering if this is due to the kFold function I used. Does
> anyone know if the kFold gives you a different split on a data set each time
> you call it?
>
> Thanks,
>
> Jianguo

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message