Created
April 3, 2020 20:28
-
-
Save phil8192/774d9ef28f10b57cc73f8d6e5974a916 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Runner: | |
def __init__(self, X, y): | |
self.X = X | |
self.y = y | |
# called by FedAvg algo. | |
def optimise(self, intercept_init, coef_init, hyperparameters): | |
_intercept_init = intercept_init.copy() | |
_coef_init = coef_init.copy() | |
model = train_model(_intercept_init, _coef_init, self.X, self.y, **hyperparameters) | |
return model | |
def dataset_size(self): | |
return self.X.shape[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment