public static final class Regression.Builder
extends java.lang.Object
Regression
objects
e.g. for testing purposes.Instances of this builder class are designed for single-threaded use only. It's fine to create and use instances in multiple concurrent threads, but, in the absence of external synchronization, the use of each individual builder instance should be restricted to one thread only.
Constructor and Description |
---|
Builder() |
public Regression.Builder setBaseload(BaseloadRegressionComponent baseload)
public Regression.Builder setHeatingDegreeDays(DegreeDaysRegressionComponent heatingDegreeDays)
public Regression.Builder setCoolingDegreeDays(DegreeDaysRegressionComponent coolingDegreeDays)
public Regression.Builder addExtraComponent(java.lang.String extraPredictorKey, ExtraRegressionComponent extraComponent)
extraPredictorKey
- a string key from the XML response,
associated with a particular extra predictor from the original
request. Cannot be null
, must match the regular
expression [-_.a-zA-Z0-9]{1,60}
, and cannot be
"baseload"
, "heatingDegreeDays"
, or
"coolingDegreeDays"
.extraComponent
- the non-null ExtraRegressionComponent
associated with extraPredictorKey
.this
, for method chaining.java.lang.NullPointerException
- if extraPredictorKey
or
extraComponent
is null
.java.lang.IllegalArgumentException
- if extraPredictorKey
does not match the specification detailed above, or if an
extra component has already been added with
extraPredictorKey
.public Regression.Builder setSampleSize(int sampleSize)
public Regression.Builder setSampleDays(int sampleDays)
public Regression.Builder setSampleSpan(DayRange sampleSpan)
public Regression.Builder setRSquared(double rSquared)
public Regression.Builder setAdjustedRSquared(double adjustedRSquared)
public Regression.Builder setCrossValidatedRSquared(double crossValidatedRSquared)
public Regression.Builder setStandardError(double standardError)
public Regression.Builder setCvrmse(double cvrmse)
public Regression.Builder addTag(RegressionTag tag)
public Regression build()
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.