Skip to content

Commit

Permalink
fix error in sklift.viz
Browse files Browse the repository at this point in the history
Function check_matplotlib_support() has not been implemented. It will raise error when importing functions in sklift.viz
  • Loading branch information
QingyuGuo authored Dec 23, 2024
1 parent 0038e65 commit bb3e3b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sklift/viz/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import matplotlib.pyplot as plt
import numpy as np
from sklearn.utils.validation import check_consistent_length
from sklearn.utils import check_matplotlib_support
# from sklearn.utils import check_matplotlib_support

from ..utils import check_is_binary
from ..metrics import (
Expand Down Expand Up @@ -95,7 +95,7 @@ def plot(self, auc_score, ax=None, name=None, title=None, **kwargs):
Returns:
Object that stores computed values
"""
check_matplotlib_support('UpliftCurveDisplay.plot')
# check_matplotlib_support('UpliftCurveDisplay.plot')

name = self.estimator_name if name is None else name

Expand Down Expand Up @@ -174,7 +174,7 @@ def plot_qini_curve(y_true, uplift, treatment,
qini_disp.figure_.suptitle("Qini curve");
"""
check_matplotlib_support('plot_qini_curve')
# check_matplotlib_support('plot_qini_curve')
check_consistent_length(y_true, uplift, treatment)
check_is_binary(treatment)
check_is_binary(y_true)
Expand Down Expand Up @@ -238,7 +238,7 @@ def plot_uplift_curve(y_true, uplift, treatment,
uplift_disp.figure_.suptitle("Uplift curve");
"""
check_matplotlib_support('plot_uplift_curve')
# check_matplotlib_support('plot_uplift_curve')
check_consistent_length(y_true, uplift, treatment)
check_is_binary(treatment)
check_is_binary(y_true)
Expand Down

0 comments on commit bb3e3b2

Please sign in to comment.