pygrey


Namepygrey JSON
Version 0.0.1a1 PyPI version JSON
download
home_pagehttps://github.com/dhchenx/pygrey
SummaryGrey Relation Analysis and Grey Model Prediction
upload_time2023-05-06 09:19:17
maintainer
docs_urlNone
authorDonghua Chen
requires_python>=3.6, <4
licenseBSD-3
keywords grey model grey model prediction grey relation analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## PyGrey
This toolkit provides implementation of Grey Relation Analysis and Grey Model Prediction. 

### Example

- Grey Relation Analysis (GRA)

```python
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))
```python
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:

```python
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](https://github.com/dhchenx). 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dhchenx/pygrey",
    "name": "pygrey",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <4",
    "maintainer_email": "",
    "keywords": "grey model,grey model prediction,grey relation analysis",
    "author": "Donghua Chen",
    "author_email": "douglaschan@126.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/61/d24bff5540221f55aa3e6059d007db140a85afce90085a53a54ff9551b09/pygrey-0.0.1a1.tar.gz",
    "platform": null,
    "description": "## PyGrey\r\nThis toolkit provides implementation of Grey Relation Analysis and Grey Model Prediction. \r\n\r\n### Example\r\n\r\n- Grey Relation Analysis (GRA)\r\n\r\n```python\r\nfrom pygrey.gra import *\r\n# Grey Relation Analysis (GRA)\r\n# load data from an Excel file\r\ngra=GRA(data_path='data/data.xlsx',use_cols=[0,1,2,3])\r\n# run the model\r\ngra.run(show_fig=True)\r\n```\r\n\r\n- Grey Model Prediction (GM(1,1))\r\n```python\r\nfrom pygrey.gm import *\r\n# Sequence\r\nX0 = [7413.7, 7579, 7739.2, 7696, 7787.7, 7584.1, 7489, 7355, 7138]\r\n# X axis\r\nt = 1996\r\ndt = 1\r\n# Number of prediction\r\nnum_prediction = 2\r\n# Grey model\r\ngm=GM(x=X0,t=t,dt=dt,num_prediction=num_prediction)\r\n# run the model\r\ngm.run(show_figure=True)\r\n```\r\n\r\nOther GM implementation:\r\n\r\n```python\r\nfrom pygrey.gm_v2 import *\r\nls = [7413.7, 7579, 7739.2, 7696, 7787.7, 7584.1, 7489, 7355, 7138]\r\ngm = GM()\r\ngm.fit(ls)\r\nprint(\"Confidennce = \",gm.confidence())\r\nprint(\"X0 = \",ls)\r\nprint(\"Prediction = \", gm.predict(m=4))\r\n```\r\n\r\n### License\r\n\r\nThe `pygrey` project is provided by [Donghua Chen](https://github.com/dhchenx). \r\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "Grey Relation Analysis and Grey Model Prediction",
    "version": "0.0.1a1",
    "project_urls": {
        "Bug Reports": "https://github.com/dhchenx/pygrey/issues",
        "Homepage": "https://github.com/dhchenx/pygrey",
        "Source": "https://github.com/dhchenx/pygrey"
    },
    "split_keywords": [
        "grey model",
        "grey model prediction",
        "grey relation analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9673e8e71bda7593de5ddc1926890f3ff469f30d64b159cbd554b406a57cf61",
                "md5": "ac8084757dfdc08ebf7a19a3655e827f",
                "sha256": "11885ef8064573487cfa4ba58d18e348cb98b9ea0fe4fc6d105194a3f264c5a2"
            },
            "downloads": -1,
            "filename": "pygrey-0.0.1a1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac8084757dfdc08ebf7a19a3655e827f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6, <4",
            "size": 12740,
            "upload_time": "2023-05-06T09:19:15",
            "upload_time_iso_8601": "2023-05-06T09:19:15.307875Z",
            "url": "https://files.pythonhosted.org/packages/a9/67/3e8e71bda7593de5ddc1926890f3ff469f30d64b159cbd554b406a57cf61/pygrey-0.0.1a1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb61d24bff5540221f55aa3e6059d007db140a85afce90085a53a54ff9551b09",
                "md5": "815fac8a11170310f58933bdecbe819c",
                "sha256": "d270723179cb1e72f4c71e6152ff9a6ac265eb6a5eee3d7ac11b8c5bbded6baf"
            },
            "downloads": -1,
            "filename": "pygrey-0.0.1a1.tar.gz",
            "has_sig": false,
            "md5_digest": "815fac8a11170310f58933bdecbe819c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <4",
            "size": 14624,
            "upload_time": "2023-05-06T09:19:17",
            "upload_time_iso_8601": "2023-05-06T09:19:17.792368Z",
            "url": "https://files.pythonhosted.org/packages/fb/61/d24bff5540221f55aa3e6059d007db140a85afce90085a53a54ff9551b09/pygrey-0.0.1a1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-06 09:19:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dhchenx",
    "github_project": "pygrey",
    "github_not_found": true,
    "lcname": "pygrey"
}
        
Elapsed time: 0.06070s