All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmg.pmml.RegressionTable Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version

package org.dmg.pmml;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import com.sun.xml.bind.Locatable;
import com.sun.xml.bind.annotation.XmlLocation;
import org.xml.sax.Locator;


/**
 * 

Java class for anonymous complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://www.dmg.org/PMML-4_2}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}NumericPredictor" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}CategoricalPredictor" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}PredictorTerm" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="intercept" use="required" type="{http://www.dmg.org/PMML-4_2}REAL-NUMBER" />
 *       <attribute name="targetCategory" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions", "numericPredictors", "categoricalPredictors", "predictorTerms" }) @XmlRootElement(name = "RegressionTable") public class RegressionTable extends PMMLObject implements Locatable, HasExtensions { @XmlElement(name = "Extension") protected List extensions; @XmlElement(name = "NumericPredictor") protected List numericPredictors; @XmlElement(name = "CategoricalPredictor") protected List categoricalPredictors; @XmlElement(name = "PredictorTerm") protected List predictorTerms; @XmlAttribute(name = "intercept", required = true) protected double intercept; @XmlAttribute(name = "targetCategory") protected String targetCategory; @XmlLocation @XmlTransient protected Locator locator; public RegressionTable() { super(); } public RegressionTable(final double intercept) { super(); this.intercept = intercept; } /** * Gets the value of the extensions property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the extensions property. * *

* For example, to add a new item, do as follows: *

     *    getExtensions().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Extension } * * */ public List getExtensions() { if (extensions == null) { extensions = new ArrayList(); } return this.extensions; } /** * Gets the value of the numericPredictors property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the numericPredictors property. * *

* For example, to add a new item, do as follows: *

     *    getNumericPredictors().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link NumericPredictor } * * */ public List getNumericPredictors() { if (numericPredictors == null) { numericPredictors = new ArrayList(); } return this.numericPredictors; } /** * Gets the value of the categoricalPredictors property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the categoricalPredictors property. * *

* For example, to add a new item, do as follows: *

     *    getCategoricalPredictors().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link CategoricalPredictor } * * */ public List getCategoricalPredictors() { if (categoricalPredictors == null) { categoricalPredictors = new ArrayList(); } return this.categoricalPredictors; } /** * Gets the value of the predictorTerms property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the predictorTerms property. * *

* For example, to add a new item, do as follows: *

     *    getPredictorTerms().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link PredictorTerm } * * */ public List getPredictorTerms() { if (predictorTerms == null) { predictorTerms = new ArrayList(); } return this.predictorTerms; } /** * Gets the value of the intercept property. * */ public double getIntercept() { return intercept; } /** * Sets the value of the intercept property. * */ public void setIntercept(double value) { this.intercept = value; } /** * Gets the value of the targetCategory property. * * @return * possible object is * {@link String } * */ public String getTargetCategory() { return targetCategory; } /** * Sets the value of the targetCategory property. * * @param value * allowed object is * {@link String } * */ public void setTargetCategory(String value) { this.targetCategory = value; } public RegressionTable withExtensions(Extension... values) { if (values!= null) { for (Extension value: values) { getExtensions().add(value); } } return this; } public RegressionTable withExtensions(Collection values) { if (values!= null) { getExtensions().addAll(values); } return this; } public RegressionTable withNumericPredictors(NumericPredictor... values) { if (values!= null) { for (NumericPredictor value: values) { getNumericPredictors().add(value); } } return this; } public RegressionTable withNumericPredictors(Collection values) { if (values!= null) { getNumericPredictors().addAll(values); } return this; } public RegressionTable withCategoricalPredictors(CategoricalPredictor... values) { if (values!= null) { for (CategoricalPredictor value: values) { getCategoricalPredictors().add(value); } } return this; } public RegressionTable withCategoricalPredictors(Collection values) { if (values!= null) { getCategoricalPredictors().addAll(values); } return this; } public RegressionTable withPredictorTerms(PredictorTerm... values) { if (values!= null) { for (PredictorTerm value: values) { getPredictorTerms().add(value); } } return this; } public RegressionTable withPredictorTerms(Collection values) { if (values!= null) { getPredictorTerms().addAll(values); } return this; } public RegressionTable withIntercept(double value) { setIntercept(value); return this; } public RegressionTable withTargetCategory(String value) { setTargetCategory(value); return this; } public Locator sourceLocation() { return locator; } public void setSourceLocation(Locator newLocator) { locator = newLocator; } @Override public VisitorAction accept(Visitor visitor) { VisitorAction status = visitor.visit(this); for (int i = 0; (((status == VisitorAction.CONTINUE)&&(this.extensions!= null))&&(i





© 2015 - 2024 Weber Informatics LLC | Privacy Policy