uf3.regression.least_squares.batched_prediction

batched_prediction(model: uf3.regression.least_squares.WeightedLinearModel, filename: str, table_names: Optional[Collection] = None, subset_keys: Optional[Collection] = None, **kwargs)[source]

Convenience function for optimization workflow. Read inputs/outputs from HDF5 file and predict using fitted model.

Parameters
  • filename (str) – path to HDF5 file.

  • model (WeightedLinearModel) – fitted model.

  • table_names (list) – list of table names to query from HDF5 file.

  • subset_keys (list) – list of keys to query from DataFrame.

Returns

target values for energies. p_e (np.ndarray): prediction values for forces. y_f (np.ndarray): target values for energies. p_f (np.ndarray): target values for forces.

Return type

y_e (np.ndarray)