<jupyter_start><jupyter_text>Random runs<jupyter_code>accs = []
for i in range(50):
    learners = []
    accs.append([])
    acc = 0
    for i in range(n_learners):
        clf = DecisionTreeClassifier()
        local_X = local_set_x[i*local_ds:(i+1)*local_ds]
        local_Y = local_set_y[i*local_ds:(i+1)*local_ds]
        #print(Counter(local_Y))
        clf.fit(local_X, local_Y)
        acc += clf.score(x_test, y_test)
        learners.append(clf)
    accs[-1].append(acc/n_learners)
    for i in range(20):
        learners, acc = tuning(learners, local_ds, theta)
        accs[-1].append(acc)
import matplotlib.pyplot as plt
%matplotlib inline

mu = np.array(accs).mean(axis=0)
sigma = np.array(accs).std(axis=0)

plt.plot(range(21), mu, lw=2, label='mean', color='blue')
plt.fill_between(range(21), mu+sigma, mu-sigma, facecolor='blue', alpha=0.5)

plt.ylabel("Avg accuracy")
plt.xlabel("Tuning number")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15916230366492146, 'fraction_numerical': 0.018848167539267015, 'mean_word_length': 3.9025641025641025, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '629103', 'license': 'Apache-2.0', 'n_tokens_mistral': 395, 'n_tokens_neox': 380, 'n_words': 63, 'path': 'models_breastCancer/decision_tree.ipynb', 'repo_name': 'kampmichael/FederatedLearningViaCoTraining', 'size': '955'}