Skip to content

Commit

Permalink
use pandas kendall tau instead of scipy (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcarter23 authored Oct 17, 2023
1 parent c089a9a commit d13a4f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/insight/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
import pandas as pd
from scipy.spatial.distance import jensenshannon
from scipy.stats import entropy, kendalltau, wasserstein_distance
from scipy.stats import entropy, wasserstein_distance

from ..check import Check, ColumnCheck
from .base import OneColumnMetric, TwoColumnMetric
Expand Down Expand Up @@ -89,7 +89,7 @@ def _compute_metric(self, sr_a: pd.Series, sr_b: pd.Series):
if hasattr(sr_b, "cat") and sr_b.cat.ordered:
sr_b = sr_b.cat.codes

corr, _ = kendalltau(sr_a.values, sr_b.values, nan_policy="omit")
corr = sr_a.corr(sr_b, method="kendall")

return corr

Expand Down

0 comments on commit d13a4f4

Please sign in to comment.