Ejemplo n.º 1
0
def test_fscore_dt():
    expected = 0.591715976331
    Y_pred = decisionTree_pred(X_train, Y_train, X_test)
    actual = classification_metrics(Y_pred, Y_test)[4]
    assert_almost_equals(expected, actual, places=2, msg="UNEQUAL Expected:%s, Actual:%s" % (expected, actual))
Ejemplo n.º 2
0
def test_auc_svm():
    expected = 0.738888888889
    Y_pred = svm_pred(X_train, Y_train, X_test)
    actual = classification_metrics(Y_pred, Y_test)[1]
    assert_almost_equals(expected, actual, places=1, msg="UNEQUAL Expected:%s, Actual:%s" % (expected, actual))
Ejemplo n.º 3
0
def test_accuracy_lr():
    expected = 0.738095238095
    Y_pred = logistic_regression_pred(X_train, Y_train, X_test)
    actual = classification_metrics(Y_pred, Y_test)[0]
    assert_almost_equals(expected, actual, places=2, msg="UNEQUAL Expected:%s, Actual:%s" % (expected, actual))
Ejemplo n.º 4
0
def test_fscore_dt():
	expected = 0.591715976331
	Y_pred = decisionTree_pred(X_train,Y_train,X_test)
	actual = classification_metrics(Y_pred,Y_test)[4]
	assert_almost_equals(expected, actual,places=2, msg="UNEQUAL Expected:%s, Actual:%s" %(expected, actual))
Ejemplo n.º 5
0
def test_auc_svm():
	expected = 0.738888888889
	Y_pred = svm_pred(X_train,Y_train,X_test)
	actual = classification_metrics(Y_pred,Y_test)[1]
	assert_almost_equals(expected, actual,places=1, msg="UNEQUAL Expected:%s, Actual:%s" %(expected, actual))
Ejemplo n.º 6
0
def test_accuracy_lr():
	expected = 0.738095238095
	Y_pred = logistic_regression_pred(X_train,Y_train,X_test)
	actual = classification_metrics(Y_pred,Y_test)[0]
	assert_almost_equals(expected, actual,places=2, msg="UNEQUAL Expected:%s, Actual:%s" %(expected, actual))