energy_methods.ml21#
Seven-feature, yield-weighted PV clustering following de las Heras et al.
Published ML21 map labels are available through the separate source connector. This module fits new clusters; their numeric IDs are not the paper’s zone IDs.
- energy_methods.ml21.fit_ml21(values, specific_yield, *, provenance, feature_convention, n_clusters=21, random_seed=42, n_init=20)[source]#
Fit standardization, yield regression weights and k-means on training rows.
valuesfollows FEATURES.specific_yieldis a corresponding training target (kWh/kWp/year). The feature convention must declare units and source aggregation; the paper’s radiation statistics are retained natively by its workbook connector. It is unsafe to substitute physical annual totals into a model trained on a different radiation-statistic convention.Fit only training sites; reuse this frozen model on holdouts or new regions. This refits regression coefficients rather than copying rounded Table 4.
- Parameters:
values (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
specific_yield (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
provenance (ClimateProvenance)
feature_convention (str)
n_clusters (int)
random_seed (int)
n_init (int)
- Return type: