Skip to content

Commit

Permalink
added back compatable constructor to NaiveBayesModel to fix MIMA test…
Browse files Browse the repository at this point in the history
… failure
  • Loading branch information
leahmcguire committed Mar 2, 2015
1 parent 5a4a534 commit b61b5e2
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class NaiveBayesModel private[mllib] (
val theta: Array[Array[Double]],
val modelType: NaiveBayesModels) extends ClassificationModel with Serializable with Saveable {

def this(labels: Array[Double], pi: Array[Double], theta: Array[Array[Double]]) =
this(labels, pi, theta, NaiveBayesModels.Multinomial)

private val brzPi = new BDV[Double](pi)
private val brzTheta = new BDM(theta(0).length, theta.length, theta.flatten).t

Expand Down

0 comments on commit b61b5e2

Please sign in to comment.