pyns.endpoints.predictor.Predictors

class pyns.endpoints.predictor.Predictors(client)

Bases: Base

Predictors endpoint

auto_methods: get, post

__init__(client)

Initialize a Model instance.

Parameters:

client (Neuroscout) – base client instance

Methods

__init__(client)

Initialize a Model instance.

create_collection(collection_name, ...[, ...])

Create new predictor collection

get_collection(collection_id)

Get predictor collection

create_collection(collection_name, dataset_id, runs, event_files, descriptions=None)

Create new predictor collection

Parameters:
  • collection_name (str) – Collection name.

  • dataset_id (int) – Dataset id.

  • runs (list) – List of lists of run ids corresponding to each event_file.

  • event_files (list) – List of TSV files with new predictor columns. Required columns: onset, duration, any number of columns with values for new Predictors.

  • descriptions (list) – list of dictionaries, where each dict matches to a tsv file, and keys in the dict correspond to columns in the event file. Values are strings with a verbal description of each column.

Returns:

Requests response object

Rype:

requests.Response

get_collection(collection_id)

Get predictor collection

Parameters:

collection_id (int) – Collection ID

Returns:

Requests response object

Rype:

requests.Response