|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjncc20.NaiveClassifier.Feature
protected 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 double[][] |
conditionalFreq
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 |
private double[] |
uncondFrequencies
Simple uncondFrequencies, not conditioned. |
Constructor Summary | |
---|---|
NaiveClassifier.Feature(java.lang.String SuppliedName,
double[][] SuppliedFrequencies,
int[] SuppliedMissing)
Constructor that copies the name and the conditionalFreq table, and computes the log-probabilities table |
Method Summary | |
---|---|
(package private) double |
getClassCountAsMar(int ClassIdx)
|
double[] |
getCondFrequencies(int ClassIdx)
|
double[][] |
getConditionalFreq()
|
(package private) double |
getConditionalFrequencies(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()
|
double[] |
getUncondFrequencies()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final double[][] conditionalFreq
private final double[][] logProbability
private final int[] missing
private final java.lang.String name
private final double[] uncondFrequencies
Constructor Detail |
---|
NaiveClassifier.Feature(java.lang.String SuppliedName, double[][] SuppliedFrequencies, int[] SuppliedMissing)
Method Detail |
---|
double getClassCountAsMar(int ClassIdx)
public double[] getCondFrequencies(int ClassIdx)
public double[][] getConditionalFreq()
double getConditionalFrequencies(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()
public double[] getUncondFrequencies()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |