Cortex API
  • Getting Started
  • Connecting to the Cortex API
  • Overview of API flow
  • Authentication
    • getCortexInfo
    • getUserLogin
    • requestAccess
    • hasAccessRight
    • authorize
    • generateNewToken
    • getUserInformation
    • getLicenseInfo
  • Headsets
    • controlDevice
    • queryHeadsets
    • updateHeadset
    • updateHeadsetCustomInfo
    • syncWithHeadsetClock
    • Headset object
  • Sessions
    • createSession
    • updateSession
    • querySessions
    • Session object
  • Data Subscription
    • subscribe
    • unsubscribe
    • Data sample object
  • Records
    • createRecord
    • stopRecord
    • updateRecord
    • deleteRecord
    • exportRecord
    • queryRecords
    • getRecordInfos
    • configOptOut
    • requestToDownloadRecordData
    • Record object
  • Markers
    • injectMarker
    • updateMarker
    • Marker object
  • Subjects
    • createSubject
    • updateSubject
    • deleteSubjects
    • querySubjects
    • getDemographicAttributes
    • Subject object
  • BCI
    • queryProfile
    • getCurrentProfile
    • setupProfile
    • loadGuestProfile
    • getDetectionInfo
    • training
    • Readonly profile
  • Advanced BCI
    • getTrainedSignatureActions
    • getTrainingTime
    • facialExpressionSignatureType
    • facialExpressionThreshold
    • mentalCommandActiveAction
    • mentalCommandBrainMap
    • mentalCommandGetSkillRating
    • mentalCommandTrainingThreshold
    • mentalCommandActionSensitivity
  • Warning Objects
  • Error Codes
  • Troubleshooting Guide
  • Release Notes
  • cortexaccess tool
Powered by GitBook
On this page
  • Parameters
  • status
  • action
  • Result
  • Examples
  • Start a training
  • Accept a training
  1. BCI

training

PreviousgetDetectionInfoNextReadonly profile

Last updated 1 year ago

This method is to control the training of the mental command and facial expression detections. Before you start a training, you should to the "sys" data stream.

See for details.

Parameters

Name

Type

Required

Description

cortexToken

string

yes

session

string

yes

detection

string

yes

Must be "mentalCommand" or "facialExpression".

status

string

yes

Control what this method does, like start the training, or cancel it... Available status depends on which detection you selected.

action

string

yes

The action you want to train. Available actions depends on which detection you selected.

status

To get the available status for a detection, call , and check the field controls of the result object. Or you can check this list:

Status

Description

start

Start a new training for the specified action.

accept

Accept a successful training and add it to the profile.

reject

Reject a successful training. It is not added to the profile.

reset

Cancel the current training.

erase

Erase all the training data for the specified action.

action

However, note that for the facial expression detection, only these actions can be trained: "neutral", "surprise", "frown", "smile", "clench".

Result

The result is an object containing these fields:

Name

Type

Description

action

string

The action you set in the request.

status

string

The status you set in the request.

message

string

A success message.

Examples

Start a training

Start a mental command training for the action "push".

{
    "id": 14,
    "jsonrpc": "2.0",
    "method": "training",
    "params": {
        "action": "push",
        "cortexToken": "xxx",
        "detection": "mentalCommand",
        "session": "f3a35fd0-9163-4cc4-ab30-4ed224369f91",
        "status": "start"
    }
}
{
    "id": 14,
    "jsonrpc": "2.0",
    "result": {
        "action": "push",
        "message": "Set up training successfully",
        "status": "start"
    }
}

Accept a training

Accept a successful training for the action "push".

{
    "id": 15,
    "jsonrpc": "2.0",
    "method": "training",
    "params": {
        "action": "push",
        "cortexToken": "xxx",
        "detection": "mentalCommand",
        "session": "f3a35fd0-9163-4cc4-ab30-4ed224369f91",
        "status": "accept"
    }
}
{
    "id": 15,
    "jsonrpc": "2.0",
    "result": {
        "action": "push",
        "message": "Set up training successfully",
        "status": "accept"
    }
}

A token returned by .

A session id returned by . The training will be for the headset linked to this session.

To get the available actions for a detection, call , and check the field actions of the result object.

subscribe
BCI
getDetectionInfo
getDetectionInfo
authorize
createSession