Skip to content

Instantly share code, notes, and snippets.

@chilang
Created May 25, 2020 17:04
Show Gist options
  • Save chilang/a15ff29238472ee7bb5afd69b1b1316e to your computer and use it in GitHub Desktop.
Save chilang/a15ff29238472ee7bb5afd69b1b1316e to your computer and use it in GitHub Desktop.
for _ in range(self.rounds):
r_intercepts, r_coefs, r_weights = self._collect_models(runners, N)
self.intercept_ = np.average(r_intercepts, axis=0, weights=r_weights)
self.coef_ = np.average(r_coefs, axis=0, weights=r_weights)
self.global_model = set_weights(self.intercept_, self.coef_, np.unique(y))
return self
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment