Skip to content

Commit

Permalink
Addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh97 committed Sep 20, 2023
1 parent b2952bd commit 737da8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ads/feature_store/statistics/charts/box_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ def __init__(
self.box_points = box_points
super().__init__()

def __validate__(self):
if (
self.q1 is None
or self.q3 is None
or self.iqr is None
or type(self.box_points) is not list
or len(self.box_points) == 0
):
return self.ValidationFailedException()

def add_to_figure(self, fig: Figure, xaxis: int, yaxis: int):
xaxis_str, yaxis_str, x_str, y_str = self.get_x_y_str_axes(xaxis, yaxis)
fig.add_box(
Expand Down
6 changes: 6 additions & 0 deletions ads/feature_store/statistics/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ def kind(self) -> str:
return "statistics"

def to_viz(self, feature_list: List[str] = None):
"""Visualises statistics inside notebook
Parameters
----------
feature_list: (str, optional). Defaults to `None`.
The specific features of the FeatureGroup or Dataset we want to visualise
"""
if self.content is not None:
[
FeatureStatistics.from_json(feature, stat).to_viz()
Expand Down

0 comments on commit 737da8b

Please sign in to comment.