A Python package for simple and efficient implementation of Evidential Reasoning (ER) methods
Project description
ERTool
ERTool is a Python package designed for simple and efficient implementation of Evidential Reasoning (ER) methods. It aims to provide an intuitive and flexible approach for integrating ER processes, particularly suitable for data analysis and decision support systems.
Features
- Easy-to-use implementation of Evidential Reasoning.
- Efficient in handling complex ER tasks.
- Flexible interface suitable for various application scenarios.
Installation
You can install ERTool directly from PyPI using pip:
pip install ertool
Using Instruction
er_example = ertool.ER()
er_example.er_algorithm(B, W, DBF, numOfChildren, numOfGrades)
Introduction to Input Variables
-
B: A one-dimensional array of floats. This array is the output of the algorithm and should initially be an array of zeros. After the completion of the algorithm, this array will contain the final computed results.
-
W: A one-dimensional array of floats. It represents the weights of each child node. Tese weights are used in the algorithm to adjust the influence of each child node.
-
DBF: A two-dimensional array of floats. It stands for "Degrees of Belief" and is one of the main inputs to the algorithm, used to represent the initial belief degrees for each category or grade.
-
numOfChildren: An integer. It indicates the number of child nodes. In the DBF array, this typically corresponds to the number of rows.
-
numOfGrades: An integer. It indicates the number of categories or grades. In the DBF array, this typically corresponds to the number of columns.
Introduction to Output Values
- Return Value: Boolean. It returns True if the algorithm successfully executes and completes all computations. If any error is encountered during execution (e.g., division by zero), it returns False.
- B Array: Upon completion of the algorithm, the B array is updated with the final calculation results. It reflects the degrees of belief that have been weighted and normalized.
Quick Start
Here is a basic usage example of ERTool:
from ertool import er
import numpy as np
er_example = er.ER()
B = np.zeros(5)
W = np.array([0.2, 0.3, 0.5])
DBF = np.array([[0.1, 0.2, 0.3, 0.4],
[0.3, 0.3, 0.2, 0.2],
[0.25, 0.25, 0.25, 0.25]])
numOfChildren = 3
numOfGrades = 4
if er_example.er_algorithm(B, W, DBF, numOfChildren, numOfGrades):
print("Result:", B)
else:
print("An error occurred during the execution of the algorithm.")
Contributing
Contributions to ERTool are welcome. Please concat tyshipku@gmail.com for how to contribute to the project.
License
This project is licensed under the MIT License. For more information, please see the LICENSE file.
Contact
This project is supported by the National Institute of Health Data Science, Peking University. For any questions or suggestions, please contact us at tyshipku@gmail.com.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file ERTool-0.1.1.tar.gz
.
File metadata
- Download URL: ERTool-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbfc68f95d2e5736936ea720535dd70c1f452e559feab649609c744c3f96231 |
|
MD5 | 932685dde3dbca33e8729efb157b6924 |
|
BLAKE2b-256 | a35cfa89db0c66424eb7b2eeca1ecb6d044408b19886030b36f6374573091360 |
File details
Details for the file ERTool-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: ERTool-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 496f9ffabc3ae6f3048ca11462a08e1573f442640d7dfac0ddf2bc2a2ee43b44 |
|
MD5 | c153d3d497db1ae781724ef8a124df9e |
|
BLAKE2b-256 | 0f5976c9660cd579ec132a840ad419e0fdf8824b1dad19fd52848b0d492a9e13 |