Re: Spark ML Random Forest output.

2015-12-05 Thread Eugene Morozov
Benjamin, thanks a lot! -- Be well! Jean Morozov On Sat, Dec 5, 2015 at 3:46 PM, Benjamin Fradet wrote: > Hi, > > To get back the original labels after indexing them with StringIndexer, I > usually use IndexToString >

Re: Spark ML Random Forest output.

2015-12-05 Thread Benjamin Fradet
Hi, To get back the original labels after indexing them with StringIndexer, I usually use IndexToString to retrieve my original labels like so: val labelIndexer = new StringIndexer()

Re: Spark ML Random Forest output.

2015-12-05 Thread Eugene Morozov
Vishnu, thanks for the response. The problem is that I actually do not have index labels, they are hidden in the dataframe as a metadata. And anyone, who'd like to use that have to apply an ugly hack. The issue might be even worse in case I serialize my model into a file for a delayed use. When

Re: Spark ML Random Forest output.

2015-12-04 Thread Vishnu Viswanath
Hi, As per my understanding the probability matrix is giving the probability that that particular item can belong to each class. So the one with highest probability is your predicted class. Since you have converted you label to index label, according the model the classes are 0.0 to 9.0 and I

Spark ML Random Forest output.

2015-12-04 Thread Eugene Morozov
Hello, I've got an input dataset of handwritten digits and working java code that uses random forest classification algorithm to determine the numbers. My test set is just some lines from the same input dataset - just to be sure I'm doing the right thing. My understanding is that having correct