Skip to content

jteijema/asreview-plugin-model-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASReview Model Switcher

DOI

This repository contains a plugin for ASReview logo. This plugin adds a model that switches between two models during runtime. It can be useful for when later stages of data classification require different models.

This plugin contains a base model and an implementation of a switching model. The current implemented switching model uses SVM and a convolutional neural network, and needs doc2vec or wide doc2vec as feature extractor.

The point at which the classification model is set to 100 and is easily changed in the code. This setting is found in the asreviewcontrib.models.config module.

Getting started

Run install the new classifier with:

pip install .

from the download folder or run the follow to install directly

python -m pip install git+https://github.com/JTeijema/asreview-plugin-model-switcher.git

Usage

The new base switcher is defined in asreviewcontrib/models/model_switcher.py.

The new classifier svm_nn is defined in asreviewcontrib/models/svm_nn.py and can be used in a simulation.

The models can be used like this:

asreview simulate benchmark:van_de_Schoot_2017 -m svm_nn -e doc2vec

CNN

If the CNN plugin is installed, it can be used in switching too, using the new classifier svm_cnn, defined in asreviewcontrib/models/svm_cnn.py.

The models can be used like this:

asreview simulate benchmark:van_de_Schoot_2017 -m svm_cnn -e doc2vec

Switch point

Currently the switch point is set manually in model_switcher.py, named switchpoint. It is set to switch after 100 iterations.

License

Apache-2.0 License