Click or drag to resize

InputPeriodWithExtraPredictor Method

Returns a new InputPeriod based on this but also including an extra predictor with the specified key and value.

Namespace: DegreeDays.Api.Regressions
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public InputPeriod WithExtraPredictor(
	string key,
	double value
)

Parameters

key  String
The extra-predictor key used to identify this extra predictor. Cannot be null, must match the regular expression [-_.a-zA-Z0-9]{1,60}, and cannot be "baseload", "heatingDegreeDays", or "coolingDegreeDays".
value  Double
The value of the extra predictor over the time period covered by this InputPeriod's DayRange.

Return Value

InputPeriod
Exceptions
ExceptionCondition
ArgumentNullExceptionkey is null.
ArgumentExceptionkey does not match the specification detailed above, or if value is NaN or infinite.
InvalidOperationExceptionthis InputPeriod already has 2 extra predictors (the maximum allowed).
Remarks

Every InputPeriod in a set of InputData must have values for the same extra-predictor keys. So, for example, if you include an "occupancy" extra-predictor figure in one InputPeriod in your InputData, you must include an "occupancy" figure in all of them.

There's some sample code showing how to use this method in the regression API docs on our website, and also there's some additional practical information on specifying and using extra predictors in the docs for our website regression tool (which itself uses the API internally).

See Also