public class SimpleLinearModelExample extends AbstractNonlinearRegression
AbstractNonlinearRegression
Class. Fits a regression model to:
Class = a + b * mean_GSvolume_pa
AttributeSelector, trained, TrainingStats, validated, ValidationStats
Constructor and Description |
---|
SimpleLinearModelExample() |
Modifier and Type | Method and Description |
---|---|
protected void |
defineCoefficients()
Define the names and, if desired, initial guesses of fitting coefficients.
|
protected void |
defineVariables()
Define which attributes are used by the function.
|
protected double |
function(double[] variables,
double[] coeff)
Function defined by the user.
|
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.
|
addCoefficient, addCoefficient, addVariable, getCoefficientName, getFittedCoefficient, getMaxIter, getNFittingParameters, getVariableName, makeObjectiveFunction, NCoefficients, NVariables, printUsage, run_protected, runCommand, runNonlinearCommand, setInitialGuess, setMaxIterations, setOptions, train_protected
clone, doRobustRegression, getRobustRegressionQ, robustTraining, setRobustRegressionQ
about, crossValidate, crossValidate, crossValidate, done, externallyValidate, getAttributeSelector, getCitations, getFilter, getTrainTime, getValidationMethod, handleSetCommand, isTrained, isValidated, loadState, printCommand, printDescription, printModel, resetModel, run, saveCommand, saveState, setAttributeSelector, setComponent, setFilter, train, train
protected void defineVariables()
AbstractNonlinearRegression
Variables are defined using the AbstractNonlinearRegression.addVariable(java.lang.String)
function. *
In AbstractNonlinearRegression.function(double[], double[])
these names are mapped to the variable
array
in the same order you define them.
defineVariables
in class AbstractNonlinearRegression
protected void defineCoefficients()
AbstractNonlinearRegression
Coefficients are defined using the AbstractNonlinearRegression.addCoefficient(java.lang.String)
function.
In AbstractNonlinearRegression.function(double[], double[])
these names are mapped to the coeff
array
in the same order you define them.
defineCoefficients
in class AbstractNonlinearRegression
protected double function(double[] variables, double[] coeff)
AbstractNonlinearRegression
function
in class AbstractNonlinearRegression
variables
- Values of attributes used as independent variablescoeff
- Coefficients of equationprotected 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 format