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:
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