Skip to content

Commit a50e569

Browse files
committed
Adding reports
1 parent 53a4f3d commit a50e569

13 files changed

+29685
-0
lines changed

deepchecks (1).html

+635
Large diffs are not rendered by default.

deepchecks (2).html

+635
Large diffs are not rendered by default.

deepchecks.html

+635
Large diffs are not rendered by default.

evidently_metric_report.html

+672
Large diffs are not rendered by default.

evidently_test_report.html

+672
Large diffs are not rendered by default.

get_reports.py

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import os
2+
os.environ['WHYLOGS_NO_ANALYTICS']='True'
3+
4+
from deepchecks.tabular.suites import full_suite
5+
from evidently.metric_preset import (
6+
DataDriftPreset, DataQualityPreset, TargetDriftPreset, RegressionPreset, ClassificationPreset
7+
)
8+
9+
from evidently.report import Report
10+
from evidently.test_preset import (
11+
DataStabilityTestPreset, DataQualityTestPreset,
12+
BinaryClassificationTestPreset, BinaryClassificationTopKTestPreset,
13+
DataDriftTestPreset, MulticlassClassificationTestPreset,
14+
RegressionTestPreset
15+
)
16+
17+
from evidently.test_suite import TestSuite
18+
from sklearn.datasets import load_iris
19+
from sklearn.linear_model import LogisticRegression
20+
from sklearn.model_selection import train_test_split
21+
import whylogs as why
22+
from whylogs.viz import NotebookProfileVisualizer
23+
24+
from ydata_profiling import ProfileReport
25+
26+
27+
def run_why(df):
28+
why_results = why.log(df)
29+
prof_view = why_results.view()
30+
visualization = NotebookProfileVisualizer()
31+
visualization.set_profiles(target_profile_view=prof_view, reference_profile_view=prof_view)
32+
33+
visualization.write(
34+
rendered_html=visualization.profile_summary(),
35+
html_file_name=os.getcwd() + "/why_profile_summary",
36+
)
37+
38+
visualization.write(
39+
rendered_html=visualization.double_histogram(feature_name=df.columns),
40+
html_file_name=os.getcwd() + "/why_double_histogram",
41+
)
42+
43+
visualization.write(
44+
rendered_html=visualization.feature_statistics(feature_name=df.columns),
45+
html_file_name=os.getcwd() + "/why_feature_statistics",
46+
)
47+
48+
def run_evidently(df):
49+
evidently_test_report= TestSuite(tests=[
50+
DataStabilityTestPreset(), DataQualityTestPreset(), BinaryClassificationTestPreset(),
51+
DataDriftTestPreset(),
52+
MulticlassClassificationTestPreset(), RegressionTestPreset()
53+
])
54+
55+
evidently_test_report.run(current_data=df.iloc[:60], reference_data=df.iloc[60:], column_mapping=None)
56+
evidently_test_report.save_html("evidently_test_report.html")
57+
58+
evidently_metric_report = Report(metrics=[
59+
DataDriftPreset(), DataQualityPreset(), TargetDriftPreset(),
60+
RegressionPreset(), ClassificationPreset()
61+
])
62+
63+
evidently_metric_report.run(current_data=df.iloc[:60], reference_data=df.iloc[60:], column_mapping=None)
64+
evidently_metric_report.save_html("evidently_metric_report.html")
65+
66+
def run_deepchecks(df):
67+
suite = full_suite()
68+
train_df = train_dataset=df.iloc[:60]
69+
test_df = test_dataset=df.iloc[60:]
70+
71+
model = LogisticRegression().fit(train_df.drop(columns="target"), train_df["target"])
72+
suite_result = suite.run(train_dataset=train_df, test_dataset=test_df, model=model)
73+
suite_result.save_as_html("deepchecks.html")
74+
75+
def run_profiler(df):
76+
profile = ProfileReport(df, title="Profiling Report")
77+
profile.to_file("ydata_profiling.html")
78+
79+
def main():
80+
iris = load_iris(as_frame=True)
81+
df = iris["data"]
82+
df["target"] = iris["target"]
83+
df["prediction"] = iris["target"]
84+
85+
run_why(df)
86+
run_evidently(df)
87+
run_deepchecks(df)
88+
run_profiler(df)
89+
90+
if __name__ == "__main__":
91+
main()

poetry.lock

+5,134
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[tool.poetry]
2+
name = "python-data-profiler-comp"
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["James Bristow <[email protected]>"]
6+
readme = "README.md"
7+
8+
[tool.poetry.dependencies]
9+
python = ">=3.11,<3.12"
10+
ydata-profiling = "^4.6.5"
11+
pandas = "<=2.0.3"
12+
numpy = "<1.26"
13+
matplotlib = "<3.8.0"
14+
statsmodels = "^0.14.1"
15+
seaborn = "<0.13"
16+
pydantic = "^2.6.3"
17+
evidently = "^0.4.16"
18+
httpx = "^0.27.0"
19+
scikit-learn = "<=1.3.0"
20+
plotly = "^5.19.0"
21+
deepchecks = "<0.17.3"
22+
scipy = "<1.11.4"
23+
whylogs = {extras = ["viz"], version = "^1.3.24"}
24+
great-expectations = "^0.18.10"
25+
kaleido = "0.2.1"
26+
pycaret = "<=3.0.4"
27+
28+
29+
[build-system]
30+
requires = ["poetry-core"]
31+
build-backend = "poetry.core.masonry.api"

requirements.txt

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
altair==4.2.2
2+
annotated-types==0.6.0
3+
anyio==4.3.0
4+
appdirs==1.4.4
5+
argon2-cffi==23.1.0
6+
argon2-cffi-bindings==21.2.0
7+
attrs==23.2.0
8+
backcall==0.2.0
9+
beautifulsoup4==4.12.3
10+
bleach==6.1.0
11+
blinker==1.7.0
12+
category-encoders==2.6.3
13+
certifi==2024.2.2
14+
cffi==1.16.0
15+
charset-normalizer==3.3.2
16+
click==8.1.7
17+
cloudpickle==3.0.0
18+
colorama==0.4.6
19+
comm==0.2.1
20+
contourpy==1.2.0
21+
cryptography==42.0.5
22+
cycler==0.12.1
23+
Cython==3.0.8
24+
dacite==1.8.1
25+
dash==2.15.0
26+
dash-core-components==2.0.0
27+
dash-html-components==2.0.0
28+
dash-table==5.0.0
29+
debugpy==1.8.1
30+
decorator==5.1.1
31+
deepchecks==0.17.2
32+
defusedxml==0.7.1
33+
deprecation==2.1.0
34+
distro==1.9.0
35+
dynaconf==3.2.4
36+
entrypoints==0.4
37+
evidently==0.4.16
38+
Faker==23.3.0
39+
fastjsonschema==2.19.1
40+
filelock==3.13.1
41+
Flask==3.0.2
42+
fonttools==4.49.0
43+
fsspec==2024.2.0
44+
great-expectations==0.18.10
45+
h11==0.14.0
46+
htmlmin==0.1.12
47+
httpcore==1.0.4
48+
httpx==0.27.0
49+
idna==3.6
50+
ImageHash==4.3.1
51+
imbalanced-learn==0.12.0
52+
importlib-metadata==7.0.1
53+
ipykernel==6.27.1
54+
ipython==7.34.0
55+
ipython-genutils==0.2.0
56+
ipywidgets==7.8.1
57+
iterative-telemetry==0.0.8
58+
itsdangerous==2.1.2
59+
jedi==0.19.1
60+
Jinja2==3.1.3
61+
joblib==1.3.2
62+
jsonpatch==1.33
63+
jsonpickle==3.0.3
64+
jsonpointer==2.4
65+
jsonschema==4.21.1
66+
jsonschema-specifications==2023.12.1
67+
jupyter_client==8.6.0
68+
jupyter_core==5.7.1
69+
jupyter-server==1.16.0
70+
jupyterlab_pygments==0.3.0
71+
jupyterlab-widgets==1.1.7
72+
kaleido==0.2.1
73+
kiwisolver==1.4.5
74+
lightgbm==4.3.0
75+
litestar==2.6.1
76+
llvmlite==0.41.1
77+
makefun==1.15.2
78+
markdown-it-py==3.0.0
79+
MarkupSafe==2.1.5
80+
marshmallow==3.21.0
81+
matplotlib==3.7.5
82+
matplotlib-inline==0.1.6
83+
mdurl==0.1.2
84+
mistune==3.0.2
85+
msgspec==0.18.6
86+
multidict==6.0.5
87+
multimethod==1.11.2
88+
mypy-extensions==1.0.0
89+
nbclassic==1.0.0
90+
nbclient==0.9.0
91+
nbconvert==7.16.1
92+
nbformat==5.9.2
93+
nest-asyncio==1.6.0
94+
networkx==3.2.1
95+
nltk==3.8.1
96+
notebook==6.5.4
97+
notebook_shim==0.2.4
98+
numba==0.58.1
99+
numpy==1.24.4
100+
orjson==3.9.15
101+
packaging==23.2
102+
pandas==1.5.3
103+
pandocfilters==1.5.1
104+
parso==0.8.3
105+
patsy==0.5.6
106+
pexpect==4.9.0
107+
phik==0.12.4
108+
pickleshare==0.7.5
109+
Pillow==9.5.0
110+
pip==23.3.1
111+
platformdirs==3.11.0
112+
plotly==5.19.0
113+
plotly-resampler==0.9.2
114+
pmdarima==2.0.4
115+
polyfactory==2.14.1
116+
prometheus_client==0.20.0
117+
prompt-toolkit==3.0.43
118+
protobuf==4.25.3
119+
psutil==5.9.8
120+
ptyprocess==0.7.0
121+
pybars3==0.9.7
122+
pycaret==3.0.0
123+
pycparser==2.21
124+
pydantic==2.6.3
125+
pydantic_core==2.16.3
126+
Pygments==2.17.2
127+
PyMeta3==0.5.1
128+
PyNomaly==0.3.3
129+
pyod==1.1.3
130+
pyparsing==3.1.1
131+
python-dateutil==2.9.0
132+
python-utils==3.8.2
133+
pytz==2024.1
134+
PyWavelets==1.5.0
135+
PyYAML==6.0.1
136+
pyzmq==23.2.1
137+
referencing==0.33.0
138+
regex==2023.12.25
139+
requests==2.31.0
140+
retrying==1.3.4
141+
rich==13.7.1
142+
rich-click==1.7.3
143+
rpds-py==0.18.0
144+
ruamel.yaml==0.17.17
145+
schemdraw==0.18
146+
scikit-base==0.7.3
147+
scikit-learn==1.3.0
148+
scikit-plot==0.3.7
149+
scipy==1.11.3
150+
seaborn==0.12.2
151+
Send2Trash==1.8.2
152+
setuptools==69.1.1
153+
six==1.16.0
154+
sktime==0.27.0
155+
sniffio==1.3.1
156+
soupsieve==2.5
157+
statsmodels==0.14.1
158+
tangled-up-in-unicode==0.2.0
159+
tbats==1.1.3
160+
tenacity==8.2.3
161+
terminado==0.18.0
162+
threadpoolctl==3.3.0
163+
tinycss2==1.2.1
164+
toolz==0.12.1
165+
tornado==6.4
166+
tqdm==4.66.2
167+
traitlets==5.14.1
168+
tsdownsample==0.1.2
169+
typeguard==4.1.5
170+
typer==0.9.0
171+
types-requests==2.31.0.20240218
172+
typing_extensions==4.10.0
173+
typing-inspect==0.9.0
174+
tzdata==2024.1
175+
tzlocal==5.2
176+
urllib3==2.2.1
177+
uvicorn==0.27.1
178+
visions==0.7.5
179+
watchdog==4.0.0
180+
wcwidth==0.2.13
181+
webencodings==0.5.1
182+
websocket-client==1.7.0
183+
Werkzeug==3.0.1
184+
whylabs-client==0.5.10
185+
whylogs==1.3.24
186+
whylogs-sketching==3.4.1.dev3
187+
widgetsnbextension==3.6.6
188+
wordcloud==1.9.3
189+
wurlitzer==3.0.3
190+
xxhash==3.4.1
191+
ydata-profiling==4.6.5
192+
yellowbrick==1.5
193+
zipp==3.17.0

0 commit comments

Comments
 (0)