Skip to content

Commit 20ebe4b

Browse files
authored
merge pull request #7 from mukeshmk/wip-fmlearn
updated scikit-learn's API calls to handle FMLearn algorithm prediction
2 parents bf63846 + 25dcc03 commit 20ebe4b

File tree

14 files changed

+342
-264
lines changed

14 files changed

+342
-264
lines changed

sklearn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
'naive_bayes', 'neighbors', 'neural_network', 'pipeline',
9292
'preprocessing', 'random_projection', 'semi_supervised',
9393
'svm', 'tree', 'discriminant_analysis', 'impute', 'compose',
94-
'fml',
94+
'fmlearn',
9595
# Non-modules:
9696
'clone', 'get_config', 'set_config', 'config_context',
9797
'show_versions']

sklearn/fml/__init__.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

sklearn/fml/encryption/__init__.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

sklearn/fml/fml_client.py

Lines changed: 0 additions & 245 deletions
This file was deleted.

sklearn/fmlearn/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
The :mod:`sklearn.fmlearn` module implements Federated Meta Learning
3+
"""
4+
5+
from .fml_client import FMLClient
6+
from .constants import URI
7+
from .metafeatures import MetaFeatures
8+
9+
__all__ = ['FMLClient',
10+
'URI',
11+
'MetaFeatures']

sklearn/fml/constants.py renamed to sklearn/fmlearn/constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class URI:
77
_MAX = '/max'
88
_MIN = '/min'
99
_ALL = '/all'
10+
_PREDICT = '/predict'
1011

1112
def __init__(self, debug=False):
1213
if debug:
@@ -23,3 +24,7 @@ def retrieve_best_min(self):
2324

2425
def retrieve_best_max(self):
2526
return self._SERVER + self._METRIC + self._RETRIEVE + self._MAX
27+
28+
def predict_metric(self):
29+
return self._SERVER + self._METRIC + self._PREDICT
30+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
The :mod:`sklearn.fmlearn.encryption` module implements Federated Meta Learning
3+
"""
4+
5+
from .fml_hash import FMLHash
6+
7+
__all__ = ['FMLHash']

0 commit comments

Comments
 (0)