diff --git a/examples/how_to_questions/report_concept_draft.ipynb b/examples/how_to_questions/report_concept_draft.ipynb index f6273c14c0..38073a66ad 100644 --- a/examples/how_to_questions/report_concept_draft.ipynb +++ b/examples/how_to_questions/report_concept_draft.ipynb @@ -95,8 +95,11 @@ "model = ensemble.RandomForestClassifier(random_state=1, n_estimators=10)\n", "model.fit(bcancer_ref[bcancer_data.feature_names.tolist()], bcancer_ref.target)\n", "\n", - "bcancer_ref['prediction'] = model.predict_proba(bcancer_ref[bcancer_data.feature_names.tolist()])[:, 1]\n", - "bcancer_cur['prediction'] = model.predict_proba(bcancer_cur[bcancer_data.feature_names.tolist()])[:, 1]" + "bcancer_ref['pos'] = model.predict_proba(bcancer_ref[bcancer_data.feature_names.tolist()])[:, 1]\n", + "bcancer_ref['neg'] = model.predict_proba(bcancer_ref[bcancer_data.feature_names.tolist()])[:, 0]\n", + "\n", + "bcancer_cur['pos'] = model.predict_proba(bcancer_cur[bcancer_data.feature_names.tolist()])[:, 1]\n", + "bcancer_cur['neg'] = model.predict_proba(bcancer_cur[bcancer_data.feature_names.tolist()])[:, 0]" ] }, { @@ -249,7 +252,8 @@ " ClassificationPerformance(),\n", "])\n", "\n", - "classification_performance_report.run(reference_data=bcancer_ref, current_data=bcancer_cur)\n", + "classification_performance_report.run(reference_data=bcancer_ref, current_data=bcancer_cur,\n", + " column_mapping=ColumnMapping(prediction='pos'))\n", "classification_performance_report" ] }, @@ -258,7 +262,14 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "cat_target_drift_report = Report(metrics=[\n", + " CatTargetDrift(),\n", + "])\n", + "\n", + "cat_target_drift_report.run(reference_data=iris_ref, current_data=iris_cur)\n", + "cat_target_drift_report" + ] } ], "metadata": { @@ -277,9 +288,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.9" + "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 1 -} \ No newline at end of file +} diff --git a/examples/sample_notebooks/getting_started_tutorial.ipynb b/examples/sample_notebooks/getting_started_tutorial.ipynb index 630f9d43d0..db740e5f69 100644 --- a/examples/sample_notebooks/getting_started_tutorial.ipynb +++ b/examples/sample_notebooks/getting_started_tutorial.ipynb @@ -75,11 +75,11 @@ "\n", "from evidently.pipeline.column_mapping import ColumnMapping\n", "\n", - "from evidently.dashboard import Dashboard\n", - "from evidently.dashboard.tabs import DataDriftTab, NumTargetDriftTab\n", + "from evidently.report import Report\n", + "from evidently.metric_preset import DataDrift, NumTargetDrift\n", "\n", "from evidently.test_suite import TestSuite\n", - "from evidently.test_preset import DataQuality, DataStability, DataDrift\n", + "from evidently.test_preset import DataQuality, DataStability\n", "from evidently.tests import *" ] }, @@ -195,7 +195,7 @@ } }, "source": [ - "## Dashboard" + "## Report" ] }, { @@ -209,9 +209,10 @@ }, "outputs": [], "source": [ - "drift_dashboard = Dashboard(tabs=[DataDriftTab(), NumTargetDriftTab()])\n", - "drift_dashboard.calculate(reference, current)\n", - "drift_dashboard.show()" + "drift_report = Report(metrics=[DataDrift(), NumTargetDrift()])\n", + "\n", + "drift_report.run(reference_data=reference, current_data=current)\n", + "drift_report" ] }, { @@ -267,31 +268,11 @@ "#get JSON\n", "tests.json()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } - }, - { - "cell_type": "code", - "execution_count": null, - "id": "726e7b8e", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -305,9 +286,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.13" + "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/src/evidently/_version.py b/src/evidently/_version.py index 1e361c18bd..9146c7e722 100644 --- a/src/evidently/_version.py +++ b/src/evidently/_version.py @@ -1,5 +1,5 @@ #!/usr/bin/env python # coding: utf-8 -version_info = (0, 1, 56, "dev0") +version_info = (0, 1, 57, "dev0") __version__ = ".".join(map(str, version_info))