Find RP
- reperiods.find_RP.poncelet.poncelet_method(data: DataFrame, curve_set: Index, N_RP: int, RP_length: int, N_bins: int = 15, solver: Any = None) list[RepresentativePeriods] [source]
Find representative periods (RPs) and their weights using the Poncelet et al. (2017) method.
- Parameters:
temporal_data (TemporalData) – A TemporalData object containing the input data.
data (DataFrame) – A DataFrame containing the data where RP will be found
curve_set (Index) – The set of curve
N_RP (int) – The number of representative periods to find.
RP_length (int) – The length of each representative period.
N_bins (int, optional) – The number of bins for duration curve discretization. Defaults to 15.
solver (pulp solver, optional) – The solver to use for optimization. Defaults to None. see : https://coin-or.github.io/pulp/guides/how_to_configure_solvers.html and https://coin-or.github.io/pulp/technical/solvers.html#module-pulp.apis
- Returns:
A list of RepresentativePeriods objects, each representing an RP with its weight.
- Return type:
list
- reperiods.find_RP.kmedoids.kmedoids_method(data: DataFrame, N_RP: int, RP_length: int) list[RepresentativePeriods] [source]
Generate representative periods (RPs) using the k-medoids clustering method. Weights are calculated proportionally to the number of representatives in each cluster.
- Parameters:
data (DataFrame) – A DataFrame containing the data where RP will be found.
N_RP (int) – The number of representative periods to generate.
RP_length (int) – The length of each representative period.
- Returns:
A list of RepresentativePeriods objects, each representing an RP with its weight.
- Return type:
list
- Raises:
ImportError – If the scikit-learn-extra package is not installed. Please install it by running: pip install reperiods[kmedoids].
- reperiods.find_RP.random.random_method(data: DataFrame, N_RP: int, RP_length: int) list[RepresentativePeriods] [source]
Generate representative periods (RPs) and their weights using random selection.
- Parameters:
data (DataFrame) – A DataFrame containing the data where RP will be found
N_RP (int) – The number of representative periods to generate.
RP_length (int) – The length of each representative period.
- Returns:
A list of RepresentativePeriods objects, each representing an RP with its weight.
- Return type:
list