You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Andy Davidson <An...@SantaCruzIntegration.com> on 2016/01/13 03:47:25 UTC

ml.classification.NaiveBayesModel how to reshape theta

I am trying to debug my trained model by exploring theta
Theta is a Matrix. The java Doc for Matrix says that it is column major
formate

I have trained a NaiveBayesModel. Is the number of classes == to the number
of rows? 

int numRows = nbModel.numClasses();

int numColumns = nbModel.numFeatures();



Kind regards



Andy



Re: ml.classification.NaiveBayesModel how to reshape theta

Posted by Andy Davidson <An...@SantaCruzIntegration.com>.
Thanks

Andy



From:  Yanbo Liang <yb...@gmail.com>
Date:  Wednesday, January 13, 2016 at 6:29 AM
To:  Andrew Davidson <An...@SantaCruzIntegration.com>
Cc:  "user @spark" <us...@spark.apache.org>
Subject:  Re: ml.classification.NaiveBayesModel how to reshape theta

> Yep, row of Matrix theta is the number of classes and column of theta is the
> number of features.
> 
> 2016-01-13 10:47 GMT+08:00 Andy Davidson <An...@santacruzintegration.com>:
>> I am trying to debug my trained model by exploring theta
>> Theta is a Matrix. The java Doc for Matrix says that it is column major
>> formate
>> 
>> I have trained a NaiveBayesModel. Is the number of classes == to the number
>> of rows? 
>> 
>> int numRows = nbModel.numClasses();
>> 
>> int numColumns = nbModel.numFeatures();
>> 
>> 
>> 
>> Kind regards
>> 
>> 
>> 
>> Andy
> 



Re: ml.classification.NaiveBayesModel how to reshape theta

Posted by Yanbo Liang <yb...@gmail.com>.
Yep, row of Matrix theta is the number of classes and column of theta is
the number of features.

2016-01-13 10:47 GMT+08:00 Andy Davidson <An...@santacruzintegration.com>:

> I am trying to debug my trained model by exploring theta
> Theta is a Matrix. The java Doc for Matrix says that it is column major
> formate
>
> I have trained a NaiveBayesModel. Is the number of classes == to the
> number of rows?
>
> int numRows = nbModel.numClasses();
>
> int numColumns = nbModel.numFeatures();
>
>
> Kind regards
>
>
> Andy
>