Giter Site home page Giter Site logo

template-extension-new-model's Introduction

Template for extending ASReview with new model

ASReview has support for extensions, which enable you to seamlessly integrate your own programs with the ASReview framework. These extensions can extend the software with new classifiers, query strategies, balance strategies, and feature extraction techniques. This template can be used to write such an extension (add a new SKLearn naive Bayes classifier with default settings in this case).

See the section Extensions on ReadTheDocs for more information on writing extensions.

Getting started

Click the Use this template button and add/modify the algorithms. Install your new classifier with

pip install .

or

pip install git+https://github.com/{USER_NAME}/{REPO_NAME}.git

and replace {USER_NAME} and {REPO_NAME} by your own details.

Usage

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

asreview simulate example_data_file.csv -m nb_example

License

MIT license

template-extension-new-model's People

Contributors

bartjanboverhof avatar j535d165 avatar jteijema avatar rensvandeschoot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jteijema gimoai

template-extension-new-model's Issues

Install pip with git link

I found that the install link for pip should be: pip install git+https://github.com/{USER_NAME}/{REPO_NAME}.git, not the current link.

Missing entry point

Attempting to try out the example template via below:

docker run -it --entrypoint=/bin/bash -p 5000:5000 asreview/asreview
cd ~
curl https://raw.githubusercontent.com/asreview/systematic-review-datasets/master/datasets/Bos_2018/output/Bos_2018.csv -o Bos_2018.csv
git clone https://github.com/asreview/template-extension-new-model.git
cd template-extension-new-model/
pip install .
cd ..
asreview simulate Bos_2018.csv -m nb_example

Running into the following error:

            _____ _____            _
     /\    / ____|  __ \          (_)
    /  \  | (___ | |__) |_____   ___  _____      __
   / /\ \  \___ \|  _  // _ \ \ / / |/ _ \ \ /\ / /
  / ____ \ ____) | | \ \  __/\ V /| |  __/\ V  V /
 /_/    \_\_____/|_|  \_\___| \_/ |_|\___| \_/\_/

---------------------------------------------------------------------------------
|                                                                                |
|  Welcome to the ASReview Automated Systematic Review software.                 |
|  In this mode the computer will simulate how well the ASReview software        |
|  could have accelerate the systematic review of your dataset.                  |
|  You can sit back and relax while the computer runs this simulation.           |
|                                                                                |
|  GitHub page:        https://github.com/asreview/asreview                      |
|  Questions/remarks:  [email protected]                                            |
|                                                                                |
---------------------------------------------------------------------------------

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/asreview/utils.py", line 189, in _model_class_from_entry_point
    return entry_points[method].load()
KeyError: 'nb_example'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/asreview", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/asreview/__main__.py", line 38, in main
    entry.load()().execute(sys.argv[2:])
  File "/usr/local/lib/python3.6/site-packages/asreview/entry_points/simulate.py", line 34, in execute
    review_simulate(path, **args_dict)
  File "/usr/local/lib/python3.6/site-packages/asreview/review/factory.py", line 252, in review_simulate
    review(dataset, *args, mode='simulate', **kwargs)
  File "/usr/local/lib/python3.6/site-packages/asreview/review/factory.py", line 235, in review
    reviewer = get_reviewer(*args, mode=mode, model=model, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/asreview/review/factory.py", line 177, in get_reviewer
    random_state=random_state)
  File "/usr/local/lib/python3.6/site-packages/asreview/models/utils.py", line 58, in get_model
    model_class = get_model_class(method)
  File "/usr/local/lib/python3.6/site-packages/asreview/models/utils.py", line 43, in get_model_class
    return _model_class_from_entry_point(method, "asreview.models")
  File "/usr/local/lib/python3.6/site-packages/asreview/utils.py", line 192, in _model_class_from_entry_point
    f"Error: method '{method}' is not implemented for entry point "
ValueError: Error: method 'nb_example' is not implemented for entry point asreview.models.

Is there something I am missing?

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.