core.components.benchmark.adsorption_reducer#

Copyright (c) Meta Platforms, Inc. and affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Attributes#

R

M

Classes#

AdsorptionReducer

A common pandas DataFrame reducer for benchmarks

Module Contents#

core.components.benchmark.adsorption_reducer.R#
core.components.benchmark.adsorption_reducer.M#
class core.components.benchmark.adsorption_reducer.AdsorptionReducer(benchmark_name: str, target_data_key: str | None = None, index_name: str | None = None)#

Bases: fairchem.core.components.benchmark.benchmark_reducer.JsonDFReducer

A common pandas DataFrame reducer for benchmarks

Results are assumed to be saved as json files that can be read into pandas dataframes. Only mean absolute error is computed for common columns in the predicted results and target data

index_name#
benchmark_name#
target_data_key#
compute_metrics(results: pandas.DataFrame, run_name: str) pandas.DataFrame#

Compute mean absolute error metrics for common columns between results and targets.

Parameters:
  • results – DataFrame containing prediction results

  • run_name – Name of the current run, used as index in the metrics DataFrame

Returns:

DataFrame containing computed metrics with run_name as index