public class GeneralRegression extends PMMLClassifier implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
m_algorithmName |
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Predictor> |
m_covariateList |
protected weka.classifiers.pmml.consumer.GeneralRegression.CumulativeLinkFunction |
m_cumulativeLinkFunction |
protected double |
m_distParameter |
protected weka.classifiers.pmml.consumer.GeneralRegression.Distribution |
m_distribution |
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Predictor> |
m_factorList |
protected int |
m_functionType |
protected weka.classifiers.pmml.consumer.GeneralRegression.LinkFunction |
m_linkFunction |
protected double |
m_linkParameter |
protected String |
m_modelName |
protected weka.classifiers.pmml.consumer.GeneralRegression.ModelType |
m_modelType |
protected double |
m_offsetValue |
protected String |
m_offsetVariable |
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Parameter> |
m_parameterList |
protected weka.classifiers.pmml.consumer.GeneralRegression.PCell[][] |
m_paramMatrix |
protected weka.classifiers.pmml.consumer.GeneralRegression.PPCell[][] |
m_ppMatrix |
protected double |
m_trialsValue |
protected String |
m_trialsVariable |
m_creatorApplication, m_dataDictionary, m_fieldsMap, m_initialized, m_log, m_miningSchema, m_pmmlVersion
m_Debug
Constructor and Description |
---|
GeneralRegression(Element model,
Instances dataDictionary,
MiningSchema miningSchema)
Constructs a GeneralRegression classifier.
|
Modifier and Type | Method and Description |
---|---|
double[] |
distributionForInstance(Instance inst)
Classifies the given test instance.
|
String |
getRevision()
Returns the revision string.
|
protected void |
printParameterMatrix(StringBuffer buff)
Format and print the parameter matrix to the supplied StringBuffer.
|
protected void |
printPPMatrix(StringBuffer buff)
Format and print the PPMatrix to the supplied StringBuffer.
|
protected void |
readFactorsAndCovariates(Element model,
String factorOrCovariate)
Read the lists of factors and covariates.
|
protected void |
readParameterList(Element model)
Read the list of parameters.
|
protected void |
readPPMatrix(Element model)
Read the PPMatrix from the xml.
|
String |
toString()
Return a textual description of this general regression.
|
buildClassifier, done, getCreatorApplication, getDataDictionary, getFieldsMappingString, getLog, getMiningSchema, getPMMLVersion, mapToMiningSchema, setCreatorApplication, setLog, setPMMLVersion
classifyInstance, debugTipText, forName, getCapabilities, getDebug, getOptions, listOptions, makeCopies, makeCopy, runClassifier, setDebug, setOptions
protected weka.classifiers.pmml.consumer.GeneralRegression.ModelType m_modelType
protected String m_modelName
protected String m_algorithmName
protected int m_functionType
protected weka.classifiers.pmml.consumer.GeneralRegression.CumulativeLinkFunction m_cumulativeLinkFunction
protected weka.classifiers.pmml.consumer.GeneralRegression.LinkFunction m_linkFunction
protected double m_linkParameter
protected String m_trialsVariable
protected double m_trialsValue
protected weka.classifiers.pmml.consumer.GeneralRegression.Distribution m_distribution
protected double m_distParameter
protected String m_offsetVariable
protected double m_offsetValue
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Parameter> m_parameterList
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Predictor> m_factorList
protected ArrayList<weka.classifiers.pmml.consumer.GeneralRegression.Predictor> m_covariateList
protected weka.classifiers.pmml.consumer.GeneralRegression.PPCell[][] m_ppMatrix
protected weka.classifiers.pmml.consumer.GeneralRegression.PCell[][] m_paramMatrix
public GeneralRegression(Element model, Instances dataDictionary, MiningSchema miningSchema) throws Exception
model
- the Element that holds the model definitiondataDictionary
- the data dictionary as a set of InstancesminingSchema
- the mining schemaException
- if there is a problem constructing the general regression
object from the PMML.protected void readParameterList(Element model) throws Exception
model
- the Element that contains the modelException
- if there is some problem with extracting the
parameters.protected void readFactorsAndCovariates(Element model, String factorOrCovariate) throws Exception
model
- the Element that contains the modelfactorOrCovariate
- holds the String "FactorList" or
"CovariateList"Exception
- if there is a factor or covariate listed
that isn't in the mining schemaprotected void readPPMatrix(Element model) throws Exception
model
- the Element that contains the modelException
- if there is a problem parsing cell values.public String toString()
protected void printPPMatrix(StringBuffer buff)
buff
- the StringBuffer to append toprotected void printParameterMatrix(StringBuffer buff)
buff
- the StringBuffer to append topublic double[] distributionForInstance(Instance inst) throws Exception
distributionForInstance
in class Classifier
inst
- the instance to be classifiedException
- if an error occurred during the predictionpublic String getRevision()
Classifier
getRevision
in interface RevisionHandler
getRevision
in class Classifier
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.