Skip to content

Commit 28db75b

Browse files
committed
Change name of contributivity method
Signed-off-by: arthurPignet <arthur.pignet@mines-paristech.fr>
1 parent 1ddcca0 commit 28db75b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mplc/contributivity.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,12 @@ def compute_relative_perf_matrix(self):
11171117
def statistcal_distances_via_smodel(self):
11181118

11191119
start = timer()
1120-
mpl = fast_mpl.FastFedAvgSmodel(self.scenario, self.scenario.mpl.pretrain_epochs)
1120+
try:
1121+
mpl_pretrain = self.scenario.mpl.pretrain_epochs
1122+
except AttributeError as e:
1123+
mpl_pretrain = 2
1124+
1125+
mpl = fast_mpl.FastFedAvgSmodel(self.scenario, mpl_pretrain)
11211126
mpl.fit()
11221127
cross_entropy = tf.keras.metrics.CategoricalCrossentropy()
11231128
self.contributivity_scores = {'Kullbakc divergence': [0 for _ in mpl.partners_list],
@@ -1210,7 +1215,7 @@ def compute_contributivity(
12101215
# Contributivity 10: Partner valuation by reinforcement learning
12111216
self.PVRL(learning_rate=0.2)
12121217
elif method_to_compute == "S-Model":
1213-
self.s_model()
1218+
self.statistcal_distances_via_smodel()
12141219
else:
12151220
logger.warning("Unrecognized name of method, statement ignored!")
12161221

0 commit comments

Comments
 (0)