Code Monkey home page Code Monkey logo

eventpredictbasedoneg's Introduction

EventPredictBasedOnEG

future event predict demo based on causal event graph that covers the full industries that can predict the benefits or bad effects in accordance with the event given by the user, 基于因果事理图谱的事件预测。

项目介绍

基于海量数据进行因果挖掘,可以得到大量的因果知识,基于因果逻辑库,即历史因果,通过计算当前事件与历史事件的相似性,可以在定性的方式上做出一些方向性的预测,方向上包括两种,一种是积极信号,另一种是消极信号,本项目主要是想完成这一目标.

使用方式

执行python predict_event.py 输入一个事件,默认返回该事件所能导致的有利影响和不利影响

    handler = QA()
    while 1:
        event = input('请输入一个事件:').strip()
        good_effects, bad_effects = handler.qa_main(event)
        if good_effects:
            print('有利影响:')
            print('\n'.join(list(good_effects.keys())[:20]))
        if bad_effects:
            print('不利影响:')
            print('\n'.join(list(bad_effects.keys())[:20]))
        if not good_effects and not bad_effects:
            print('sorry,目前还预测不出来.')
        print('********************************************')

运行效果

请输入一个事件:感冒
有利影响:
    盘中一步反弹
    耳压增加
不利影响:
    患者头痛乏力发热
    并发症重症死亡几率
********************************************
请输入一个事件:心情郁闷
有利影响:
    1月自杀率反弹
    冲脉出现气滞血瘀
    交通安全
不利影响有:
    内分泌失调
    病情进一步恶化
********************************************
请输入一个事件:孟晚舟事件
不利影响:
    美股补跌
********************************************
请输入一个事件:孟晚舟被捕
不利影响:
    全球股市震荡
********************************************
请输入一个事件:吃得好
不利影响:
    身体肥胖体质下降
********************************************
请输入一个事件:吃得不好
不利影响:
    整个精力不好
********************************************
请输入一个事件:雷雨天气
有利影响:
    市场预期较高
    土豆价格大涨
    影响航班正常首要
不利影响:
    航班延误
    人力物力财力不足
    应停止动火作业
    贸易商出货困难
    报价继续下滑
    小麦质量等级较下降
    蔬菜产量减少
    市场采购需求始终维持较低水平
********************************************
请输入一个事件:马云辞职
有利影响:
    公司实际控制人变更
不利影响:
    公司董事人数不足
    油价盘中下挫
********************************************
请输入一个事件:特朗普和金正恩吵架
不利影响:
    美国朝鲜局势更为紧张
********************************************
请输入一个事件:智利地震
有利影响:
    国内金属铜价涨停
    国际铜价攀升
    精诚铜业涨停
    几个月鱼粉价格大幅度攀升
    国际鱼粉价格创下历史新高
    铜价格攀升
    沪铜开盘涨停
    铜为首国际金属价格飙升
    铜价飞涨
    期铜大幅跳涨开盘冲高
    精诚铜业云南铜业有色金属板块个股早盘就表现出领涨
    有色金属上涨
    铜大幅上涨
    铜业股大幅走强
    高档鱼粉价格上浮
    铜价大幅走强令金价保持坚挺
    国际纸浆价格大幅上涨
    同比上涨
    美元汇率持续升值
    国内大宗商品大部分上涨
不利影响:
    则有所回调
    市场铜短期供给不足
    铜矿停产忧虑
    铜价收盘远离盘初高位
    关工再度爆仓
    铜市场供给恐慌
********************************************

总结

1,本项目介绍了一个基于因果图谱的既定事件未来预测的接口预测demo
2,基于海量数据进行因果挖掘,可以得到大量的因果知识
3,基于因果逻辑库,即历史因果,通过计算当前事件与历史事件的相似性,可以在定性的方式上做出一些方向性的预测,方向上包括两种,一种是积极信号,另一种是消极信号.
4,本项目所使用的因果事理图谱已经公开至开放知识图谱联盟(openkg),地址为:http://www.openkg.cn/dataset/causalgraph

如有自然语言处理、知识图谱、事理图谱、社会计算、语言资源建设等问题或合作,请联系我:
邮箱:[email protected]
csdn:https://blog.csdn.net/lhy2014
我的自然语言处理项目: https://liuhuanyong.github.io
刘焕勇,**科学院软件研究所  

eventpredictbasedoneg's People

Contributors

liuhuanyong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.