GithubHelp home page GithubHelp logo

riskcontra's Introduction

RiskContra

RiskContra: A Contrastive Approach to Forecast Traffic Risks with Multi-Kernel Networks

Introduction

Spatial-temporal learning is the mainstream approach to exploring complex evolving patterns. However, two intrinsic challenges lie in traffic accident forecasting, preventing the straightforward adoption of spatial-temporal learning. First, the temporal observations of traffic accidents exhibit ultra-rareness due to the inherent properties of accident occurrences, which leads to the severe scarcity of risk samples in learning accident patterns. Second, the spatial distribution of accidents is severely imbalanced from region to region, which poses a serious challenge to forecast the spatially diversified risks. To tackle the above challenges, we propose RiskContra, a Contrastive learning approach with multi-kernel networks, to forecast the Risk of traffic accidents. Specifically, to address the first challenge (i.e. temporal rareness), we design a novel contrastive learning approach, which leverages the periodic patterns to derive a tailored mixup strategy for risk sample augmentation. % that employs a customized mixup strategy to generate augmented risk samples. This way, the contrastively learned features can better represent the risk samples, thus capturing higher-quality accident patterns for forecasting. To address the second challenge (i.e. spatial imbalance), we design the multi-kernel networks to capture the hierarchical correlations from multiple spatial granularities. This way, disparate regions can utilize the multi-granularity correlations to enhance the forecasting performance across regions.

Framework

image

Result

image

Visualization

image image

Usage

train model on NYC:

python train.py --config config/nyc/RiskContra_NYC_Config.json --gpus 0

train model on Chicago:

python train.py --config config/chicago/RiskContra_Chicago_Config.json --gpus 0

riskcontra's People

Contributors

louisechen520 avatar

Stargazers

 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.