brightwind.analyse.correlation.OrthogonalLeastSquares¶
-
class
brightwind.analyse.correlation.
OrthogonalLeastSquares
(ref_spd, target_spd, averaging_prd, coverage_threshold=0.9, preprocess=True)¶ Accepts two series with timestamps as indexes and averaging period.
- Parameters
ref_spd – Series containing reference speed as a column, timestamp as the index
target_spd – Series containing target speed as a column, timestamp as the index
averaging_prd –
Groups data by the period specified by period.
2T, 2 min for minutely average
Set period to 1D for a daily average, 3D for three hourly average, similarly 5D, 7D, 15D etc.
Set period to 1H for hourly average, 3H for three hourly average and so on for 5H, 6H etc.
Set period to 1MS for monthly average
Set period to 1AS fo annual average
coverage_threshold – Minimum coverage to include for correlation
preprocess – To average and check for coverage before correlating
- Returns
Returns an object representing the model
-
__init__
(ref_spd, target_spd, averaging_prd, coverage_threshold=0.9, preprocess=True)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(ref_spd, target_spd, averaging_prd)Initialize self.
get_error_metrics
()get_r2
()Returns the r2 score of the model
linear_func
(x)plot
([title])For plotting
run
([show_params])show_params
()Show the dictionary of parameters
synthesize
([ext_input])