API Reference

Data and datasets

Read data

load_data(name, *args, **kwargs)

Load data from file, URL, or plugin.

ASReviewData([df, column_spec])

Data object to the dataset with texts, labels, DOIs etc.

Statistics

data.statistics.abstract_length(data)

Return the average length of the abstracts.

data.statistics.n_duplicates(data)

Number of duplicates.

data.statistics.n_irrelevant(data)

Return the number of irrelevant records.

data.statistics.n_keywords(data)

Return the number of keywords.

data.statistics.n_missing_abstract(data)

Return the number of records with missing abstracts.

data.statistics.n_missing_title(data)

Return the number of records with missing titles.

data.statistics.n_records(data)

Return the number of records.

data.statistics.n_relevant(data)

Return the number of relevant records.

data.statistics.n_unlabeled(data)

Return the number of unlabeled records.

data.statistics.title_length(data)

Return the average length of the titles.

Datasets

Available datasets

asreview.datasets.BenchmarkDataGroup()

Datasets available in the benchmark platform.

asreview.datasets.NaturePublicationDataGroup()

Datasets used in the paper Van de Schoot et al. 2020.

Dataset managers

asreview.datasets.BaseDataSet(dataset_id, ...)

asreview.datasets.BaseDataGroup(*datasets)

asreview.datasets.DatasetManager()

Reviewer

review.BaseReview(as_data, project[, model, ...])

Base class for Systematic Review.

review.ReviewSimulate(as_data, *args[, ...])

ASReview Simulation mode class.

Models

Base class

models.base.BaseModel()

Abstract class for any kind of model.

asreview.models.balance

Classes

balance.base.BaseBalance()

Abstract class for balance strategies.

balance.SimpleBalance()

Simple (no balancing) balance strategy.

balance.DoubleBalance([a, alpha, b, beta, ...])

Double balance strategy.

balance.TripleBalance([a, alpha, b, beta, ...])

Triple balance strategy.

balance.UndersampleBalance([ratio, random_state])

Undersampling balance strategy.

Functions

balance.get_balance_model(name, *args[, ...])

Get an instance of a balance model from a string.

balance.get_balance_class(name)

Get class of balance model from string.

balance.list_balance_strategies()

List available balancing strategy classes.

asreview.models.classifiers

Classes

classifiers.base.BaseTrainClassifier()

Base model, abstract class to be implemented by derived ones.

classifiers.NaiveBayesClassifier([alpha])

Naive Bayes classifier.

classifiers.RandomForestClassifier([...])

Random forest classifier.

classifiers.SVMClassifier([gamma, ...])

Support vector machine classifier.

classifiers.LogisticClassifier([C, ...])

Logistic regression classifier.

classifiers.LSTMBaseClassifier([...])

LSTM-base classifier.

classifiers.LSTMPoolClassifier([...])

LSTM-pool classifier.

classifiers.NN2LayerClassifier([...])

Fully connected neural network (2 hidden layers) classifier.

Functions

classifiers.get_classifier(name, *args[, ...])

Get an instance of a model from a string.

classifiers.get_classifier_class(name)

Get class of model from string.

classifiers.list_classifiers()

List available classifier classes.

asreview.models.feature_extraction

Classes

feature_extraction.base.BaseFeatureExtraction([...])

Base class for feature extraction methods.

feature_extraction.Tfidf(*args[, ngram_max, ...])

TF-IDF feature extraction technique.

feature_extraction.Doc2Vec(*args[, ...])

Doc2Vec feature extraction technique.

feature_extraction.EmbeddingIdf(*args[, ...])

Embedding IDF feature extraction technique.

feature_extraction.EmbeddingLSTM(*args[, ...])

Embedding LSTM feature extraction technique.

feature_extraction.SBERT(*args[, ...])

Sentence BERT feature extraction technique.

Functions

feature_extraction.get_feature_model(name, *args)

Get an instance of a feature extraction model from a string.

feature_extraction.get_feature_class(name)

Get class of feature extraction from string.

feature_extraction.list_feature_extraction()

List available feature extraction method classes.

asreview.models.query

Classes

query.base.BaseQueryStrategy()

Abstract class for query strategies.

query.base.ProbaQueryStrategy()

query.MaxQuery()

Maximum query strategy.

query.MixedQuery([strategy_1, strategy_2, ...])

Mixed query strategy.

query.MaxRandomQuery([mix_ratio, random_state])

Mixed (95% Maximum and 5% Random) query strategy.

query.MaxUncertaintyQuery([mix_ratio, ...])

Mixed (95% Maximum and 5% Uncertainty) query strategy.

query.UncertaintyQuery()

Uncertainty query strategy.

query.RandomQuery([random_state])

Random query strategy.

query.ClusterQuery([cluster_size, ...])

Clustering query strategy.

Functions

query.get_query_model(name, *args[, ...])

Get an instance of the query strategy.

query.get_query_class(name)

Get class of query strategy from its name.

query.list_query_strategies()

List available query strategy classes.

Projects and States

Load, interact, and extract information from project files and states (the “diary” of the review).

ASReviewProject

ASReviewProject(project_path[, project_id])

Project class for ASReview project files.

State

open_state(asreview_obj[, review_id, read_only])

Initialize a state class instance from a project folder.

state.SQLiteState([read_only])

Class for storing the review state.

Utils

project.get_project_path(project_id[, ...])

Get the project directory.

project.project_from_id(f)

project.list_asreview_projects()

List the projects in the asreview path

project.is_project(project_path)

project.is_v0_project(project_path)

Check if a project file is of a ASReview version 0 project.

Readers and writers

This module contains the input and output functionality. You can install them as extensions.

asreview.list_readers()

List available dataset reader classes.

asreview.list_writers()

List available dataset writer classes.

io.CSVReader()

CVS file reader.

io.CSVWriter()

CSV file writer.

io.ExcelReader()

Excel file reader.

io.ExcelWriter()

Excel file writer.

io.PaperRecord(record_id[, column_spec])

A single record from a paper in a systematic review.

io.RISReader()

RIS file reader.

io.RISWriter()

RIS file writer.

io.TSVWriter()

TSV file writer.

Misc

Classes

asreview.settings.ASReviewSettings(model, ...)

Object to store the configuration of a review session.

Functions

search.fuzzy_find(as_data, keywords[, ...])

Find a record using keywords.

asreview_path()

Get the location where projects are stored.

get_data_home([data_home])

Return the path of the ASR data dir.

Entry points

Entry points for ASReview LAB.

entry_points.BaseEntryPoint()

Base class for defining entry points.

entry_points.AlgorithmsEntryPoint()

Entry point to list available algorithms in ASReview LAB.

entry_points.LABEntryPoint()

Entry point to start the ASReview LAB webapp.

entry_points.SimulateEntryPoint()

Entry point for simulation with ASReview LAB.

entry_points.StateInspectEntryPoint()

Entry point to inspect ASReview LAB review progress.