Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

feat: add ml.metrics.mean_absolute_error method#1910

Merged
GarrettWu merged 1 commit intomainfrom
garrettwu-ml-mae
Jul 15, 2025
Merged

feat: add ml.metrics.mean_absolute_error method#1910
GarrettWu merged 1 commit intomainfrom
garrettwu-ml-mae

Conversation

@GarrettWu
Copy link
Copy Markdown
Contributor

b/431861443

@GarrettWu GarrettWu requested review from shuoweil and sycai July 15, 2025 20:24
@GarrettWu GarrettWu self-assigned this Jul 15, 2025
@GarrettWu GarrettWu requested review from a team July 15, 2025 20:24
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jul 15, 2025
def test_mean_absolute_error(session: bigframes.Session):
pd_df = pd.DataFrame({"y_true": [3, -0.5, 2, 7], "y_pred": [2.5, 0.0, 2, 8]})
df = session.read_pandas(pd_df)
mse = metrics.mean_absolute_error(df["y_true"], df["y_pred"])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: empty line below the "mse = ...":
go/unit-testing-practices?polyglot=python#structure

@GarrettWu GarrettWu merged commit 15b8449 into main Jul 15, 2025
20 of 25 checks passed
@GarrettWu GarrettWu deleted the garrettwu-ml-mae branch July 15, 2025 21:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants