{
  "fetched_at": "2026-10-19T19:00:12Z",
  "source_url": "https://www.kaggle.com/competitions/bci2022competition/data",
  "pages": [
    {
      "name": "data-description",
      "content": "training set, testing set: (Samples, Types of blood oxygen（HbO、HbR）, Channels, Sampling point) ---> (160，2，22，152) \ntraining label, testing label: (Samples)---> (160), 0 indicates rest and 1 indicates MI.",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Description",
      "content": "###Competition format and rules\n(1) Competition format. \nThe competition platform is Kaggle: contestants register on Kaggle, download the training set, train model, and predict labels for the testing set. Next, please  contestants upload the lables to Kaggle for scoring, and the highest score for first place. The competition organizing committee provided experimental documentation, data guidelines and baseline algorithms.\n\nCompetition URL：https://www.kaggle.com/competitions/bci2022competition\nBaseline algorithms：https://github.com/GaryHou8/bci2022\n\n(2) Competition rules. \nIn this competition, contestants need to write the fNIRS data recognition algorithm, use the training set to train model. The obtained model was then used to classify the test set. The dataset of this competition includes 8 subjects. Subjects were given two task, lower limb motor imagery and resting. The dataset of subjects 01-04 are used as the training set, and the dataset of subjects 05-08 are used as the testing set. Please contestants train the machine learning (transfer learning) model, make predictions for the dataset, and submit the prediction results to the designated platform. Ranking according to the accuracy of the test set, the calculation method of the accuracy is as follow: accuracy=(true positives + true negatives) / (total examples).\n\nNote: The final score is the average of the public and private rankings on the leaderboard. The public rankings are updated in real time, and the private rankings will be announced after the competition! ! !\n\n###Competition arrangement\nThe competition consists of three parts: pre-competition training, preliminary competition and final competition.\n1. Pre-competition training. Before the competition, the competition organizing committee will invite experienced algorithm engineers to provide professional pre-competition training and guidance, including platform use guidance, benchmark algorithm introduction, data introduction, etc.\n2. Preliminary competition. The participating teams compete on the competition platform and finally select the top 10 teams to enter the final competition.\nTime : December 24, 2022-April 30, 2023\n3. final competition. The final competition will be in the form of defense, and three judges will evaluate the models and ideas of each team and give the defense scores. The final score is calculated from the scores of the preliminary competition and the defense, of which the score of the preliminary competition accounts for 70% and the score of the final defense accounts for 30%.\nTime: May 7, 2023-May 8, 2023\n\n###Contact details\nContact person：\nXiaofeng Xie, E-mail：xfxie@hainanu.edu.cn\nYao Hou，E-mail：mrhouyao@163.com\n\nRegistration and communication email：812654142@qq.com\nCompetitionofficial communication QQ group：699708063\n ",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Evaluation",
      "content": "### Target\nMotor imagery near infrared data classification\n\n### Evaluation metrics\nAccuracy\n\n### Submission format\nYou should submit a csv file:\n-  TrialId\n-  Label(1 or 0)\n\n```\nTrialId,Label\n1,1\n2,0\n3,1\nEtc.\n```",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "rules",
      "content": "### Submission limit\n\nYou can submit results up to 5 times per day.\n",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Baseline Algorithm",
      "content": "```python\nimport pandas as pd\nimport scipy.io as scio\nimport numpy as np\nfrom sklearn import svm\n\ndef train_fNIRS():\n    dataFile_train_data = '/kaggle/input/bci2022competition/train_data.mat'\n    dataFile_train_label = '/kaggle/input/bci2022competition/train_label.mat'\n    dataFile_test_data = '/kaggle/input/bci2022competition/test_data.mat'\n\n    data_train_data = scio.loadmat(dataFile_train_data)\n    data_train_label = scio.loadmat(dataFile_train_label)\n    data_test_data = scio.loadmat(dataFile_test_data)\n\n    train_data = data_train_data['train_data']\n    train_label = data_train_label['train_label']\n    test_data = data_test_data['test_data']\n\n    train_data_mean = np.mean(train_data, -1)\n    train_data_max = np.max(train_data, -1)\n    train_data_std = np.std(train_data, -1)\n\n    test_data_mean = np.mean(test_data, -1)\n    test_data_max = np.max(test_data, -1)\n    test_data_std = np.std(test_data, -1)\n\n    train_features = np.concatenate((train_data_mean, train_data_max, train_data_std), axis=1).\\\n        reshape(train_data.shape[0], -1)\n    test_features = np.concatenate((test_data_mean, test_data_max, test_data_std), axis=1).\\\n        reshape(test_data.shape[0],-1)\n\n    clf = svm.SVC(gamma='auto', C=1, kernel='rbf', probability=True)\n    clf.fit(train_features, train_label.ravel())\n    train_accuracy = clf.score(train_features, train_label.ravel())\n    print('training dataset accuracy：{}'.format(train_accuracy))\n    test_pred = clf.predict(test_features)\n    trial_id = [i for i in range(1, 161)]\n    dataframe = pd.DataFrame({'TrialId': trial_id,\n                              'Label': test_pred})\n    dataframe.to_csv(\"submission.csv\", index=False, sep=',')\n\n    \nif __name__ == '__main__':\n    train_fNIRS()\n```",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    }
  ]
}