Skip to content

Instantly share code, notes, and snippets.

@chilang
Created May 25, 2020 17:07
Show Gist options
  • Save chilang/2bd835b270a4e307d54b632177d3c0b4 to your computer and use it in GitHub Desktop.
Save chilang/2bd835b270a4e307d54b632177d3c0b4 to your computer and use it in GitHub Desktop.
skews = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.99}
scores = {}
for skew in skews:
print("eval", skew)
hyperparams = {
'n_runners': 10,
'sample_size': 10,
'rounds': 1,
'combine': 'weighted', # or 'mean'
'partition_params': {
'scheme': 'label-skew', # uniform, label-skew
'args': {
'randomise': True,
'skew': skew
}
},
'runner_hyperparams': {
'epochs': 10,
'lr': 0.15,
'batch_size': 0
}
}
local_mean_f1_scores, local_max_f1_scores, fed_avg_f1_scores = compare_f1(hyperparams, 1000)
scores[str(skew)] = (local_mean_f1_scores, local_max_f1_scores, fed_avg_f1_scores)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment