|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjncc20.NaiveClassifier.Feature
protected static class NaiveClassifier.Feature
Helper class for Naive Classifiers, that implements Mar and NonMar features. Features are characterized by the bivariate counts of their effective occurrences (Frequencies), by the number of missing data for each output class (Missing) and by the logarithm of conditioned probabilities (LogProbability)
Field Summary | |
---|---|
private int[][] |
frequencies
Counts that correspond to counts-after-dropping-missing for MarFeatures, bivariate count: frequency are computed for each output class and for each class of the feature. |
private double[][] |
logProbability
Logarithm of conditioned probabilities: Log(P(ai|c)) |
private int[] |
missing
How many times the feature is missing, for every output class. |
private java.lang.String |
name
Name |
Constructor Summary | |
---|---|
NaiveClassifier.Feature(java.lang.String SuppliedName,
int[][] SuppliedFrequencies,
int[] SuppliedMissing)
Constructor that copies the name and the frequencies table, and computes the log-probabilities table |
Method Summary | |
---|---|
(package private) int |
getClassCountAsMar(int ClassIdx)
|
(package private) int[][] |
getFrequencies()
|
(package private) int[] |
getFrequencies(int ClassIdx)
|
(package private) int |
getFrequencies(int ClassIdx,
int FeatureClassIdx)
|
(package private) double[][] |
getLogProbability()
|
(package private) double[] |
getLogProbability(int ClassIdx)
|
(package private) double |
getLogProbability(int ClassIdx,
int FeatureValue)
|
(package private) int[] |
getMissing()
|
(package private) int |
getMissing(int OutputClass)
|
(package private) java.lang.String |
getName()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int[][] frequencies
private double[][] logProbability
private int[] missing
private java.lang.String name
Constructor Detail |
---|
NaiveClassifier.Feature(java.lang.String SuppliedName, int[][] SuppliedFrequencies, int[] SuppliedMissing)
Method Detail |
---|
int getClassCountAsMar(int ClassIdx)
int[][] getFrequencies()
int[] getFrequencies(int ClassIdx)
int getFrequencies(int ClassIdx, int FeatureClassIdx)
double[][] getLogProbability()
double[] getLogProbability(int ClassIdx)
double getLogProbability(int ClassIdx, int FeatureValue)
int[] getMissing()
int getMissing(int OutputClass)
java.lang.String getName()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |