class GaussianNaiveBayesModel implements IgniteModel<Vector, Double>, Exportable<GaussianNaiveBayesModel>, Serializable {

    @Override public Double predict(Vector vector) {
        int k = classProbabilities.length;

        double maxProbability = .0;
        int max = 0;

        for (int i = 0; i < k; i++) {
            double p = classProbabilities[i];
            for (int j = 0; j < vector.size(); j++) {
                double x = vector.get(j);
                double g = gauss(x, means[i][j], variances[i][j]);
                p *= g;
            }
            if (p > maxProbability) {
                max = i;
                maxProbability = p;
            }
        }
        return labels[max];
    }

    public  GaussianNaiveBayesModel(double[][] means, double[][] variances,
        double[] classProbabilities, double[] labels, GaussianNaiveBayesSumsHolder sumsHolder);

}