Skip to content
Snippets Groups Projects
test_cumbo.py 45.4 KiB
Newer Older
Dominique Benielli's avatar
Dominique Benielli committed
    #                     zip(clf_sparse.staged_decision_function(X_sparse),
    #                         clf_dense.staged_decision_function(X_dense)):
    #                 assert_array_equal(res_sparse, res_dense)
    #
    #             for res_sparse, res_dense in \
    #                     zip(clf_sparse.staged_predict(X_sparse),
    #                         clf_dense.staged_predict(X_dense)):
    #                 assert_array_equal(res_sparse, res_dense)
    #
    #             for res_sparse, res_dense in \
    #                     zip(clf_sparse.staged_score(X_sparse, y),
    #                         clf_dense.staged_score(X_dense, y)):
    #                 assert_equal(res_sparse, res_dense)
    #
    #             # Check that sparsity of data is maintained during training
    #             types = [clf.data_type_ for clf in clf_sparse.estimators_]
    #             if sparse_format == csc_matrix:
    #                 assert_true(all([type_ == csc_matrix for type_ in types]))
    #             else:
    #                 assert_true(all([type_ == csr_matrix for type_ in types]))
    #

if __name__ == '__main__':
    unittest.main()
    # suite = unittest.TestLoader().loadTestsFromTestCase
    # (TestMuCumboClassifier().test_class_variation())
    # unittest.TextTestRunner(verbosity=2).run(suite)