feltlabs-0.5.2
توضیحات
FELT python package intended for running federated learning on Ocean protocol.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | feltlabs-0.5.2 |
| نام | feltlabs |
| نسخه کتابخانه | 0.5.2 |
| نگهدارنده | ['FELT Labs'] |
| ایمیل نگهدارنده | ['info@bretahajek.com'] |
| نویسنده | FELT Labs |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://feltlabs.ai/ |
| آدرس اینترنتی | https://pypi.org/project/feltlabs/ |
| مجوز | GPL-3.0 License |
This code is intended to work closely with Ocean protocol. Algorithms from this code
should run on ocean provider. Training local models and aggregating them into global
model.
Entry commands:
```bash
felt-train
felt-aggregate
felt-export
```
## Common Usage
After installing this library you can load models trained using FELT as:
```python
from feltlabs.model import load_model
# Load scikit-learn model
model = load_model("final-model.json")
# Data shape must be: (number_of_samples, number_of_features)
data = [
[1980, 2, 2, 2, 0, 0],
[1700, 3, 2, 3, 1, 1],
[2100, 3, 2, 3, 1, 0],
]
result = model.predict(data)
print(result)
# Use following line for analytics as mean, std...
# result = model.predict(None)
```
### Command: felt-export
You can use `felt-export` for converting trained models into pickle object:
Resulting file will then contain a pickled object of scikit-learn model.
```bash
felt-export --input "final-model-House Prices.json" --output "model.pkl"
```
Then you can use the created file as follows:
```python
import pickle
with open('model.pkl', 'rb') as f:
model = pickle.load(object, f)
# See the above code example for data definition
model.predict(data)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.21.0 | numpy |
| ==1.5.0 | PyNaCl |
| <3,>=2.28.1 | requests |
| <2,>=1.0.1 | scikit-learn |
| <3,>=2.10.0 | tensorflow |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl feltlabs-0.5.2:
pip install feltlabs-0.5.2.whl
نصب پکیج tar.gz feltlabs-0.5.2:
pip install feltlabs-0.5.2.tar.gz