-
Notifications
You must be signed in to change notification settings - Fork 34
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
ENH: Add framework for property model parameter generation #251
ENH: Add framework for property model parameter generation #251
Conversation
…ngle set of features
…s successive The goal here is that we may have some models that don't want to use `make_successive` for feature sets.
modifies ESPEI code and def breaks gibbs energies, using this commit for backup
Factor out TDB analysis from notebook 2 Start moving get_data_quantities to a FittingStep staticmethod
Binary VM (VA) fitting looks like it works now!
The changes are mostly in adding parameters and not really the fitting itself - that was working. This may be throwaway code (see the comment added), so it's not too complex.
The idea of the modified version is that we also compute the actual site fractions because individual site fractions are not currently handled by ESPEI, but can slip in from existing models if not using a reference state where those contributions cancel (e.g. no _MIX or _FORM refstates keep the unary extrapolation). to do this, we'll use the config tuple and create site fractions from the points dict. tests currently pass locally
tests still passing
fit_formation_energy -> fit_parameters
passing tests
It's working!
Pass through all the function indirection.
Add it to AbstractRKMPropertyStep
…tion.utils from espei.parameter_selection.utils import _get_sample_condition_dicts to from espei.error_functions.non_equilibrium_thermochemical_error import get_sample_condition_dicts
VA is normalized per atom
This is useful for organizing datasets for different runs while having one single source of truth for the data
@nury12n if you could review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments regarding the fitting steps, mainly thoughts I had when working with the FittingStep and AbstractLinearFittingStep classes, but I think it'd probably be better to leave as is.
I gave some thought about the diffusing species and I think it'll make more sense to consider them after there's some support in kawin for mobility fitting.
Thanks for reviewing! Since PyCalphad supports diffusion species, it's something that could be in scope for ESPEI, but my guess is that there are assumptions elsewhere in the parameter generation code that would need to be broken to be able to handle that extra dimension that parameters can also be a function of diffusing species. At least, I think having these |
Tests are passing on pycalphad development versions and not release versions (as expected from pycalphad/pycalphad#501). Merging |
This is a significant feature improvement that introduces the concept of a
ModelFittingDescription
made up ofFittingStep
objects to tell ESPEI how to generate model parameters (with a capability to support generating parameters for custom models). In addition, these changes include:espei.paramselect
, the main module for parameter selection:fit_ternary_interactions
function was completely removed and binary and ternary interactions now run the exact same code path.fit_parameters
, which now relies on dependency injection of a fitting description to know what fitting steps to take (we try to not make any assumptions about what parameters or data types are being fit) and this function is more streamlined to 1) select relevant data from datasets, 2) get the RHS (b
inAx=b
) of the linear problem from the fitting step, 3) build candidate models (build a collection feature matrices,A
), 4) select the best model from the candidates, and 5) insert the parameter and coefficients for the best model into the databaseespei.parameter_selection.utils
. Some of the functionality got moved to be in fitting steps, andget_sample_condition_dicts
was moved toespei.error_functions.non_equilibrium_thermochemical_error
, withget_prop_samples
that it is used in conjunction with. Trying to have fewer "utils" modules.This PR relies on pycalphad/pycalphad#501 that includes fixes for molar volume models. Tests will probably fail until that gets into the development branch.
Closes #5