public class SoP extends Object
Constructor and Description |
---|
SoP() |
SoP(FeatureDefinition featDef)
Build a new empty sop with the given feature definition.
|
SoP(String line,
FeatureDefinition feaDef) |
Modifier and Type | Method and Description |
---|---|
double[] |
getCoeffs() |
double |
getCorrelation() |
int[] |
getFactorsIndex() |
FeatureDefinition |
getFeatureDefinition() |
double |
getRMSE() |
double |
interpret(Target t) |
void |
load(String sopFile) |
void |
printCoefficients() |
void |
saveSelectedFeatures(PrintWriter toSopFile)
First line vowel coefficients plus factors, second line consonant coefficients plus factors
|
void |
setCoeffsAndFactors(double[] coeffsVal,
int[] selectedFactorsIndex,
String[] allFactorsList,
boolean b0)
if b0=true then the number of selected factors 0 numCoeffs-1 (there is one coeff more) if b0=false then the number of
selected factor is the same as the number of coeffs When setting the factors, it checks to which indexes correspond
according to the featureDefinition.
|
void |
setCoeffsAndFactors(String line) |
void |
setCorrelation(double val) |
void |
setRMSE(double val) |
double |
solve(Target t,
FeatureDefinition feaDef,
boolean log)
Solve the linear equation given the features (factors) in t and coeffs and factors in the SoP object * if interceptTterm =
TRUE solution = coeffs[0] + coeffs[1]*factors[0] + coeffs[2]*factors[1] + ...
|
double |
solve(Target t,
FeatureDefinition feaDef,
boolean log,
boolean debug) |
public SoP()
public SoP(FeatureDefinition featDef)
featDef
- featDefpublic SoP(String line, FeatureDefinition feaDef)
public void setCorrelation(double val)
public void setRMSE(double val)
public double[] getCoeffs()
public double getCorrelation()
public double getRMSE()
public int[] getFactorsIndex()
public void setCoeffsAndFactors(double[] coeffsVal, int[] selectedFactorsIndex, String[] allFactorsList, boolean b0) throws Exception
coeffsVal
- coeffsValselectedFactorsIndex
- selectedFactorsIndexallFactorsList
- allFactorsListb0
- b0Exception
- Exceptionpublic void load(String sopFile)
public void setCoeffsAndFactors(String line)
public FeatureDefinition getFeatureDefinition()
public double solve(Target t, FeatureDefinition feaDef, boolean log)
t
- tfeaDef
- feaDeflog
- logpublic double solve(Target t, FeatureDefinition feaDef, boolean log, boolean debug)
public double interpret(Target t)
public void saveSelectedFeatures(PrintWriter toSopFile)
toSopFile
- toSopFilepublic void printCoefficients()
Copyright © 2000–2016 DFKI GmbH. All rights reserved.