mirror of
https://github.com/ANL-CEEESA/LLEPE.git
synced 2025-12-06 01:48:53 -06:00
Updated iterative_fitter.py to calculate error for all species. Added new test with mean squared error.
This commit is contained in:
@@ -75,7 +75,7 @@ estimator.set_custom_objects_dict({'lin_param_df': new_lin_param_df})
|
||||
estimator.set_dependant_params_dict(dependant_params_dict)
|
||||
estimator.update_xml(ext_h0_dict,
|
||||
dependant_params_dict=dependant_params_dict)
|
||||
eps = 1e-8
|
||||
eps = 1e-20
|
||||
mini_eps = 1e-4
|
||||
pitzer_guess_dict = {'species': [],
|
||||
'beta0': [],
|
||||
@@ -105,7 +105,7 @@ i = 0
|
||||
rel_diff = 1000
|
||||
obj_diff1 = 1000
|
||||
obj_diff2 = 1000
|
||||
while obj_diff1 > eps and obj_diff2 > eps:
|
||||
while obj_diff1 > eps or obj_diff2 > eps:
|
||||
i += 1
|
||||
print(i)
|
||||
best_obj = 1e20
|
||||
@@ -154,7 +154,7 @@ while obj_diff1 > eps and obj_diff2 > eps:
|
||||
estimator.set_opt_dict(info_dict)
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(info_dict)
|
||||
obj_kwargs = {'species_list': [species], 'epsilon': 1e-100}
|
||||
obj_kwargs = {'species_list': species_list, 'epsilon': 1e-100}
|
||||
bounds = [(1e-1, 1e1)] * len(info_dict)
|
||||
optimizer_kwargs = {"method": 'l-bfgs-b',
|
||||
"bounds": bounds}
|
||||
@@ -237,7 +237,7 @@ while obj_diff1 > eps and obj_diff2 > eps:
|
||||
del(output_dict['rel_diff'][-1])
|
||||
output_dict['rel_diff'].append(rel_diff)
|
||||
output_df = pd.DataFrame(output_dict)
|
||||
output_df.to_csv('outputs/iterative_fitter_output1.csv')
|
||||
output_df.to_csv('outputs/iterative_fitter_output4.csv')
|
||||
obj_diff1 = np.abs(output_dict['best_obj'][-1]-output_dict['best_obj'][-2])
|
||||
if i > 2:
|
||||
obj_diff2 = np.abs(
|
||||
|
||||
128
docs/Examples/iterative_fitter_eval_grapher.py
Normal file
128
docs/Examples/iterative_fitter_eval_grapher.py
Normal file
@@ -0,0 +1,128 @@
|
||||
import llepe
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import json
|
||||
import matplotlib as plt
|
||||
import matplotlib
|
||||
|
||||
font = {'family': 'sans serif',
|
||||
'size': 24}
|
||||
matplotlib.rc('font', **font)
|
||||
plt.rc('xtick', labelsize=18)
|
||||
plt.rc('ytick', labelsize=18)
|
||||
|
||||
def ext_to_complex(h0, custom_obj_dict, mini_species):
|
||||
linear_params = custom_obj_dict['lin_param_df']
|
||||
row = linear_params[linear_params['species'] == mini_species]
|
||||
return row['slope'].values[0] * h0[0] + row['intercept'].values[0]
|
||||
|
||||
|
||||
def mod_lin_param_df(lp_df, input_val, mini_species, mini_lin_param):
|
||||
new_lp_df = lp_df.copy()
|
||||
index = new_lp_df.index[new_lp_df['species'] == mini_species].tolist()[0]
|
||||
new_lp_df.at[index, mini_lin_param] = input_val
|
||||
return new_lp_df
|
||||
|
||||
|
||||
info_df = pd.read_csv('outputs/iterative_fitter_output2.csv')
|
||||
pitzer_params_filename = "../../data/jsons/min_h0_pitzer_params.txt"
|
||||
with open(pitzer_params_filename) as file:
|
||||
pitzer_params_dict = json.load(file)
|
||||
pitzer_params_df = pd.DataFrame(pitzer_params_dict)
|
||||
species_list = 'Nd,Pr,Ce,La,Dy,Sm,Y'.split(',')
|
||||
pitzer_param_list = ['beta0', 'beta1']
|
||||
labeled_data = pd.read_csv("../../data/csvs/"
|
||||
"PC88A_HCL_NdPrCeLaDySmY.csv")
|
||||
exp_data = labeled_data.drop(labeled_data.columns[0], axis=1)
|
||||
xml_file = "PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml"
|
||||
lin_param_df = pd.read_csv("../../data/csvs"
|
||||
"/zeroes_removed_min_h0_pitzer_lin_params.csv")
|
||||
estimator_params = {'exp_data': exp_data,
|
||||
'phases_xml_filename': xml_file,
|
||||
'phase_names': ['HCl_electrolyte', 'PC88A_liquid'],
|
||||
'aq_solvent_name': 'H2O(L)',
|
||||
'extractant_name': '(HA)2(org)',
|
||||
'diluant_name': 'dodecane',
|
||||
'complex_names': ['{0}(H(A)2)3(org)'.format(species)
|
||||
for species in species_list],
|
||||
'extracted_species_ion_names': ['{0}+++'.format(species)
|
||||
for species in
|
||||
species_list],
|
||||
'aq_solvent_rho': 1000.0,
|
||||
'extractant_rho': 960.0,
|
||||
'diluant_rho': 750.0,
|
||||
'temp_xml_file_path': 'outputs/temp.xml',
|
||||
'objective_function': llepe.lmse_perturbed_obj
|
||||
}
|
||||
dependant_params_dict = {}
|
||||
for species, complex_name in zip(species_list,
|
||||
estimator_params['complex_names']):
|
||||
inner_dict = {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': complex_name,
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'function': ext_to_complex,
|
||||
'kwargs': {"mini_species": species},
|
||||
'independent_params': '(HA)2(org)_h0'}
|
||||
dependant_params_dict['{0}_h0'.format(complex_name)] = inner_dict
|
||||
info_dict = {'(HA)2(org)_h0': {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': '(HA)2(org)',
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'input_value':
|
||||
info_df.iloc[-1, :]['best_ext_h0']}}
|
||||
for species in species_list:
|
||||
for pitzer_param in pitzer_param_list:
|
||||
pitzer_str = "{0}_{1}".format(species, pitzer_param)
|
||||
value = info_df.iloc[-1, :][pitzer_str]
|
||||
pitzer_params_dict[pitzer_str]['input_value'] = value
|
||||
lin_str = "{0}_slope".format(species)
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': 'slope'},
|
||||
'input_value': 3
|
||||
}
|
||||
info_dict[lin_str] = inner_dict
|
||||
lin_str = "{0}_intercept".format(species)
|
||||
value = info_df.iloc[-1, :][lin_str]
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': 'intercept'},
|
||||
'input_value': value
|
||||
}
|
||||
info_dict[lin_str] = inner_dict
|
||||
|
||||
info_dict.update(pitzer_params_dict)
|
||||
estimator = llepe.LLEPE(**estimator_params)
|
||||
estimator.set_custom_objects_dict({'lin_param_df': lin_param_df})
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(info_dict,
|
||||
dependant_params_dict=dependant_params_dict)
|
||||
exp_data = estimator.get_exp_df()
|
||||
feed_cols = []
|
||||
for col in exp_data.columns:
|
||||
if 'aq_i' in col:
|
||||
feed_cols.append(col)
|
||||
exp_data['total_re'] = exp_data[feed_cols].sum(axis=1)
|
||||
for species in species_list:
|
||||
save_name = 'outputs/parity_iterative_fitter_{0}_org_eq'.format(species)
|
||||
fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
c_data=exp_data[
|
||||
'total_re'].values,
|
||||
c_label='Feed total RE '
|
||||
'molarity (mol/L)',
|
||||
print_r_squared=True,
|
||||
save_path=save_name)
|
||||
# short_info_dict = {}
|
||||
# for key, value in info_dict.items():
|
||||
# short_info_dict[key] = value['input_value']
|
||||
# with open("outputs/iterative_fitter_short_info_dict.txt", 'w') as file:
|
||||
# json.dump(short_info_dict, file)
|
||||
1
docs/Examples/iterative_fitter_info_dict
Normal file
1
docs/Examples/iterative_fitter_info_dict
Normal file
@@ -0,0 +1 @@
|
||||
{"(HA)2(org)_h0": {"upper_element_name": "species", "upper_attrib_name": "name", "upper_attrib_value": "(HA)2(org)", "lower_element_name": "h0", "lower_attrib_name": null, "lower_attrib_value": null, "input_format": "{0}", "input_value": -1376882.3191117246}, "Nd_slope": {"custom_object_name": "lin_param_df", "function":
|
||||
0
docs/Examples/iterative_fitter_info_dict.txt
Normal file
0
docs/Examples/iterative_fitter_info_dict.txt
Normal file
274
docs/Examples/iterative_fitter_w_mse.py
Normal file
274
docs/Examples/iterative_fitter_w_mse.py
Normal file
@@ -0,0 +1,274 @@
|
||||
import llepe
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import json
|
||||
|
||||
|
||||
def mod_lin_param_df(lp_df, input_val, mini_species, mini_lin_param):
|
||||
new_lp_df = lp_df.copy()
|
||||
index = new_lp_df.index[new_lp_df['species'] == mini_species].tolist()[0]
|
||||
new_lp_df.at[index, mini_lin_param] = input_val
|
||||
return new_lp_df
|
||||
|
||||
|
||||
def ext_to_complex(h0, custom_obj_dict, mini_species):
|
||||
linear_params = custom_obj_dict['lin_param_df']
|
||||
mini_row = linear_params[linear_params['species'] == mini_species]
|
||||
val = mini_row['slope'].values[0] * h0[0] + mini_row['intercept'].values[0]
|
||||
return val
|
||||
|
||||
|
||||
species_list = 'Nd,Pr,Ce,La,Dy,Sm,Y'.split(',')
|
||||
pitzer_param_list = ['beta0', 'beta1']
|
||||
lin_param_list = ['intercept']
|
||||
short_info_filename = 'outputs/iterative_fitter_short_info_dict.txt'
|
||||
with open(short_info_filename) as file:
|
||||
short_info_dict = json.load(file)
|
||||
labeled_data = pd.read_csv("../../data/csvs/"
|
||||
"zeroes_removed_PC88A_HCL_NdPrCeLaDySmY.csv")
|
||||
exp_data = labeled_data.drop(labeled_data.columns[0], axis=1)
|
||||
xml_file = "PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml"
|
||||
lin_param_df = pd.read_csv("../../data/csvs"
|
||||
"/zeroes_removed_min_h0_pitzer_lin_params.csv")
|
||||
new_lin_param_df = lin_param_df.copy()
|
||||
for ind, row in lin_param_df.iterrows():
|
||||
new_lin_param_df.at[ind, 'slope'] = 3
|
||||
species = row['species']
|
||||
val = short_info_dict['{0}_intercept'.format(species)]
|
||||
new_lin_param_df.at[ind, 'intercept'] = val
|
||||
estimator_params = {'exp_data': exp_data,
|
||||
'phases_xml_filename': xml_file,
|
||||
'phase_names': ['HCl_electrolyte', 'PC88A_liquid'],
|
||||
'aq_solvent_name': 'H2O(L)',
|
||||
'extractant_name': '(HA)2(org)',
|
||||
'diluant_name': 'dodecane',
|
||||
'complex_names': ['{0}(H(A)2)3(org)'.format(species)
|
||||
for species in species_list],
|
||||
'extracted_species_ion_names': ['{0}+++'.format(species)
|
||||
for species in
|
||||
species_list],
|
||||
'aq_solvent_rho': 1000.0,
|
||||
'extractant_rho': 960.0,
|
||||
'diluant_rho': 750.0,
|
||||
'temp_xml_file_path': 'outputs/temp1.xml',
|
||||
'objective_function': llepe.mean_squared_error,
|
||||
'custom_objects_dict': {'lin_param_df': new_lin_param_df}
|
||||
}
|
||||
dependant_params_dict = {}
|
||||
for species, complex_name in zip(species_list,
|
||||
estimator_params['complex_names']):
|
||||
inner_dict = {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': complex_name,
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'function': ext_to_complex,
|
||||
'kwargs': {"mini_species": species},
|
||||
'independent_params': '(HA)2(org)_h0',
|
||||
}
|
||||
dependant_params_dict['{0}_h0'.format(complex_name)] = inner_dict
|
||||
info_dict = {'(HA)2(org)_h0': {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': '(HA)2(org)',
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'input_value':
|
||||
short_info_dict['(HA)2(org)_h0']}}
|
||||
for species in species_list:
|
||||
for param in pitzer_param_list:
|
||||
name = "{0}_{1}".format(species, param)
|
||||
inner_dict = {'upper_element_name': 'binarySaltParameters',
|
||||
'upper_attrib_name': 'cation',
|
||||
'upper_attrib_value': '{0}+++'.format(species),
|
||||
'lower_element_name': param,
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': ' {0}, 0.0, 0.0, 0.0, 0.0 ',
|
||||
'input_value':
|
||||
short_info_dict[name]}
|
||||
info_dict[name] = inner_dict
|
||||
for param in lin_param_list:
|
||||
name = "{0}_{1}".format(species, param)
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': param},
|
||||
'input_value': short_info_dict[name]
|
||||
}
|
||||
|
||||
estimator = llepe.LLEPE(**estimator_params)
|
||||
estimator.update_xml(info_dict,
|
||||
dependant_params_dict=dependant_params_dict)
|
||||
estimator.set_dependant_params_dict(dependant_params_dict)
|
||||
eps = 1e-20
|
||||
mini_eps = 1e-4
|
||||
pitzer_guess_dict = {'species': [],
|
||||
'beta0': [],
|
||||
'beta1': []}
|
||||
for species in species_list:
|
||||
pitzer_guess_dict['species'].append(species)
|
||||
for param in pitzer_param_list:
|
||||
mini_dict = info_dict['{0}_{1}'.format(species, param)]
|
||||
value = mini_dict['input_value']
|
||||
pitzer_guess_dict[param].append(value)
|
||||
pitzer_guess_df = pd.DataFrame(pitzer_guess_dict)
|
||||
ext_h0_guess = info_dict['(HA)2(org)_h0']['input_value']
|
||||
lin_guess_df = new_lin_param_df.copy()
|
||||
|
||||
ignore_list = []
|
||||
optimizer = 'scipy_minimize'
|
||||
output_dict = {'iter': [0],
|
||||
'best_obj': [1e20],
|
||||
'rel_diff': [1e20],
|
||||
'best_ext_h0': [1e20]}
|
||||
for species in species_list:
|
||||
for lin_param in lin_param_list:
|
||||
output_dict['{0}_{1}'.format(species, lin_param)] = [1e20]
|
||||
for pitzer_param in pitzer_param_list:
|
||||
output_dict['{0}_{1}'.format(species, pitzer_param)] = [1e20]
|
||||
i = 0
|
||||
rel_diff = 1000
|
||||
obj_diff1 = 1000
|
||||
obj_diff2 = 1000
|
||||
while obj_diff1 > eps or obj_diff2 > eps:
|
||||
i += 1
|
||||
print(i)
|
||||
best_obj = 1e20
|
||||
best_ext_h0 = 0
|
||||
output_dict['iter'].append(i)
|
||||
for species in species_list:
|
||||
print(species)
|
||||
lower_species = species.lower()
|
||||
info_dict = {'(HA)2(org)_h0': {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': '(HA)2(org)',
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'input_value': ext_h0_guess}}
|
||||
|
||||
for pitzer_param in pitzer_param_list:
|
||||
if '{0}_{1}'.format(species, pitzer_param) not in ignore_list:
|
||||
pitzer_row = pitzer_guess_df[
|
||||
pitzer_guess_df['species'] == species]
|
||||
inner_dict = {'upper_element_name': 'binarySaltParameters',
|
||||
'upper_attrib_name': 'cation',
|
||||
'upper_attrib_value':
|
||||
'{0}+++'.format(species),
|
||||
'lower_element_name': pitzer_param,
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': ' {0}, 0.0, 0.0, 0.0, 0.0 ',
|
||||
'input_value':
|
||||
pitzer_row[pitzer_param].values[0]
|
||||
}
|
||||
info_dict['{0}_{1}'.format(
|
||||
species, pitzer_param)] = inner_dict
|
||||
for lin_param in lin_param_list:
|
||||
if '{0}_{1}'.format(species, lin_param) not in ignore_list:
|
||||
lin_row = lin_guess_df[lin_guess_df['species'] == species]
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': lin_param},
|
||||
'input_value': lin_row[lin_param].values[0]
|
||||
}
|
||||
info_dict['{0}_{1}'.format(
|
||||
species, lin_param)] = inner_dict
|
||||
estimator.set_opt_dict(info_dict)
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(info_dict)
|
||||
obj_kwargs = {'species_list': species_list}
|
||||
bounds = [(1e-1, 1e1)] * len(info_dict)
|
||||
optimizer_kwargs = {"method": 'l-bfgs-b',
|
||||
"bounds": bounds}
|
||||
opt_dict, obj_value = estimator.fit(
|
||||
objective_kwargs=obj_kwargs,
|
||||
optimizer_kwargs=optimizer_kwargs)
|
||||
if obj_value < best_obj:
|
||||
best_obj = obj_value
|
||||
best_ext_h0 = opt_dict['(HA)2(org)_h0']['input_value']
|
||||
|
||||
for lin_param in lin_param_list:
|
||||
if '{0}_{1}'.format(species, lin_param) not in ignore_list:
|
||||
mini_dict = opt_dict['{0}_{1}'.format(species, lin_param)]
|
||||
value = mini_dict['input_value']
|
||||
output_dict['{0}_{1}'.format(species, lin_param)].append(value)
|
||||
else:
|
||||
value = output_dict['{0}_{1}'.format(species, lin_param)][-1]
|
||||
output_dict['{0}_{1}'.format(species, lin_param)].append(value)
|
||||
for pitzer_param in pitzer_param_list:
|
||||
if '{0}_{1}'.format(species, pitzer_param) not in ignore_list:
|
||||
mini_dict = opt_dict['{0}_{1}'.format(species, pitzer_param)]
|
||||
value = mini_dict['input_value']
|
||||
output_dict['{0}_{1}'.format(
|
||||
species, pitzer_param)].append(value)
|
||||
else:
|
||||
value = output_dict['{0}_{1}'.format(
|
||||
species, pitzer_param)][-1]
|
||||
output_dict['{0}_{1}'.format(
|
||||
species, pitzer_param)].append(value)
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(opt_dict)
|
||||
pitzer_guess_dict = {'species': []}
|
||||
for pitzer_param in pitzer_param_list:
|
||||
pitzer_guess_dict[pitzer_param] = []
|
||||
lin_guess_dict = {'species': []}
|
||||
for lin_param in lin_param_list:
|
||||
lin_guess_dict[lin_param] = []
|
||||
for species in species_list:
|
||||
pitzer_guess_dict['species'].append(species)
|
||||
lin_guess_dict['species'].append(species)
|
||||
for pitzer_param in pitzer_param_list:
|
||||
pitzer_str = '{0}_{1}'.format(species, pitzer_param)
|
||||
value_list = output_dict['{0}_{1}'.format(species, pitzer_param)]
|
||||
value = value_list[-1]
|
||||
pitzer_guess_dict[pitzer_param].append(value)
|
||||
if i > 2:
|
||||
mini_rel_diff1 = np.abs(value_list[-1]
|
||||
- value_list[-2]) / (
|
||||
np.abs(value_list[-2]))
|
||||
mini_rel_diff2 = np.abs(value_list[-2] - value_list[-3]) / (
|
||||
np.abs(value_list[-3]))
|
||||
if mini_rel_diff1 < mini_eps and mini_rel_diff2 < mini_eps:
|
||||
if pitzer_str not in ignore_list:
|
||||
ignore_list.append(pitzer_str)
|
||||
for lin_param in lin_param_list:
|
||||
lin_str = '{0}_{1}'.format(species, lin_param)
|
||||
value_list = output_dict['{0}_{1}'.format(species, lin_param)]
|
||||
value = value_list[-1]
|
||||
lin_guess_dict[lin_param].append(value)
|
||||
if i > 2:
|
||||
mini_rel_diff1 = np.abs(value_list[-1]
|
||||
- value_list[-2]) / (
|
||||
np.abs(value_list[-2]))
|
||||
mini_rel_diff2 = np.abs(value_list[-2] - value_list[-3]) / (
|
||||
np.abs(value_list[-3]))
|
||||
if mini_rel_diff1 < mini_eps and mini_rel_diff2 < mini_eps:
|
||||
if lin_str not in ignore_list:
|
||||
ignore_list.append(lin_str)
|
||||
pitzer_guess_df = pd.DataFrame(pitzer_guess_dict)
|
||||
lin_guess_df = pd.DataFrame(lin_guess_dict)
|
||||
ext_h0_guess = best_ext_h0
|
||||
|
||||
output_dict['best_ext_h0'].append(best_ext_h0)
|
||||
output_dict['best_obj'].append(best_obj)
|
||||
output_dict['rel_diff'].append(100)
|
||||
output_df = pd.DataFrame(output_dict)
|
||||
old_row = output_df.iloc[-2, :].values[4:]
|
||||
new_row = output_df.iloc[-1, :].values[4:]
|
||||
rel_diff = np.sum(np.abs(new_row - old_row) / np.abs(old_row))
|
||||
del (output_dict['rel_diff'][-1])
|
||||
output_dict['rel_diff'].append(rel_diff)
|
||||
output_df = pd.DataFrame(output_dict)
|
||||
output_df.to_csv('outputs/iterative_fitter_w_mse_output.csv')
|
||||
obj_diff1 = np.abs(
|
||||
output_dict['best_obj'][-1] - output_dict['best_obj'][-2])
|
||||
if i > 2:
|
||||
obj_diff2 = np.abs(
|
||||
output_dict['best_obj'][-1] - output_dict['best_obj'][-3])
|
||||
1
docs/Examples/outputs/iterative_fitter_info_dict.txt
Normal file
1
docs/Examples/outputs/iterative_fitter_info_dict.txt
Normal file
@@ -0,0 +1 @@
|
||||
{"(HA)2(org)_h0": {"upper_element_name": "species", "upper_attrib_name": "name", "upper_attrib_value": "(HA)2(org)", "lower_element_name": "h0", "lower_attrib_name": null, "lower_attrib_value": null, "input_format": "{0}", "input_value": -1376882.3191117246}, "Nd_slope": {"custom_object_name": "lin_param_df", "function":
|
||||
@@ -33,7 +33,7 @@
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
<h0 units="J/mol" updated="Updated at 7:6 7-16-2020">-1376877.154483614</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-1376882.3191117246</h0>
|
||||
<s0 units="J/mol/K"> 558.9824 </s0>
|
||||
<cp0 units="J/mol/K"> 0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -50,7 +50,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4926549.797810851</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4925566.309854757</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -67,7 +67,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4935519.640701385</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4938249.845712334</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -85,7 +85,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4928317.781440989</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4920387.823199008</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -103,7 +103,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4927428.65973482</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4933548.865580005</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -120,7 +120,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4935155.356789877</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4932560.171447597</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -138,7 +138,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4944228.17930387</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4944840.781582316</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -157,7 +157,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 23:0 7-15-2020">-4925606.187988869</h0>
|
||||
<h0 units="J/mol" updated="Updated at 10:47 7-17-2020">-4924696.189921901</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -245,10 +245,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Pr+++">
|
||||
<beta0 updated="Updated at 1:53 7-16-2020"> 0.9335616000781043, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 1:53 7-16-2020"> 10.555396864028587, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 0.05879108748614492, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 0.5448324180244323, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -261,10 +261,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Nd+++">
|
||||
<beta0 updated="Updated at 1:36 7-16-2020"> 0.951206693355039, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 1:36 7-16-2020"> 9.262520235612426, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 1.2137222016802447, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 7.748226963005033, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -277,10 +277,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="La+++">
|
||||
<beta0 updated="Updated at 2:48 7-16-2020"> 0.5362669407654791, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 2:48 7-16-2020"> 19.878544145607385, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 1.022316535866388, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 0.5296311209773129, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -293,10 +293,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Dy+++">
|
||||
<beta0 updated="Updated at 2:48 7-16-2020"> 0.6129504699810289, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 2:48 7-16-2020"> 5.359936728131316, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 0.7646397332938777, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 7.849320590516409, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -309,10 +309,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Ce+++">
|
||||
<beta0 updated="Updated at 2:2 7-16-2020"> 0.3803360903827252, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 2:2 7-16-2020"> 0.4715334506120701, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 0.2035235053232368, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 21.120426174002823, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -325,10 +325,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Y+++">
|
||||
<beta0 updated="Updated at 1:26 7-16-2020"> 0.8864576562457522, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 1:26 7-16-2020"> 9.87156845120858, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 0.8852802073165494, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 9.334653075341238, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -341,10 +341,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Sm+++">
|
||||
<beta0 updated="Updated at 7:6 7-16-2020"> 0.6989806463779159, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 1:25 7-16-2020"> 6.8744371885601625, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 10:47 7-17-2020"> 0.6989081585234721, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 10:47 7-17-2020"> 6.877882600430561, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 23:0 7-15-2020"> -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
|
||||
Reference in New Issue
Block a user