windkit.ltc.mcp.LinRegMCP

class windkit.ltc.mcp.LinRegMCP(ws_cutoff=3.0, **kwargs)[source]

Sectorwise MCP using Scipy’s linear regression.

Parameters:
  • n_sectors (int) – Number of sectors to fit independant regression models to. Default is 12 sectors.

  • quantiles (bool) – Whether to use a constant sector width or use quantiles. Default is True.

  • ws_cutoff (float)

  • model_kws (dict) – kwargs to input when the model is instanciated.

model
Type:

what model to use in each sector

models

one instanciated model per sector

Type:

list, shape (n_sectors,)

Methods

__init__([ws_cutoff])

fit(ds_ref, ds_tgt, **kwargs)

Fit the reference data to the target data by looping through the sectors and fitting the model to the data for that sector.

predict(ds_ref, **kwargs)

Predict the wind speed and direction from the reference data by looping through the sectors and predicting with the model for that sector.

wd_to_sector(wd[, recalc_sectors])

Convert wind direction to sectors using the object n_sectors and constant_sector_width values