public class PropertyFormulaRanker extends MultiObjectiveEntryRanker
Usage: <formula...>
formula: Formula to use as objective function. Property names must be surrounded by #{}'s.
Example formula: #{volume_pa} * #{bandgap}
| Constructor and Description |
|---|
PropertyFormulaRanker() |
| Modifier and Type | Method and Description |
|---|---|
PropertyFormulaRanker |
clone() |
protected java.lang.String |
extractVariables(java.lang.String Formula)
Parse a formula to find names of properties used as variables.
|
java.lang.String[] |
getObjectives()
Get properties currently used in objective functions.
|
double |
objectiveFunction(BaseEntry Entry)
Some kind of objective function that returns a double when given an entry.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setFormula(java.lang.String formula)
Define the formula used by this class.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
train(MultiPropertyDataset data)
Train the entry ranker.
|
trainisMaximizing, isUsingMeasured, rankEntries, rankEntries, rankEntries, runObjectiveFunction, setMaximizeFunction, setUseMeasured, sortByRankingpublic PropertyFormulaRanker clone()
clone in class MultiObjectiveEntryRankerpublic void setOptions(java.util.List<java.lang.Object> Options)
throws java.lang.Exception
OptionsOptions - Array of options as Objects - can be nulljava.lang.Exception - if problem with inputspublic java.lang.String printUsage()
Optionspublic void train(MultiPropertyDataset data)
MultiObjectiveEntryRankerNote: This might be an opportune operation to map the name of each property with their index to allow for faster operation of the EntryRanker#objectiveFunction(magpie.data.BaseEntry)
train in class MultiObjectiveEntryRankerdata - Dataset to use for trainingpublic java.lang.String[] getObjectives()
MultiObjectiveEntryRankergetObjectives in class MultiObjectiveEntryRankerpublic void setFormula(java.lang.String formula)
throws java.lang.Exception
formula - Formula to be usedjava.lang.Exception - If parsing failsprotected java.lang.String extractVariables(java.lang.String Formula)
throws java.lang.Exception
Formula - Formula to be parsedjava.lang.Exceptionpublic double objectiveFunction(BaseEntry Entry)
BaseEntryRankerNOTE: This function needs to support using either the measured or predicted class depending on the settings
objectiveFunction in class BaseEntryRankerEntry - Entry to be analyzed