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

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

There is a newer version: 1.7.2
Show newest version

package org.dmg.pmml;

import java.util.ArrayList;
import java.util.Arrays;
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.XmlType;
import org.jpmml.schema.Added;
import org.jpmml.schema.Version;


/**
 * 

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}MiningSchema"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}Output" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}ModelStats" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}ModelExplanation" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}LocalTransformations" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}TimeSeries" maxOccurs="3" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}SpectralAnalysis" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}ARIMA" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}ExponentialSmoothing" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}SeasonalTrendDecomposition" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}ModelVerification" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="modelName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="functionName" use="required" type="{http://www.dmg.org/PMML-4_2}MINING-FUNCTION" />
 *       <attribute name="algorithmName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="bestFit" use="required" type="{http://www.dmg.org/PMML-4_2}TIMESERIES-ALGORITHM" />
 *       <attribute name="isScorable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions", "miningSchema", "output", "modelStats", "modelExplanation", "localTransformations", "timeSeries", "spectralAnalysis", "arima", "exponentialSmoothing", "seasonalTrendDecomposition", "modelVerification" }) @XmlRootElement(name = "TimeSeriesModel", namespace = "http://www.dmg.org/PMML-4_2") @Added(Version.PMML_4_0) public class TimeSeriesModel extends Model implements HasExtensions { @XmlAttribute(name = "modelName") private String modelName; @XmlAttribute(name = "functionName", required = true) private MiningFunctionType functionName; @XmlAttribute(name = "algorithmName") private String algorithmName; @XmlAttribute(name = "bestFit", required = true) private TimeSeriesAlgorithmType bestFit; @XmlAttribute(name = "isScorable") @Added(Version.PMML_4_1) private Boolean scorable; @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_2") private List extensions; @XmlElement(name = "MiningSchema", namespace = "http://www.dmg.org/PMML-4_2", required = true) private MiningSchema miningSchema; @XmlElement(name = "Output", namespace = "http://www.dmg.org/PMML-4_2") private Output output; @XmlElement(name = "ModelStats", namespace = "http://www.dmg.org/PMML-4_2") private ModelStats modelStats; @XmlElement(name = "ModelExplanation", namespace = "http://www.dmg.org/PMML-4_2") @Added(Version.PMML_4_1) private ModelExplanation modelExplanation; @XmlElement(name = "LocalTransformations", namespace = "http://www.dmg.org/PMML-4_2") private LocalTransformations localTransformations; @XmlElement(name = "TimeSeries", namespace = "http://www.dmg.org/PMML-4_2") private List timeSeries; @XmlElement(name = "SpectralAnalysis", namespace = "http://www.dmg.org/PMML-4_2") private SpectralAnalysis spectralAnalysis; @XmlElement(name = "ARIMA", namespace = "http://www.dmg.org/PMML-4_2") private ARIMA arima; @XmlElement(name = "ExponentialSmoothing", namespace = "http://www.dmg.org/PMML-4_2") private ExponentialSmoothing exponentialSmoothing; @XmlElement(name = "SeasonalTrendDecomposition", namespace = "http://www.dmg.org/PMML-4_2") private SeasonalTrendDecomposition seasonalTrendDecomposition; @XmlElement(name = "ModelVerification", namespace = "http://www.dmg.org/PMML-4_2") private ModelVerification modelVerification; private final static Boolean DEFAULT_SCORABLE = true; public TimeSeriesModel() { super(); } public TimeSeriesModel(final MiningFunctionType functionName, final TimeSeriesAlgorithmType bestFit, final MiningSchema miningSchema) { super(); this.functionName = functionName; this.bestFit = bestFit; this.miningSchema = miningSchema; } /** * Gets the value of the modelName property. * * @return * possible object is * {@link String } * */ public String getModelName() { return modelName; } /** * Sets the value of the modelName property. * * @param modelName * allowed object is * {@link String } * */ public TimeSeriesModel setModelName(String modelName) { this.modelName = modelName; return this; } /** * Gets the value of the functionName property. * * @return * possible object is * {@link MiningFunctionType } * */ public MiningFunctionType getFunctionName() { return functionName; } /** * Sets the value of the functionName property. * * @param functionName * allowed object is * {@link MiningFunctionType } * */ public TimeSeriesModel setFunctionName(MiningFunctionType functionName) { this.functionName = functionName; return this; } /** * Gets the value of the algorithmName property. * * @return * possible object is * {@link String } * */ public String getAlgorithmName() { return algorithmName; } /** * Sets the value of the algorithmName property. * * @param algorithmName * allowed object is * {@link String } * */ public TimeSeriesModel setAlgorithmName(String algorithmName) { this.algorithmName = algorithmName; return this; } /** * Gets the value of the bestFit property. * * @return * possible object is * {@link TimeSeriesAlgorithmType } * */ public TimeSeriesAlgorithmType getBestFit() { return bestFit; } /** * Sets the value of the bestFit property. * * @param bestFit * allowed object is * {@link TimeSeriesAlgorithmType } * */ public TimeSeriesModel setBestFit(TimeSeriesAlgorithmType bestFit) { this.bestFit = bestFit; return this; } /** * Gets the value of the scorable property. * * @return * possible object is * {@link Boolean } * */ public boolean isScorable() { if (scorable == null) { return DEFAULT_SCORABLE; } else { return scorable; } } /** * Sets the value of the scorable property. * * @param scorable * allowed object is * {@link Boolean } * */ public TimeSeriesModel setScorable(Boolean scorable) { this.scorable = scorable; return this; } /** * 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 miningSchema property. * * @return * possible object is * {@link MiningSchema } * */ public MiningSchema getMiningSchema() { return miningSchema; } /** * Sets the value of the miningSchema property. * * @param miningSchema * allowed object is * {@link MiningSchema } * */ public TimeSeriesModel setMiningSchema(MiningSchema miningSchema) { this.miningSchema = miningSchema; return this; } /** * Gets the value of the output property. * * @return * possible object is * {@link Output } * */ public Output getOutput() { return output; } /** * Sets the value of the output property. * * @param output * allowed object is * {@link Output } * */ public TimeSeriesModel setOutput(Output output) { this.output = output; return this; } /** * Gets the value of the modelStats property. * * @return * possible object is * {@link ModelStats } * */ public ModelStats getModelStats() { return modelStats; } /** * Sets the value of the modelStats property. * * @param modelStats * allowed object is * {@link ModelStats } * */ public TimeSeriesModel setModelStats(ModelStats modelStats) { this.modelStats = modelStats; return this; } /** * Gets the value of the modelExplanation property. * * @return * possible object is * {@link ModelExplanation } * */ public ModelExplanation getModelExplanation() { return modelExplanation; } /** * Sets the value of the modelExplanation property. * * @param modelExplanation * allowed object is * {@link ModelExplanation } * */ public TimeSeriesModel setModelExplanation(ModelExplanation modelExplanation) { this.modelExplanation = modelExplanation; return this; } /** * Gets the value of the localTransformations property. * * @return * possible object is * {@link LocalTransformations } * */ public LocalTransformations getLocalTransformations() { return localTransformations; } /** * Sets the value of the localTransformations property. * * @param localTransformations * allowed object is * {@link LocalTransformations } * */ public TimeSeriesModel setLocalTransformations(LocalTransformations localTransformations) { this.localTransformations = localTransformations; return this; } /** * Gets the value of the timeSeries 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 timeSeries property. * *

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

     *    getTimeSeries().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link TimeSeries } * * */ public List getTimeSeries() { if (timeSeries == null) { timeSeries = new ArrayList(); } return this.timeSeries; } /** * Gets the value of the spectralAnalysis property. * * @return * possible object is * {@link SpectralAnalysis } * */ public SpectralAnalysis getSpectralAnalysis() { return spectralAnalysis; } /** * Sets the value of the spectralAnalysis property. * * @param spectralAnalysis * allowed object is * {@link SpectralAnalysis } * */ public TimeSeriesModel setSpectralAnalysis(SpectralAnalysis spectralAnalysis) { this.spectralAnalysis = spectralAnalysis; return this; } /** * Gets the value of the arima property. * * @return * possible object is * {@link ARIMA } * */ public ARIMA getARIMA() { return arima; } /** * Sets the value of the arima property. * * @param arima * allowed object is * {@link ARIMA } * */ public TimeSeriesModel setARIMA(ARIMA arima) { this.arima = arima; return this; } /** * Gets the value of the exponentialSmoothing property. * * @return * possible object is * {@link ExponentialSmoothing } * */ public ExponentialSmoothing getExponentialSmoothing() { return exponentialSmoothing; } /** * Sets the value of the exponentialSmoothing property. * * @param exponentialSmoothing * allowed object is * {@link ExponentialSmoothing } * */ public TimeSeriesModel setExponentialSmoothing(ExponentialSmoothing exponentialSmoothing) { this.exponentialSmoothing = exponentialSmoothing; return this; } /** * Gets the value of the seasonalTrendDecomposition property. * * @return * possible object is * {@link SeasonalTrendDecomposition } * */ public SeasonalTrendDecomposition getSeasonalTrendDecomposition() { return seasonalTrendDecomposition; } /** * Sets the value of the seasonalTrendDecomposition property. * * @param seasonalTrendDecomposition * allowed object is * {@link SeasonalTrendDecomposition } * */ public TimeSeriesModel setSeasonalTrendDecomposition(SeasonalTrendDecomposition seasonalTrendDecomposition) { this.seasonalTrendDecomposition = seasonalTrendDecomposition; return this; } /** * Gets the value of the modelVerification property. * * @return * possible object is * {@link ModelVerification } * */ public ModelVerification getModelVerification() { return modelVerification; } /** * Sets the value of the modelVerification property. * * @param modelVerification * allowed object is * {@link ModelVerification } * */ public TimeSeriesModel setModelVerification(ModelVerification modelVerification) { this.modelVerification = modelVerification; return this; } public boolean hasExtensions() { return ((this.extensions!= null)&&(this.extensions.size()> 0)); } public TimeSeriesModel addExtensions(Extension... extensions) { getExtensions().addAll(Arrays.asList(extensions)); return this; } public boolean hasTimeSeries() { return ((this.timeSeries!= null)&&(this.timeSeries.size()> 0)); } public TimeSeriesModel addTimeSeries(TimeSeries... timeSeries) { getTimeSeries().addAll(Arrays.asList(timeSeries)); return this; } @Override public VisitorAction accept(Visitor visitor) { VisitorAction status = visitor.visit(this); if (status == VisitorAction.CONTINUE) { visitor.pushParent(this); if ((status == VisitorAction.CONTINUE)&&hasExtensions()) { status = PMMLObject.traverse(visitor, getExtensions()); } if (status == VisitorAction.CONTINUE) { status = PMMLObject.traverse(visitor, getMiningSchema(), getOutput(), getModelStats(), getModelExplanation(), getLocalTransformations()); } if ((status == VisitorAction.CONTINUE)&&hasTimeSeries()) { status = PMMLObject.traverse(visitor, getTimeSeries()); } if (status == VisitorAction.CONTINUE) { status = PMMLObject.traverse(visitor, getSpectralAnalysis(), getARIMA(), getExponentialSmoothing(), getSeasonalTrendDecomposition(), getModelVerification()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy