https://github.com/abductivelearning/ss-abl
https://github.com/abductivelearning/ss-abl
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/abductivelearning/ss-abl
- Owner: AbductiveLearning
- Created: 2020-09-15T14:03:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T05:57:47.000Z (over 2 years ago)
- Last Synced: 2025-04-02T02:46:29.804Z (about 1 year ago)
- Language: Python
- Size: 2.92 MB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🌟 **New!** [ABLkit](https://github.com/AbductiveLearning/ABLkit) released: A toolkit for Abductive Learning with high flexibility, user-friendly interface, and optimized performance. Welcome to try it out!🚀
# Semi-Supervised Abductive Learning for Theft Judicial Sentencing
This is the repository for holding the sample code of the Semi-Supervised Abductive Learning framework for Theft Judicial Sentencing experiments in _Semi-Supervised Abductive Learning and Its Application to Theft Judicial Sentencing_ in ICDM 2020.
**This code is only tested in Linux environment.**
## Dependency
- Python 3.6
- tensorflow 1.12.0
## Running Code
### Set Data File Path
```python3
# Before running code, we should set data file path first.
# By default, all data files are in "./data/"
# Data file path's setting codes are lies on line 207 - 212 in "ss_abl_model.py".
# Bert Pretrain json file name
pretrain_filename = "0_0.10.json"
# Sentence model supervised traning data file path
pretrain_money_filename = "./data/0_0.10.csv"
# Unlabeled data file name
abl_train_filename = "1_0.90.json"
abl_train_money_filename = "1_0.90.csv"
# Bert test data file name
test_filename = "10.json"
# Sentence model test data file name
test_money_filename = "10.csv"
```
```bash
unzip data/dataset.zip
wget https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip
unzip chinese_L-12_H-768_A-12.zip
python ss_abl_model.py
```
### Parameters
Our model's parameters are listed below.
```python3
# Model's Parameter and default value
abl_max_change_num = 2 # The max number of label could be changed on abduction
abl_times = 1 # The model traning iteration number
rule_file_path = "rule_test_file.txt" # abduction rule file path
pretrain_bert_train_epochs = 16 # The epoch number of BERT training on Supervised data
pretrain_sentence_model_times = 3 # The epoch number of sentence model traning on Supervised data
abl_bert_train_epochs = 1 # The epoch number per iteration of BERT traning on abduction process
abl_sentence_model_times = 3 # The epoch number per iteration of sentence model traning on abduction process
```