Giter VIP home page Giter VIP logo

cecp's Introduction

CECP

This is the source code for CECP, "Charge Prediction by Constitutive Elements Matching of Crimes", which has been accepted by IJCAI-2022.


Requirements

The program has been tested in the following environment:

  • Ubuntu 18.04
  • Python 3.7.6
  • Pytorch 1.7.1
  • thulac 0.2.1
  • scikit-learn 0.22.1
  • numpy 1.18.1

Structure

|-- ckpt/                   // obtained checkpoints from training

|-- data                    // folder to store data
    |-- CEs/                // raw data of constitutive elements
    |-- criminal/           // raw data of criminal dataset
    |-- cail/               // raw data of cail dataset
    |-- processed_data/     // processed data, represented by wordID
    |-- README.md

|-- logs/                   // folder to store results and training logs

|-- model/                  // code for training and testing
    |-- config.py           // hyperparameters
    |-- customer_layers.py  // code for aggregation, PFI, and action
    |-- encoder.py          // code for encoder
    |-- main.py             // train and test
    |-- model.py            // code for environment, agent, and predictor
    |-- util.py             //

|-- utils                   // 
    |-- preprocess_data.py  // preprocessing
    |-- read_save_data.py   // processing data and saving them

Quick Start

First, download the processed data from processed data example - Baidu or processed data example - Google and unzip them to ./data/processed_data/.

For training and testing:

cd model
python main.py --dataset criminal --nclass 149

cecp's People

Contributors

jiezhao6 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.