public class TaxonRenormalizer extends DefaultRenormalizer
String case specification).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_SEPARATOR
Default Taxa separator
|
SUM_NORMILIZER| Constructor and Description |
|---|
TaxonRenormalizer()
Construct a new TaxonRenormalizer without predefined values
Default applied renormalization is the default renormalization of the
DefaultRenormalizer |
| Modifier and Type | Method and Description |
|---|---|
void |
addTaxa(java.lang.String taxa)
Add a taxa defintion of the main taxon according to the string format with the DEFAULT_SEPARATOR
|
void |
addTaxa(java.lang.String lineage,
java.lang.String separator)
Add a taxa defintion of the main taxon according to the string format
|
int[] |
getGroupResult()
Get the mapping from (index) to (groups index identifier) for the new input matrix
|
int |
getTaxaIdentifier(java.lang.String taxa) |
boolean |
hasNativeImplementation()
Know if the current renormalizer owns a native implementation
|
boolean |
isHighestLevel(int taxa) |
boolean |
isHighestLevel(java.lang.String taxa) |
boolean |
isHighLevel(int taxa) |
boolean |
isHighLevel(java.lang.String taxa) |
boolean |
isLowLevel(int taxa) |
boolean |
isLowLevel(java.lang.String taxa) |
double[][] |
normalizeInput(double[][] input)
Apply the normalization process on the given vector of data vectors
|
boolean |
processInput()
Know if the renormalizer can handle input (call normalizeInput has effect)
|
boolean |
processOutput()
Know if the renormalizer can handle output (call normalizeOutput has effect)
|
void |
reset()
Reset only (no call to inherited reset methods) all data relative to taxa/taxon and mappings of last results
|
void |
setTaxa(int position,
java.lang.String taxa)
Set the taxa for a row (null or out of taxon results in considering the row as a feature)
|
void |
setTaxa(int position,
java.lang.String taxa,
java.lang.String separator)
Set the taxa for a row (null or out of taxon results in considering the row as a feature)
|
void |
setTaxa(java.lang.String[] taxas)
|
void |
setTaxa(java.lang.String[] taxas,
java.lang.String separator)
|
void |
updateRenormalization(double[][] sum,
double[] vect,
int row,
boolean ignore)
Method called when pairwise renormalization is used in order to ignore or not a row from the original input matrix
|
addFeature, cloneState, countFeatures, countGroups, groupOf, isUsingCustomNormalizer, isUsingFeatures, isUsingGroups, mergeRenormalizer, noFeatures, noGroups, normalizeOutput, prepareRenormalization, resetNormalizer, setGroup, setGroup, setGroups, setGroupsNames, setNormalizer, setNormalizer, setNormalizer, shufflePair, simulateRenormalization, usePairShufflepublic static final java.lang.String DEFAULT_SEPARATOR
public TaxonRenormalizer()
DefaultRenormalizerpublic void reset()
public int getTaxaIdentifier(java.lang.String taxa)
taxa - The name of a defined taxa levelpublic boolean isLowLevel(java.lang.String taxa)
taxa - The name of a defined taxa levelpublic boolean isHighLevel(java.lang.String taxa)
taxa - The name of a defined taxa levelpublic boolean isHighestLevel(java.lang.String taxa)
taxa - The index (according to the ordre of definition, see getTaxaIdentifier() method) of a definedtaxa levelpublic boolean isLowLevel(int taxa)
taxa - The index (according to the ordre of definition, see getTaxaIdentifier() method) of a defined taxa levelpublic boolean isHighLevel(int taxa)
taxa - The index (according to the ordre of definition, see getTaxaIdentifier() method) of a defined taxa levelpublic boolean isHighestLevel(int taxa)
taxa - The name of a defined taxa levelpublic void setTaxa(java.lang.String[] taxas)
addTaxa, addTaxa) is able to handle duplicated valuestaxas - Taxa names of all row with full level mapping for each row of the next input matrixpublic void setTaxa(java.lang.String[] taxas,
java.lang.String separator)
addTaxa, addTaxa) is able to handle duplicated valuesseparator - Specify the used separator (literal string)taxas - Taxa names of all row with full level mapping for each row of the next input matrixpublic void setTaxa(int position,
java.lang.String taxa,
java.lang.String separator)
position - The index of the concerned data rowseparator - Specify the used separator (literal string)taxas - Taxa names of all row, one lowest level mapping for each row of the next input matrixpublic void setTaxa(int position,
java.lang.String taxa)
separator - Specify the used separator (literal string)taxas - Taxa names of all row, one lowest level mapping for each row of the next input matrixpublic void addTaxa(java.lang.String taxa)
taxa - The taxa definition from the highest level to the lowest levelpublic void addTaxa(java.lang.String lineage,
java.lang.String separator)
lineage - The taxa definition from the highest level to the lowest level (cannot contains spaces see \s in RegularExpression)separator - Specify the used separator (literal string)public double[][] normalizeInput(double[][] input)
RenormalizernormalizeInput in interface Renormalizer<double[][]>normalizeInput in class DefaultRenormalizerinput - The given vector of data vectorspublic void updateRenormalization(double[][] sum,
double[] vect,
int row,
boolean ignore)
RenormalizerupdateRenormalization in interface Renormalizer<double[][]>updateRenormalization in class DefaultRenormalizersum - The state on which modifications will be appliedvect - A vector which is considerate as a row from the original input matrix corresponding to the row at the given indexrow - The index of the vector to map it into the original matrix at this indexignore - A boolean to tell if the values of the vector must be ignored (typically remove these values from the normalization process as if it was the row "index" from the original input matrix) with the true value (typically false to add it into renormalization)public int[] getGroupResult()
public boolean hasNativeImplementation()
RenormalizerhasNativeImplementation in interface Renormalizer<double[][]>hasNativeImplementation in class DefaultRenormalizerpublic boolean processInput()
RenormalizerprocessInput in interface Renormalizer<double[][]>processInput in class DefaultRenormalizerpublic boolean processOutput()
RenormalizerprocessOutput in interface Renormalizer<double[][]>processOutput in class DefaultRenormalizer