def test_vat_call_compute_ivat_ordered_dissimilarity_matrix_to_obtain_the_ordered_matrix(
        mock_compute_vat):
    # given
    iris = datasets.load_iris()
    iris_dataset = iris.data
    mock_compute_vat.return_value = np.ones((3, 3))

    # when
    ivat(iris_dataset)

    # then
    mock_compute_vat.assert_called_once_with(iris_dataset)
def test_ivat_does_not_return_the_matrix_by_default(mock_compute_ivat):
    # given
    iris = datasets.load_iris()
    iris_dataset = iris.data
    mock_compute_ivat.return_value = np.ones((3, 3))

    # when
    output_result = ivat(iris_dataset)

    # then
    assert output_result is None
Ejemplo n.º 3
0
from sklearn.datasets import make_blobs
import matplotlib.pyplot as plt

X, y = make_blobs(n_samples=4000, centers=12, n_features=5)

eucEmbeddings = np.genfromtxt('facebooknode2vecEmbeddings.csv', delimiter=",")

hypEmbeddings = np.genfromtxt('facebookPoincareEmbeddings.csv', delimiter=",")

eucStat = pyc.hopkins(eucEmbeddings, 150)

hypStat = pyc.hopkins(hypEmbeddings, 150)

xStat = pyc.hopkins(X, 150)

print("Hopkins Statistic for euclidean embeddings: ", eucStat)

print("Hopkins Statistic for hyperbolic poincare embeddings: ", hypStat)

print("Hopkins Statistic for fake points: ", xStat)

pyc.ivat(X)
print("hello there")
'''eucScore =pyc.assess_tendency_by_metrics(eucEmbeddings)
hypScore =pyc.assess_tendency_by_metrics(hypEmbeddings)
xScore =pyc.assess_tendency_by_metrics(X)

print('eucScore: ', eucScore)
print('hypScore: ', hypScore)
print('xScore: ', xScore)'''
Ejemplo n.º 4
0
def draw_ivat(X):
    ivat(X)
    pass