-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fitting functions for spectral mismatch factor models #2242
Comments
I don't think there is consensus on this topic. I'll give my 2 cents. In general, I think determining model parameter values is just as deserving of reference and validation as the models themselves are, and in pvlib we should strive for high rigor for both models and parameter estimation methods.
I'd say both approaches can result in worthy additions. We just would need to make sure the function is documented and named accordingly. Either way, a suitable reference is needed.
Lacking a reference means no specification and no validation. Communication with the author could potentially address the former, but the latter would likely remain unresolved. I think the answer here is that it probably depends on the method, with some amount of case-by-case judgement call being required.
I don't think a reference validating OLS (or whatever) is very helpful. I'd want to see something that somehow relates the underlying math (OLS, etc) with the application (e.g. the PVSPEC model), for example by showing that it produces reasonable values for a range of PV technologies, climates, etc, or why some transformation (e.g. performing OLS in log space) was chosen, or what motivated those specific optimization bounds, or... |
Perhaps a gallery example? |
In my opinion, validating a parameter estimation method should be done in a manner that demonstrates that the method has two properties:
One way to demonstrate the first property is as follows:
The second property can be shown by constructing a model that generates representative measurement error, repeating steps #1 and #2 above, generating many realizations of calculated model output with error applied, fitting the model to each realization, and examining statistics for the fitted model. |
Is your feature request related to a problem? Please describe.
The
spectrum.spectral_factor.*
functions offer model coefficients but pvlib currently has no functionality for users to derive model coefficients from their own data.Describe the solution you'd like
I'd like to implement surface fitting functions for:
spectrum.spectral_factor_pvspec()
spectrum.spectral_factor_jrc()
spectrum.spectral_factor_firstsolar()
and a polynomial fitting function for:
spectrum.spectral_factor_sapm
Additional context
Some questions:
Following on from the discussion about references and fitting functions in Add method to fit Huld model #1979 (related: What is the standard for inclusion of features in pvlib? #1898), would the fitting functions here need to reproduce the fitting methods adopted in the original publications, or would a generic fitting tool be okay?
By generic tool, I mean, for example, a common method like Ordinary Least Squares using established python packages such as
scipy.optimize
andstatsmodels
in order to fit to the published model parameterisation.If the former (reproducing the published method), but the precise method is not mentioned in the reference, would communication from the author confirming the adopted method be sufficient?
If a generic tool is okay then what would a suitable reference be? A maths/stats papers corroborating the method's validity? Reputable examples (PV or non-PV?) of its application?
The text was updated successfully, but these errors were encountered: