0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Databricks にて Evidently をとりあえず動かしてみる~Basic Example編~

Last updated at Posted at 2023-05-24

概要

Databricks にて Evidently という ML モデルのパフォーマンス監視ライブラリをとりあえず動かす方法を共有します。Evidently の Docs に記載されている Basic Example - Evidently Documentation (evidentlyai.com)をベースに実行する方法を提示します。

image.png

引用元:Evidently AI - Open-Source Machine Learning Monitoring

Issues に記載されていたのですが、Databricks 上で実行結果を表示する際にはmodeinlineに設定する必要があるようです。

Basic Example の実行手順

%pip install evidently -q

image.png

import pandas as pd
 
from sklearn import datasets
 
from evidently.test_suite import TestSuite
from evidently.test_preset import DataStabilityTestPreset
 
from evidently.report import Report
from evidently.metric_preset import DataDriftPreset
 
iris_data = datasets.load_iris(as_frame='auto')
iris_frame = iris_data.frame

image.png

data_stability= TestSuite(tests=[
    DataStabilityTestPreset(),
])
data_stability.run(current_data=iris_frame.iloc[:60], reference_data=iris_frame.iloc[60:], column_mapping=None)
data_stability.show(mode='inline')

image.png

data_drift_report = Report(metrics=[
    DataDriftPreset(),
])
 
data_drift_report.run(current_data=iris_frame.iloc[:60], reference_data=iris_frame.iloc[60:], column_mapping=None)
data_drift_report.show(mode='inline')

image.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?