Click or drag to resize

RegressionTestPlanBuilderAddExtraPredictorSpec Method

Adds a specification for an extra predictor included in the InputData sent to the API, to help the API test and rank the regressions that include data for that extra predictor.

Namespace: DegreeDays.Api.Regressions
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public RegressionTestPlanBuilder AddExtraPredictorSpec(
	string extraPredictorKey,
	ExtraPredictorSpec extraPredictorSpec
)

Parameters

extraPredictorKey  String
The String key used to identify the extra predictor in each InputPeriod of your InputData. Cannot be null, must match the regular expression [-_.a-zA-Z0-9]{1,60}, and cannot be "baseload", "heatingDegreeDays", or "coolingDegreeDays".
extraPredictorSpec  ExtraPredictorSpec
The specification for the extra predictor identified by extraPredictorKey. Cannot be null.

Return Value

RegressionTestPlanBuilder
This Builder, for easy method chaining.
Exceptions
ExceptionCondition
ArgumentNullExceptionextraPredictorKey or extraPredictorSpec is null.
ArgumentExceptionextraPredictorKey does not match the specification detailed above.
Remarks

There's some sample code 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).

If you have 2 extra predictors (the maximum allowed, though this is not checked until you call Build), you can call this method twice, or do all the extra-predictor specification in one call to SetExtraPredictorSpecs(IDictionaryString, ExtraPredictorSpec).

See Also