uf3.representation.process.dataframe_to_training_tuples

dataframe_to_training_tuples(df_features, kappa=0.5, energy_key='energy')[source]
Parameters
  • df_features (pd.DataFrame) – dataframe with target vector (y) as the first column and feature vectors (x) as remaining columns.

  • kappa (float) – energy-force weighting parameter between 0 and 1.

  • energy_key (str) – key for energy samples, used to slice df_features into energies and forces for weight generation.

TODO: refactor to break up into smaller, reusable functions

Returns

features for machine learning. y (np.ndarray): target vector. w (np.ndarray): weight vector for machine learning.

Return type

x (np.ndarray)