Skip to content

Commit

Permalink
feat: add code for 1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
fif911 committed Aug 17, 2024
1 parent ac01ccd commit 0f15827
Show file tree
Hide file tree
Showing 124 changed files with 590,112 additions and 87,189 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ignore pickles and other files:
*.p
venv
# *.p
*.pyc
*/.DS_Store
.ipynb_checkpoints
Expand All @@ -8,7 +9,9 @@
__pycache__
*.log
.idea
/figures/*
figures/*
model_cache/*
submission/ng_boost_*

# ignore ALL files in ANY directory named:
memos/
Expand All @@ -23,3 +26,4 @@ submission/readme.txt

# ignore this irrelevant HH file...
Data_for_Idris.ipynb

13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: local
hooks:
- id: jupyter-nb-clear-output
name: jupyter-nb-clear-output
files: \.ipynb$
stages: [ commit ]
language: system
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --inplace
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,37 @@ a reference against which future improvements can be evaluated.
· Fatalities prediction · Predicting with uncertainty.

The report with details is
available [here](https://drive.google.com/file/d/1r63S5BRPRl8G2HuTjyWtFpOxvVNsNV7o/view?usp=sharing).
available [here](https://drive.google.com/file/d/1r63S5BRPRl8G2HuTjyWtFpOxvVNsNV7o/view?usp=sharing).

## Model

The NGBoost model code is stored in the model folder in two representations: `.py` and `.ipynb`. Simply run the script,
and it will produce plots along with submission files.

## Model Evaluation

The model is evaluated using `evaluate_submissions.py` file, and the aggregated statistics about the model can be
gathered via `compare_submissions.ipynb`.

## Development

### Set up environment

Set up the environment using poetry by running the following command:

```bash
poetry install
```

### Install pre-commit hooks

Run the following command to install pre-commit hooks:

```bash
pre-commit install
```

Ensure that you have the following dependencies installed:

1) black (for formatting)
2) jupiter (for removing output from notebooks)
Binary file not shown.
25 changes: 25 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 2024-07-28

### Added

- Initial Implementation of the Military Conflict Forecasting Model

## [1.0] - 2023-08-17

### Added

- Converted .ipynb files to .py using Jupytex.
- Support for 2023 data.
- 11 PCAs for V-DEM dataset in the final `cm_features_v2.5` and removed 40 V-DEM features.
- New benchmarks published by ViEWS.

### Changed

- Migrated to the most recent version of `cm_features` published by ViEWS.
68,279 changes: 68,279 additions & 0 deletions data/cm_features_v2.5.csv

Large diffs are not rendered by default.

54,759 changes: 54,759 additions & 0 deletions data/cm_features_v2.5_Y2018.csv

Large diffs are not rendered by default.

Loading

0 comments on commit 0f15827

Please sign in to comment.