def test_bad_numeric_init(): u = VMAP(init=42) assert_raises(ValueError, u.fit, nn_data)
def test_negative_sample_rate(): u = VMAP(negative_sample_rate=-1) assert_raises(ValueError, u.fit, nn_data)
def test_bad_init(): u = VMAP(init="foobar") assert_raises(ValueError, u.fit, nn_data)
def test_negative_learning_rate(): u = VMAP(learning_rate=-1.5) assert_raises(ValueError, u.fit, nn_data)
def test_negative_repulsion(): u = VMAP(repulsion_strength=-0.5) assert_raises(ValueError, u.fit, nn_data)
def test_negative_nneighbors(): u = VMAP(n_neighbors=-1) assert_raises(ValueError, u.fit, nn_data)
def test_bad_metric(): u = VMAP(metric=45) assert_raises(ValueError, u.fit, nn_data)
def test_non_integer_ncomponents(): u = VMAP(n_components=1.5) assert_raises(ValueError, u.fit, nn_data)
def test_too_small_nneighbors(): u = VMAP(n_neighbors=0.5) assert_raises(ValueError, u.fit, nn_data)
def test_negative_ncomponents(): u = VMAP(n_components=-1) assert_raises(ValueError, u.fit, nn_data)
def test_negative_min_dist(): u = VMAP(min_dist=-1) assert_raises(ValueError, u.fit, nn_data)
def test_too_large_op(): u = VMAP(set_op_mix_ratio=1.5) assert_raises(ValueError, u.fit, nn_data)
def test_negative_op(): u = VMAP(set_op_mix_ratio=-1.0) assert_raises(ValueError, u.fit, nn_data)
def test_blobs_cluster(): data, labels = datasets.make_blobs(n_samples=500, n_features=10, centers=5) embedding = VMAP().fit_transform(data) assert_equal(adjusted_rand_score(labels, KMeans(5).fit_predict(embedding)), 1.0)