8184b9fdf51e3f75835fe1f2d56c294d16686241,examples/federated_learning_with_encryption.py,,,#,162

Before Change


    clients.append(Client("Carol", server.pubkey))

    // Each client trains a linear regressor on its own data
    for (i, c) in enumerate(clients):
        c = c.fit(X[i], y[i], n_iter=50, eta=0.05)
        print(c.weights)

    // Predict
    for (i, c) in enumerate(clients):
        print("Train", mean_square_error(c.predict(X[i]), y[i]))
        print("Test", mean_square_error(c.predict(X_test), y_test))

After Change


        // Take gradient steps
        clients[0].gradient_step(aggr)
        clients[1].gradient_step(aggr)
        clients[2].gradient_step(aggr)

    for (i, c) in enumerate(clients):
        y_pred = c.predict(c.X)
        print(mean_square_error(y_pred, c.y))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: data61/python-paillier
Commit Name: 8184b9fdf51e3f75835fe1f2d56c294d16686241
Time: 2017-06-20
Author: giorgio.patrini@anu.edu.au
File Name: examples/federated_learning_with_encryption.py
Class Name:
Method Name:


Project Name: data61/python-paillier
Commit Name: 103e31b4a2518797606d3b93440740df0532770d
Time: 2017-06-20
Author: giorgio.patrini@anu.edu.au
File Name: examples/federated_learning_with_encryption.py
Class Name: Client
Method Name: fit


Project Name: data61/python-paillier
Commit Name: 1bcbc90debe300740369b1151b3f1b8523289f91
Time: 2018-06-26
Author: wilko.henecka@data61.csiro.au
File Name: examples/federated_learning_with_encryption.py
Class Name:
Method Name: federated_learning