

def test_binary_blocks_batches_n_slack():
    (X, Y) = generate_blocks(n_samples=5)
    crf = GridCRF(inference_method=inference_method)
    clf = NSlackSSVM(model=crf, max_iter=20, batch_size=1, C=100)
    clf.fit(X, Y)
    Y_pred = clf.predict(X)
    assert_array_equal(Y, Y_pred)

dataset/ETHPy150Open pystruct/pystruct/pystruct/tests/test_learners/test_n_slack_ssvm.py test_binary_blocks_batches_n_slack/original