cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Reproduce Result scikit-learn random forest

umair
New Contributor

I'm running some machine learning experiments in databricks. For random forest algorithm when i restart the cluster, each time the training output is changes even though random state is set. Anyone has any clue about this issue?

Note : I tried the same algorithm with same code in anacoda enviroment in my local machine, there is no different in the result even though I restart the machine.

1 ACCEPTED SOLUTION

Accepted Solutions

-werners-
Esteemed Contributor III

RF is non-deterministic by it´s nature.

However as you mentioned you can control this by using random_state.

This will guarantee a deterministic result ON A CERTAIN SYSTEM, but not necessarily over systems.

SO has a topic about this, check it out, very interesting.

View solution in original post

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @umair ramzan​ ! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers in the community have an answer to your question first. Or else I will get back to you soon. Thanks.

-werners-
Esteemed Contributor III

RF is non-deterministic by it´s nature.

However as you mentioned you can control this by using random_state.

This will guarantee a deterministic result ON A CERTAIN SYSTEM, but not necessarily over systems.

SO has a topic about this, check it out, very interesting.

Kaniz
Community Manager
Community Manager

Hi @umair ramzan​ , Were you able to reproduce the result using scikit-learn random forest?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.