public class MixingRuleRegression extends BaseRegression
CompositionEntry
based on the composition-weighted mean.
Only works on datasets that fulfill CompositionDataset
.
Special features:
1/p = x_1/p_1 + ...
).class = a + b * meanProperty
Usage: <property> [-invert] [-correct] [-fit <ElementNames>]
Implemented Print Commands:
fitted - Print fitted elemental properties (if any)
Modifier and Type | Field and Description |
---|---|
protected double[] |
CorrectionFactors
Coefficients used for correction factor.
|
protected java.util.List<java.lang.String> |
FittedElements
Elements to fit using least squares
|
protected double[] |
LookupTable
Lookup table for property of interest
|
protected java.lang.String |
PropertyName
Property used for weighting
|
protected boolean |
UseCorrection
Whether to apply correction factors
|
protected boolean |
UseInverse
Whether to compute harmonic mean.
|
AttributeSelector, trained, TrainingStats, validated, ValidationStats
Constructor and Description |
---|
MixingRuleRegression() |
Modifier and Type | Method and Description |
---|---|
BaseRegression |
clone() |
protected void |
fitCorrectionFactors(CompositionDataset Data)
Fit correction factors to the mixing rule model.
|
protected void |
fitElementProperties(CompositionDataset Data)
Fits properties for elements specified by user.
|
int |
getNFittingParameters()
Number of fitting parameters in a model.
|
java.lang.String |
getPropertyName()
Retrieve the property used for alloy mean
|
boolean |
getUseInverse() |
java.lang.String |
printCommand(java.util.List<java.lang.String> Command)
Handles more complicated printing commands.
|
protected java.lang.String |
printModel_protected()
Internal method that handles printing the model as a string.
|
java.util.List<java.lang.String> |
printModelDescriptionDetails(boolean htmlFormat)
Print details of the model.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
run_protected(Dataset TrainData)
Run a model without checking if stuff is trained (use carefully)
|
void |
setFittedElements(java.util.List<java.lang.String> elements)
Set which elements to fit.
|
void |
setOptions(java.util.List OptionsObj)
Set any options for this object.
|
void |
setPropertyName(java.lang.String PropertyName)
Define which property to use for alloy mean
|
void |
setUseCorrection(boolean UseCorrection)
Whether to fit a linear model to correct differences between the alloy mean
and class variable
|
void |
setUseInverse(boolean UseInverse)
Define whether to take the average of the property, or the average of the inverse
of the property.
|
protected void |
train_protected(Dataset TrainData)
Train a model without evaluating performance
|
doRobustRegression, getRobustRegressionQ, robustTraining, runCommand, setRobustRegressionQ
about, crossValidate, crossValidate, crossValidate, done, externallyValidate, getAttributeSelector, getCitations, getFilter, getTrainTime, getValidationMethod, handleSetCommand, isTrained, isValidated, loadState, printDescription, printModel, resetModel, run, saveCommand, saveState, setAttributeSelector, setComponent, setFilter, train, train
protected java.lang.String PropertyName
protected double[] LookupTable
protected boolean UseInverse
protected double[] CorrectionFactors
protected boolean UseCorrection
protected java.util.List<java.lang.String> FittedElements
public BaseRegression clone()
clone
in class BaseRegression
public void setPropertyName(java.lang.String PropertyName)
PropertyName
- Name of desired propertypublic java.lang.String getPropertyName()
public void setUseInverse(boolean UseInverse)
UseInverse
- Whether to use the inverseMixingRuleRegression
public boolean getUseInverse()
public void setUseCorrection(boolean UseCorrection)
UseCorrection
- Whether to use correctionspublic void setOptions(java.util.List OptionsObj) throws java.lang.Exception
Options
OptionsObj
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
public void setFittedElements(java.util.List<java.lang.String> elements)
elements
- Elements to be fit to minimize model error. List of element abbreviations.protected void train_protected(Dataset TrainData)
BaseModel
train_protected
in class BaseModel
TrainData
- Training datapublic int getNFittingParameters()
AbstractRegressionModel
public void run_protected(Dataset TrainData)
BaseModel
run_protected
in class BaseModel
TrainData
- Training dataprotected void fitElementProperties(CompositionDataset Data)
Data
- Dataset to use for fittingprotected java.lang.String printModel_protected()
BaseModel
printModel_protected
in class BaseModel
public java.util.List<java.lang.String> printModelDescriptionDetails(boolean htmlFormat)
BaseModel
BaseModel.printDescription(boolean)
.
Implementation note: No not add indentation for details. That is handled
by BaseModel.printDescription(boolean)
. You should also call the super
operation to get the Normalizer and Attribute selector settings
printModelDescriptionDetails
in class BaseModel
htmlFormat
- Whether to use HTML formatprotected void fitCorrectionFactors(CompositionDataset Data)
Data
- Dataset to use for trainingpublic java.lang.String printCommand(java.util.List<java.lang.String> Command) throws java.lang.Exception
Printable
printCommand
in interface Printable
printCommand
in class BaseModel
Command
- Command specifying what to printjava.lang.Exception
- If command not understood