This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unique = np.unique(df[['Rank 1','Rank 2','Rank 3','Rank 78','Rank 79','Rank 80']]) | |
factors = np.arange(len(unique)) | |
df[['Rank 1','Rank 2','Rank 3','Rank 78','Rank 79','Rank 80']] = df[['Rank 1','Rank 2','Rank 3','Rank 78','Rank 79','Rank 80']].replace(unique, factors) | |
df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import whylogs as why | |
result = why.log(pandas=wine_target) | |
prof_view = result.view() | |
result_ref = why.log(pandas=wine_reference) | |
prof_view_ref = result_ref.view() | |
from whylogs.viz import NotebookProfileVisualizer | |
visualization = NotebookProfileVisualizer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add some missing values to a feature to see how they | |
ixs = wine.iloc[100:110].index | |
wine.loc[ixs,'citric acid'] = None | |
bins = (2, 6.5, 8) | |
group_names = ['bad', 'good'] | |
wine_reference['quality'] = pd.cut(wine_reference['quality'], bins = bins, labels = group_names) | |
wine_target['quality'] = pd.cut(wine_target['quality'], bins = bins, labels = group_names) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cond_reference = (wine['alcohol']<=11) | |
wine_reference = wine.loc[cond_reference] | |
cond_target = (wine['alcohol']>11) | |
wine_target = wine.loc[cond_target] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from whylogs.viz import NotebookProfileVisualizer | |
visualization = NotebookProfileVisualizer() | |
visualization.set_profiles(target_profile_view=prof_view, reference_profile_view=prof_view_ref) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# write the Difference Distribution bar chart of the citric acid feature to file | |
# in an output subdirectory | |
import os | |
os.getcwd() | |
visualization.write( | |
rendered_html=visualization.difference_distribution_chart( | |
feature_name="citric acid", profile="target" | |
), | |
html_file_name=os.getcwd() + "/output/diff_dist_citric_acid_example", | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
values = {'Timestamp':['5/20/2022 19:44:43', '5/20/2022 20:14:36', | |
'5/20/2022 20:14:38', '5/20/2022 20:14:39', | |
'5/20/2022 19:44:43', '5/20/2022 20:14:46', | |
'5/20/2022 20:14:47', '5/20/2022 19:44:49', | |
'5/20/2022 20:14:51', '5/20/2022 20:14:53', | |
'5/20/2022 20:14:56'], | |
'Build':[6, 4, 6, 6, 3, 6, 1, 4, 5, 6, 2], | |
'Story':[6, 3, 6, 5, 6, 3, 1, 3, 3, 3, 1], | |
'Design':[6, 6, 5, 4, 4, 4, 2, 6, 1, 2, 2], | |
'Systems':[6, 2, 6, 1, 1, 5, 6, 1, 2, 3, 2], |
NewerOlder