UBC-MDS / CrossPy

A package for cross-validation in Python
MIT License
1 stars 4 forks source link

Added Test functions for train_test_split() and cross_validation() #11

Closed ShunChi100 closed 6 years ago

ShunChi100 commented 6 years ago

Haven't check typos. To Dan, could you please take a look the output test for cross_validation()? Here is what I did

    # Output Errors
    cv_scores = cross_validation(lm, X=X, y=y)

    cv_scores_sklearn = np.array([])

    def compare_sklearn():
        assert max(cv_scores - cv_scores_sklearn) < 0.000001, "results doesn't match sklearn"