Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# 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)