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 <flyingfromch...@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-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to