Non stratified experiments

Remove reference column in analysis
This commit is contained in:
2021-03-22 11:02:53 +01:00
parent 6d68c81920
commit 08fb237001
6 changed files with 318 additions and 281 deletions

View File

@@ -1,6 +1,6 @@
import argparse
from wodt import TreeClassifier
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold, cross_val_score
import numpy as np
import random
from experimentation.Sets import Datasets
@@ -85,8 +85,9 @@ def process_dataset(dataset, verbose):
for random_state in random_seeds:
random.seed(random_state)
np.random.seed(random_state)
kfold = KFold(shuffle=True, random_state=random_state, n_splits=5)
clf = TreeClassifier(random_state=random_state)
res = cross_val_score(clf, X, y, cv=5)
res = cross_val_score(clf, X, y, cv=kfold)
scores.append(res)
if verbose:
print(