The cardiovascular unified real-time intelligent system
Project description
Curtis - The engine
The cardiovascular unified real-time intelligent system is an AI-based engine whose purpose is to analyze the cardiovascular health of a given person, this is done through ECG analysis (an existent ECG measuring system is needed to obtain the required values).
How does it work?
Curtis acts as an expert system, a rule-based program that emulates a real-life expert way of thinking about a certain topic, those rules were obtained for Curtis using the "decision tree approach", in which some existent data was given to a decision tree classifier, and it categorized the data into branches of rules and decisions.
Usage
First, install the curtis-engine package:
$ pip install curtis-engine
To start using Curtis, the CurtisEngine class must be imported, as well as CurtisFacts for the facts declaration:
>>> from curtis import CurtisEngine, CurtisFacts
>>> curtis = CurtisEngine()
After that, use curtis.declare_facts method to declare a new CurtisFacts object, which should contain all the ECG values needed for a diagnosis to be performed:
>>> curtis.declare_facts(
... CurtisFacts(
... sex=1,
... age=89,
... height=140,
... weight=30,
... HR=56,
... Pd=122,
... PQ=164,
... QRS=118,
... QT=460,
... QTcFra=451
... )
... )
Finally, to get a diagnosis over the declared fact, use the curtis.diagnose method:
>>> diagnosis = curtis.diagnose()
>>> print(diagnosis)
60
The curtis.diagnose method returns a number (as seen). This number is a diagnosis index, which means it's a unique index for a given diagnosis. To see which diagnosis belongs to that index, import the diagnosis_indexes dictionary from the curtis.utils.encoding package, and use the diagnosis as the index:
>>> from curtis.utils.encoding import diagnosis_indexes
>>> print(diagnosis_indexes[diagnosis])
Unifocal premature ventricular complexes
And voilà! you've made your first Curtis diagnosis. 🎉
Docs
To see the docs, you can clone the repo and open the docs folder to serve it as a website.
Using serve:
$ git clone github.com/gantoreno/curtis-engine.git
$ cd curtis-engine
$ serve docs/curtis
The documentation should now be available at http://localhost:5000.
License
This project is licensed under the GNU GPLv3 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curtis-engine-1.0.0.tar.gz.
File metadata
- Download URL: curtis-engine-1.0.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c22e5fc73524b62151c5d8323aaac4b2eb7843d21d489fc073d20b4e606774d7
|
|
| MD5 |
ca82058a2267fee65ad1bcd44dbeb33c
|
|
| BLAKE2b-256 |
585e191f28774f137ceb6f3554f2d888357fe2df95c30cb818e4cdc3eec01ac6
|
File details
Details for the file curtis_engine-1.0.0-py3-none-any.whl.
File metadata
- Download URL: curtis_engine-1.0.0-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed2d2dbfa7b91ece62971bdc61213e0bda0ec23a772258ca974cf85b84b5d429
|
|
| MD5 |
22aed8feaee1d7d7515cdaf6d6557232
|
|
| BLAKE2b-256 |
091bf37b76e3881b79060c892b7ad76be34cfdadb9da4d44a060ae9677cbec35
|