cov-estimator
Simple estimator module for serialization
This is a simple library to build adapters to construct complex estimators using sklearn models as well as keras.
Basic architecture:
from cov_estimator.nodes import Estimator
from cov_estimator import Pipeline
img = "path/to/img"
img = load_img(img, (180, 180))
img = np.expand_dims(img, axis=0)
est = Estimator(
(
lambda data: {
"pneumonia": data["pneumonia"],
"covid": data["pneumonia"] * data["covid"],
"normal": 1 - data["pneumonia"],
}
),
"mult_1",
)
covid = tf.keras.models.load_model("path/to/model_1")
covid_est = Estimator(covid, "covid")
pneumonia = tf.keras.models.load_model("path/to/model_2")
pneumonia_est = Estimator(pneumonia, "pneumonia")
est = est(pneumonia_est, covid_est)
data = {"covid": img, "pneumonia": img}
model = Pipeline(data, 'Path/to/save')
result = model(result)
print("result: {}".format(result)
Whats happening?
Basically what the library does is create an abstract tree of dependecies which evaluate each node. For it to properly work, you need to pass a dictionary containing as key each nodes which expects some input. You can use, lambda funcions to apply some important transformation. it will always get a single dictionary as input, the dictionary will contain the outputs from each correspondant node. Obs! Each node inside in the graph must have a unique name, it's the developer's responsibility to
Stack:
- Python 3.8
- Virtualenv
- tensorflow > 2.0
- numpy > 1.6
- sklearn
Metadata
Release files for cov-estimator 0.0.1
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 | Actions |
|---|---|---|---|---|
| cov_estimator-0.0.1.tar.gz | 6.7 kB | Without provenance | Details for cov_estimator-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cov_estimator-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for cov_estimator-0.0.1-py3-none-any.whl |
Total release size: 15.8 kB
Release files / cov_estimator-0.0.1.tar.gz
| Download URL | cov_estimator-0.0.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e971744a1e9d79fbc451a82fe0a3c256a6aea5dca8a1e38d2eb76c5f3fb9450
|
|
BLAKE2b-256 checksum How to use checksums |
1bd642d3b71a5ae660634ade37c882c7ff2c987ae194a78afe9198ca6522dc4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Release files / cov_estimator-0.0.1-py3-none-any.whl
| Download URL | cov_estimator-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd499e0d081e77373d465f5056731c5fd814e4033363df6a85bae7f7e0a196f3
|
|
BLAKE2b-256 checksum How to use checksums |
c8c4b2335f964d5fa9e6f7791e41a37327ba96aabf6b2e1722f1b10c7cfba9f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for cov-estimator 0.0.1
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.