Created
May 25, 2020 17:08
-
-
Save chilang/825cd54acb7c169f1c503df2dd350e3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hyperparams = { | |
'n_runners': 10, | |
'sample_size': 5, | |
'rounds': 100, | |
'combine': 'weighted', # or 'mean' | |
'partition_params': { | |
'scheme': 'uniform' # stratified, non-iidness, noise injection etc. | |
}, | |
'runner_hyperparams': { | |
'epochs': 1, | |
'lr': 0.15, | |
'batch_size': 0 | |
} | |
} | |
fed_avg = FedAvg(**hyperparams) | |
fed_avg.fit(X_train, y_train) | |
preds = fed_avg.predict(X_test) | |
print(classification_report(y_test, preds, target_names=['class_0', 'class_1'])) | |
print(fed_avg.intercept_) | |
print(fed_avg.coef_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment