cpagym


Namecpagym JSON
Version 0.1.17 PyPI version JSON
download
home_pagehttps://cpanlp.com
SummaryAccounting Reinforcement Learning GYM for Ai-Accountants .为会计人打造的专属智能会计强化学习框架。
upload_time2023-02-09 13:16:08
maintainer
docs_urlNone
authorDraco Deng
requires_python
license
keywords python reinforcement learning gym openaiaccounting cpa audit intelligent accounting linguistic turn linguistic intelligent audit natural language processing machine learning finance certified public accountant big four 会计 强化学习 注会 注册会计师 审计 智能会计 会计的语言学转向 语言学 智能审计 自然语言处理 机器学习 金融 北外 财会 四大 会计智能体
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# RL-Accounting  会计强化学习

<a href="https://pypi.org/project/cpagym/">
<img src="https://raw.githubusercontent.com/accounting-intelligent-ai/cpagym/main/cpagym.png" width = "300" height = "300" alt="logo" align=center />
</a>

Redefining [Accounting](https://cpanlp.com/)!
Developed by **Bfsu Ai-Accounting Team** (c) 2023
[Github](https://github.com/accounting-intelligent-ai/cpagym)

[![PyPI - Python Version](https://img.shields.io/static/v1?label=pypi&message=v0.0.21&color=blue)](https://pypi.org/project/cpagym/)
[![Downloads](https://static.pepy.tech/badge/cpagym/week)](https://pepy.tech/project/cpagym)

## Install & Import 安装和导入
For detailed installation instructions, see the
[documentation](https://cpanlp.com/documentation).
```python
pip install cpagym
import gymnasium as gym
import cpagym as cg 
import torch
```

## Accounting Envs 主要会计环境
### 1. Moral_Hazard 道德风险
#### Action Space
| Num | Action                                | Unit         |
|-----|---------------------------------------|--------------|
| 0   | Discharge of duty                     | 0            |
| 1   | Due diligence                         | 1            |
#### Observation Space
The observation is a `ndarray` with shape `(6,)` that provides information about the
two rotational joint angles as well as their angular velocities:
| Num | Observation                  | Min                 | Max               |
|-----|------------------------------|---------------------|-------------------|
| 0   | Project success rate         |  0                  | 1                 |
| 1   | Project success return       |  0                  | 1                 |
```python
env = gym.make("Moral_Hazard-v1")#Instantiate the Environment载入道德风险环境
state, info = env.reset(seed=2)#初始化
n_steps = 10
for _ in range(n_steps):
    action = env.action_space.sample()#随机行动
    state, reward, terminated, truncated, info = env.step(action)
    print(observation, reward, terminated, truncated, info )
    if terminated or truncated:
        observation, info = env.reset()
```

## Accounting  RL-Algorithm 会计强化学习算法
### 1. Train the Agent with DQN
#### Accounting  RL-Agent 会计强化学习代理人
```python
agent=cg.Agent(state_size=1,action_size=2)#Instantiate the Agent载入会计智能体
env = gym.make("Moral_Hazard-v1")
state, info = env.reset(seed=2)
action = agent.act(state, eps)#最优化行动
next_state, reward, done, _,_ = env.step(action)
agent.step(state, action, reward, next_state, done)
print(agent.memory.memory)
```
## 配套智能会计包CPANLP
<a href="https://pypi.org/project/cpanlp/">
<img src="https://raw.githubusercontent.com/accounting-intelligent-ai/cpanlp/main/cpanlp.png" width = "320" height = "120" alt="logo" align=center />
</a>

Check out: https://cpanlp.com/reinforcement



            

Raw data

            {
    "_id": null,
    "home_page": "https://cpanlp.com",
    "name": "cpagym",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python, Reinforcement Learning,gym,openaiaccounting,cpa,audit,intelligent accounting,linguistic turn,linguistic,intelligent audit,natural language processing,machine learning,finance,certified public accountant,big four,\u4f1a\u8ba1,\u5f3a\u5316\u5b66\u4e60,\u6ce8\u4f1a,\u6ce8\u518c\u4f1a\u8ba1\u5e08,\u5ba1\u8ba1,\u667a\u80fd\u4f1a\u8ba1,\u4f1a\u8ba1\u7684\u8bed\u8a00\u5b66\u8f6c\u5411,\u8bed\u8a00\u5b66,\u667a\u80fd\u5ba1\u8ba1,\u81ea\u7136\u8bed\u8a00\u5904\u7406,\u673a\u5668\u5b66\u4e60,\u91d1\u878d,\u5317\u5916,\u8d22\u4f1a,\u56db\u5927,\u4f1a\u8ba1\u667a\u80fd\u4f53",
    "author": "Draco Deng",
    "author_email": "dracodeng6@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f8/80/fcedcf8d37092bdec7939a4c2ded7780618d062abb39cd1a7e3a3e5ee7b0/cpagym-0.1.17.tar.gz",
    "platform": null,
    "description": "\n\n# RL-Accounting  \u4f1a\u8ba1\u5f3a\u5316\u5b66\u4e60\n\n<a href=\"https://pypi.org/project/cpagym/\">\n<img src=\"https://raw.githubusercontent.com/accounting-intelligent-ai/cpagym/main/cpagym.png\" width = \"300\" height = \"300\" alt=\"logo\" align=center />\n</a>\n\nRedefining [Accounting](https://cpanlp.com/)!\nDeveloped by **Bfsu Ai-Accounting Team** (c) 2023\n[Github](https://github.com/accounting-intelligent-ai/cpagym)\n\n[![PyPI - Python Version](https://img.shields.io/static/v1?label=pypi&message=v0.0.21&color=blue)](https://pypi.org/project/cpagym/)\n[![Downloads](https://static.pepy.tech/badge/cpagym/week)](https://pepy.tech/project/cpagym)\n\n## Install & Import \u5b89\u88c5\u548c\u5bfc\u5165\nFor detailed installation instructions, see the\n[documentation](https://cpanlp.com/documentation).\n```python\npip install cpagym\nimport gymnasium as gym\nimport cpagym as cg \nimport torch\n```\n\n## Accounting Envs \u4e3b\u8981\u4f1a\u8ba1\u73af\u5883\n### 1. Moral_Hazard \u9053\u5fb7\u98ce\u9669\n#### Action Space\n| Num | Action                                | Unit         |\n|-----|---------------------------------------|--------------|\n| 0   | Discharge of duty                     | 0            |\n| 1   | Due diligence                         | 1            |\n#### Observation Space\nThe observation is a `ndarray` with shape `(6,)` that provides information about the\ntwo rotational joint angles as well as their angular velocities:\n| Num | Observation                  | Min                 | Max               |\n|-----|------------------------------|---------------------|-------------------|\n| 0   | Project success rate         |  0                  | 1                 |\n| 1   | Project success return       |  0                  | 1                 |\n```python\nenv = gym.make(\"Moral_Hazard-v1\")#Instantiate the Environment\u8f7d\u5165\u9053\u5fb7\u98ce\u9669\u73af\u5883\nstate, info = env.reset(seed=2)#\u521d\u59cb\u5316\nn_steps = 10\nfor _ in range(n_steps):\n    action = env.action_space.sample()#\u968f\u673a\u884c\u52a8\n    state, reward, terminated, truncated, info = env.step(action)\n    print(observation, reward, terminated, truncated, info )\n    if terminated or truncated:\n        observation, info = env.reset()\n```\n\n## Accounting  RL-Algorithm \u4f1a\u8ba1\u5f3a\u5316\u5b66\u4e60\u7b97\u6cd5\n### 1. Train the Agent with DQN\n#### Accounting  RL-Agent \u4f1a\u8ba1\u5f3a\u5316\u5b66\u4e60\u4ee3\u7406\u4eba\n```python\nagent=cg.Agent(state_size=1,action_size=2)#Instantiate the Agent\u8f7d\u5165\u4f1a\u8ba1\u667a\u80fd\u4f53\nenv = gym.make(\"Moral_Hazard-v1\")\nstate, info = env.reset(seed=2)\naction = agent.act(state, eps)#\u6700\u4f18\u5316\u884c\u52a8\nnext_state, reward, done, _,_ = env.step(action)\nagent.step(state, action, reward, next_state, done)\nprint(agent.memory.memory)\n```\n## \u914d\u5957\u667a\u80fd\u4f1a\u8ba1\u5305CPANLP\n<a href=\"https://pypi.org/project/cpanlp/\">\n<img src=\"https://raw.githubusercontent.com/accounting-intelligent-ai/cpanlp/main/cpanlp.png\" width = \"320\" height = \"120\" alt=\"logo\" align=center />\n</a>\n\nCheck out: https://cpanlp.com/reinforcement\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Accounting  Reinforcement Learning GYM for Ai-Accountants .\u4e3a\u4f1a\u8ba1\u4eba\u6253\u9020\u7684\u4e13\u5c5e\u667a\u80fd\u4f1a\u8ba1\u5f3a\u5316\u5b66\u4e60\u6846\u67b6\u3002",
    "version": "0.1.17",
    "split_keywords": [
        "python",
        " reinforcement learning",
        "gym",
        "openaiaccounting",
        "cpa",
        "audit",
        "intelligent accounting",
        "linguistic turn",
        "linguistic",
        "intelligent audit",
        "natural language processing",
        "machine learning",
        "finance",
        "certified public accountant",
        "big four",
        "\u4f1a\u8ba1",
        "\u5f3a\u5316\u5b66\u4e60",
        "\u6ce8\u4f1a",
        "\u6ce8\u518c\u4f1a\u8ba1\u5e08",
        "\u5ba1\u8ba1",
        "\u667a\u80fd\u4f1a\u8ba1",
        "\u4f1a\u8ba1\u7684\u8bed\u8a00\u5b66\u8f6c\u5411",
        "\u8bed\u8a00\u5b66",
        "\u667a\u80fd\u5ba1\u8ba1",
        "\u81ea\u7136\u8bed\u8a00\u5904\u7406",
        "\u673a\u5668\u5b66\u4e60",
        "\u91d1\u878d",
        "\u5317\u5916",
        "\u8d22\u4f1a",
        "\u56db\u5927",
        "\u4f1a\u8ba1\u667a\u80fd\u4f53"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbbe4501e1afe92f4346ce49464f95d2ec3097f2b5cbdf731de235f65b21b8ea",
                "md5": "dc651c80e91893a88e570155fcf87755",
                "sha256": "6012b6140b31c1ba62662c5919b37677f3bb00243e9d123dba5d06702b732117"
            },
            "downloads": -1,
            "filename": "cpagym-0.1.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc651c80e91893a88e570155fcf87755",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 25024,
            "upload_time": "2023-02-09T13:16:05",
            "upload_time_iso_8601": "2023-02-09T13:16:05.110085Z",
            "url": "https://files.pythonhosted.org/packages/db/be/4501e1afe92f4346ce49464f95d2ec3097f2b5cbdf731de235f65b21b8ea/cpagym-0.1.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f880fcedcf8d37092bdec7939a4c2ded7780618d062abb39cd1a7e3a3e5ee7b0",
                "md5": "463614e863b3142d48723a255faf94d6",
                "sha256": "dcea63fd93e431f4f68b2731ed14b75dd6a30b0048b27fa530ac60f05f636309"
            },
            "downloads": -1,
            "filename": "cpagym-0.1.17.tar.gz",
            "has_sig": false,
            "md5_digest": "463614e863b3142d48723a255faf94d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17792,
            "upload_time": "2023-02-09T13:16:08",
            "upload_time_iso_8601": "2023-02-09T13:16:08.688046Z",
            "url": "https://files.pythonhosted.org/packages/f8/80/fcedcf8d37092bdec7939a4c2ded7780618d062abb39cd1a7e3a3e5ee7b0/cpagym-0.1.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-09 13:16:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "cpagym"
}
        
Elapsed time: 0.05290s