This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pregnancies | Glucose | BloodPressure | SkinThickness | Insulin | BMI | DiabetesPedigreeFunction | Age | Outcome | |
---|---|---|---|---|---|---|---|---|---|
6 | 148 | 72 | 35 | 0 | 33.6 | 0.627 | 50 | 1 | |
1 | 85 | 66 | 29 | 0 | 26.6 | 0.351 | 31 | 0 | |
8 | 183 | 64 | 0 | 0 | 23.3 | 0.672 | 32 | 1 | |
1 | 89 | 66 | 23 | 94 | 28.1 | 0.167 | 21 | 0 | |
0 | 137 | 40 | 35 | 168 | 43.1 | 2.288 | 33 | 1 | |
5 | 116 | 74 | 0 | 0 | 25.6 | 0.201 | 30 | 0 | |
3 | 78 | 50 | 32 | 88 | 31 | 0.248 | 26 | 1 | |
10 | 115 | 0 | 0 | 0 | 35.3 | 0.134 | 29 | 0 | |
2 | 197 | 70 | 45 | 543 | 30.5 | 0.158 | 53 | 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np, itertools | |
import pandas as pd | |
import ot | |
from matplotlib import pyplot as plt | |
from matplotlib.collections import LineCollection | |
import seaborn as sns; sns.set() | |
from scipy.stats import multivariate_normal as mvn, norm | |
from sklearn.cluster import KMeans | |
import os | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def kendall_w(scores): | |
""" | |
:param scores: rows correspond to category levels, e.g., for QS this would be unc. sampling, CAL etc, and the | |
columns correspond to the scores. | |
:return: | |
""" | |
if scores.ndim!=2: |