Click or drag to resize

RegressionSpec Class

Defines a specification of a regression in terms of its HDD and/or CDD base temperature(s) and any extra predictors to be included.
Inheritance Hierarchy
SystemObject
  DegreeDays.Api.RegressionsRegressionSpec

Namespace: DegreeDays.Api.Regressions
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public sealed class RegressionSpec

The RegressionSpec type exposes the following members.

Properties
 NameDescription
Public propertyCoolingBaseTemperature Returns the base Temperature to be used for the cooling degree days in the specified regression, or null if no such cooling base temperature was specified.
Public propertyExtraPredictorKeys Gets the non-null, possibly-empty, immutable set of the keys of the extra predictors to be included in the specified regression.
Public propertyHeatingBaseTemperature Returns the base Temperature to be used for the heating degree days in the specified regression, or null if no such heating base temperature was specified.
Top
Methods
 NameDescription
Public methodEquals Returns true if obj is a RegressionSpec with the same configuration as this.
(Overrides ObjectEquals(Object))
Public methodGetHashCode Overridden to ensure consistency with Equals.
(Overrides ObjectGetHashCode)
Public methodToString Returns a non-null, non-empty string representation of this instance for logging and debugging purposes.
(Overrides ObjectToString)
Public methodWithCooling Returns a new RegressionSpec based on this but also specifying that cooling degree days with the specified base temperature are to be included.
Public methodWithExtraPredictorKeys(IEnumerableString) Returns a new RegressionSpec based on this but also specifying that extra predictors with the specified keys are to be included.
Public methodWithExtraPredictorKeys(String) Returns a new RegressionSpec based on this but also specifying that extra predictors with the specified keys are to be included.
Public methodWithHeating Returns a new RegressionSpec based on this but also specifying that heating degree days with the specified base temperature are to be included.
Top
Fields
 NameDescription
Public fieldStatic memberBaseload The specification for a baseload-only regression (e.g. E = b*days) which can be built upon as per the example code in the remarks.
Top
Remarks

To create a RegressionSpec, start with a baseload-only spec from Baseload (since every regression needs a baseload component), then build upon it using whichever of the WithXXX methods you need. For example:

RegressionSpec spec = RegressionSpec.Baseload
    .WithHeating(Temperature.Celsius(15.5))
    .WithCooling(Temperature.Celsius(21))
    .WithExtraPredictorKeys("occupancy", "production");

See www.degreedays.net/api/regression#requested for more information and code samples.

Thread Safety
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Version History
VersionDescription
1.4 This was added in version 1.4.
See Also