Coder Social home page Coder Social logo

hgm-gif's Introduction

HGM-GIF

Code for AI Open Paper: Heterogeneous Graph Knowledge Enhanced Stock Market Prediction

Some code are borrowed from HeterSumGraph. Thanks for their work.

Dependency

Data

The data format should be jsonlines, each line should be like this:

{
  "sentences": ["sentence1", "sentence2", ...],
  "events": [["subj_1", "v_1", "obj1"], ["subj_2", "v_2", "obj2"], ...],
  "lable": 1,
  "crop": "apple inc",
  "e2e_edges": [[0, 1], [1, 3], ...],
  "e2s_edges": [[0, 1], [1, 2], ...]
}
  • sentences: the set of sentences in news documents;
  • events: the set of event triples extracted from sentences;
  • crop: the corporation whose stock prices need to be predicted;
  • label: 0 and 1 represents the stock price of the "crop" will decline and rise, respectively;
  • e2e_edges: connections between two events, [0, 1] represents the first event is connected with the second one;
  • e2s_edges: connections between sentences and events, [0, 1] represents the first event is connected with the second sentence.

We use CoreNLP for event extraction.

TF-IDF files generation can refer to HeterSumGraph.

Raw Data can refer to here.

Processed data can refer to here, password: 19i0.

Train

For training, you can run the commands like this:

python train_stock.py

Evaluation

For evaluation, you can run commands like this:

python auc.py

Citation

If you find the paper or the resource is useful, please cite our work in your paper:

@article{xiong2021heterogeneous,
  title={Heterogeneous graph knowledge enhanced stock market prediction},
  author={Xiong, Kai and Ding, Xiao and Du, Li and Liu, Ting and Qin, Bing},
  journal={AI Open},
  volume={2},
  pages={168--174},
  year={2021},
  publisher={Elsevier}

hgm-gif's People

Contributors

waste-wood avatar

Stargazers

hummingg avatar  avatar XianpingMa avatar bryantao avatar  avatar

Watchers

 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.