<commit_before>using Base.Test
using MachineLearning
using RDatasets

iris = data("datasets", "iris")
colnames = names(iris)
m_iris = float_matrix(iris[filter(x->x!="Species", colnames)])
@test m_iris[1,1]==5.1
@test m_iris[150,4]==1.8

train, test = split_train_test(iris)
forest = fit(train, "Species", random_forest_options(num_trees=10))
yhat = predict(forest, test)
ytest = [x for x=test["Species"]]
acc = accuracy(ytest, yhat)
@test acc>0.8<commit_msg>fixed one more refactor bug<commit_after>using Base.Test
using MachineLearning
using RDatasets

iris = data("datasets", "iris")
colnames = names(iris)
m_iris = float_matrix(iris[filter(x->x!="Species", colnames)])
@test m_iris[1,1]==5.1
@test m_iris[150,4]==1.8

train, test = split_train_test(iris)
forest = fit(train, "Species", classification_forest_options(num_trees=10))
yhat = predict(forest, test)
ytest = [x for x=test["Species"]]
acc = accuracy(ytest, yhat)
@test acc>0.8
{'fraction_non_alphanumeric': 0.16204690831556504, 'fraction_numerical': 0.029850746268656716, 'mean_word_length': 7.775700934579439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6909477', 'n_tokens_mistral': 394, 'n_tokens_neox': 377, 'n_words': 77}