Class NaiveBayesClassifierLevelDBLaplacedImpl

    • Constructor Detail

      • NaiveBayesClassifierLevelDBLaplacedImpl

        public NaiveBayesClassifierLevelDBLaplacedImpl​(String classifierName,
                                                       String[] categories,
                                                       String rootPathWritable,
                                                       double alpha,
                                                       boolean variant)
                                                throws PersistentClassifierException
        Create a Naive Bayes Classifier implementation with Laplace smoothing and LevelDB as key/value store.
        Parameters:
        classifierName - The classifier name
        categories - The classification categories
        rootPathWritable - A writable path for LevelDB storage
        alpha - The laplace Alpha, usually 1.0
        variant - True for variant likelyhood[i] = 1d * ((categoryCount + alpha) / (globalCount + globalCountCategories * alpha)) * product;
        Throws:
        PersistentClassifierException - The persistence error and cause
      • NaiveBayesClassifierLevelDBLaplacedImpl

        public NaiveBayesClassifierLevelDBLaplacedImpl​(String classifierName,
                                                       String[] categories,
                                                       String rootPathWritable)
                                                throws PersistentClassifierException
        Create a Naive Bayes Classifier implementation with Laplace smoothing and LevelDB as key/value store, with defaults ALPHA=1 and VARIANT=false
        Parameters:
        classifierName - The classifier name
        categories - The classification categories
        rootPathWritable - A writable path for LevelDB storage
        Throws:
        PersistentClassifierException - The persistence error and cause