Exemplo n.º 1
0
def test_evaluate_accuracy_nn():
    """Test evaluate_accuracy for nn model"""
    classifer = ReviewClassifier('nn')
    classifer.load_model(tar_file='test_nn_model.tar')
    score = classifer.evaluate_accuracy('test-reviews.csv')
    assert score > 0
    os.remove('output.log')
Exemplo n.º 2
0
def test_evaluate_accuracy_rf():
    """Test evaluate_accuracy for rf model"""
    classifer = ReviewClassifier('rf')
    classifer.load_model(pickle_file='test_rf_model.pickle')
    score = classifer.evaluate_accuracy('test-reviews.csv')
    assert score > 0
    os.remove('output.log')