Pre-release
This release is a pre-release and may not be stable for production use.
PyGrey
This toolkit provides implementation of Grey Relation Analysis and Grey Model Prediction.
Example
- Grey Relation Analysis (GRA)
from pygrey.gra import *
# Grey Relation Analysis (GRA)
# load data from an Excel file
gra=GRA(data_path='data/data.xlsx',use_cols=[0,1,2,3])
# run the model
gra.run(show_fig=True)
- Grey Model Prediction (GM(1,1))
from pygrey.gm import *
# Sequence
X0 = [7413.7, 7579, 7739.2, 7696, 7787.7, 7584.1, 7489, 7355, 7138]
# X axis
t = 1996
dt = 1
# Number of prediction
num_prediction = 2
# Grey model
gm=GM(x=X0,t=t,dt=dt,num_prediction=num_prediction)
# run the model
gm.run(show_figure=True)
Other GM implementation:
from pygrey.gm_v2 import *
ls = [7413.7, 7579, 7739.2, 7696, 7787.7, 7584.1, 7489, 7355, 7138]
gm = GM()
gm.fit(ls)
print("Confidennce = ",gm.confidence())
print("X0 = ",ls)
print("Prediction = ", gm.predict(m=4))
License
The pygrey project is provided by Donghua Chen.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygrey-0.0.1a1.tar.gz
(14.6 kB
view details)
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
pygrey-0.0.1a1-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file pygrey-0.0.1a1.tar.gz.
File metadata
- Download URL: pygrey-0.0.1a1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d270723179cb1e72f4c71e6152ff9a6ac265eb6a5eee3d7ac11b8c5bbded6baf
|
|
| MD5 |
815fac8a11170310f58933bdecbe819c
|
|
| BLAKE2b-256 |
fb61d24bff5540221f55aa3e6059d007db140a85afce90085a53a54ff9551b09
|
File details
Details for the file pygrey-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: pygrey-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11885ef8064573487cfa4ba58d18e348cb98b9ea0fe4fc6d105194a3f264c5a2
|
|
| MD5 |
ac8084757dfdc08ebf7a19a3655e827f
|
|
| BLAKE2b-256 |
a9673e8e71bda7593de5ddc1926890f3ff469f30d64b159cbd554b406a57cf61
|