/** * Predict the class of an instance. * * @param x the instance to be classified. * @return the predicted class label. For MULTINOMIAL and BERNOULLI models, * returns -1 if the instance does not contain any feature words. */ public int predict(SparseArray x) { return predict(x, null); }
/** * Predict the class of an instance. * * @param x the instance to be classified. * @return the predicted class label. For MULTINOMIAL and BERNOULLI models, * returns -1 if the instance does not contain any feature words. */ @Override public int predict(double[] x) { return predict(x, null); }