Skip to content

Commit

Permalink
refactor: rename pd_ellipse -> grouped_confidence_regions
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Jan 17, 2025
1 parent e6c9c5f commit 7401a08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/examples_arguments_syntax/deviation_ellipses.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def confidence_region_2d(
return center + radius * (circle @ np.linalg.cholesky(cov_mat).T)


def pd_ellipse(
def grouped_confidence_regions(
df: pd.DataFrame, col_x: str, col_y: str, col_group: str
) -> pd.DataFrame:
cols = [col_x, col_y]
Expand All @@ -76,7 +76,7 @@ def pd_ellipse(
color = alt.Color(col_group)

source = data.iris()
ellipse = pd_ellipse(source, col_x=col_x, col_y=col_y, col_group=col_group)
ellipse = grouped_confidence_regions(source, col_x=col_x, col_y=col_y, col_group=col_group)
points = alt.Chart(source).mark_circle(size=50, tooltip=True).encode(x, y, color)
lines = (
alt.Chart(ellipse)
Expand Down
4 changes: 2 additions & 2 deletions tests/examples_methods_syntax/deviation_ellipses.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def confidence_region_2d(
return center + radius * (circle @ np.linalg.cholesky(cov_mat).T)


def pd_ellipse(
def grouped_confidence_regions(
df: pd.DataFrame, col_x: str, col_y: str, col_group: str
) -> pd.DataFrame:
cols = [col_x, col_y]
Expand All @@ -76,7 +76,7 @@ def pd_ellipse(
color = alt.Color(col_group)

source = data.iris()
ellipse = pd_ellipse(source, col_x=col_x, col_y=col_y, col_group=col_group)
ellipse = grouped_confidence_regions(source, col_x=col_x, col_y=col_y, col_group=col_group)
points = alt.Chart(source).mark_circle(size=50, tooltip=True).encode(x, y, color)
lines = (
alt.Chart(ellipse)
Expand Down

0 comments on commit 7401a08

Please sign in to comment.