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:
felt-train
felt-aggregate
felt-export
Common Usage
After installing this library you can load models trained using FELT as:
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.
felt-export --input "final-model-House Prices.json" --output "model.pkl"
Then you can use the created file as follows:
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)
Metadata
Release files for feltlabs 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| feltlabs-0.5.2.tar.gz | 34.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| feltlabs-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.7 kB
Release files / feltlabs-0.5.2.tar.gz
| Download URL | feltlabs-0.5.2.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
389ba6715b093de961b3a8534d1c82e00f46997cdf4dcf79b104df3387c4c9a4
|
|
BLAKE2b-256 checksum How to use checksums |
bf52a7ef3770c341a4842b4f89c74c37342e45926cfc9f555b64f9a0e0c6fbbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / feltlabs-0.5.2-py3-none-any.whl
| Download URL | feltlabs-0.5.2-py3-none-any.whl |
|---|---|
| Size | 44.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fff2094863543f98ee5d7c6d48c6fb5667bb93200c448811ba66ecb829ea4d40
|
|
BLAKE2b-256 checksum How to use checksums |
309d1c23ec63ef746673be8736e89b241f9a51fcea41582817943adf4d413ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Security for feltlabs 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.