[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': "Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:import numpy as np\ndef load_dataset(dataset_name):\n'''\ndata,labels = load_dataset(dataset_name)\nLoad a given dataset\nReturns\n-------\ndata : numpy ndarray\nlabels : list of str\n'''\ndata = []\nlabels = []\nwith open('{0}.tsv'.format(dataset_name)) as ifile:\nfor line in ifile:\ntokens = line.strip().split('\\t')\ndata.append([float(tk) for tk in tokens[:-1]])\nlabels.append(tokens[-1])\ndata = np.array(data)\nlabels = np.array(labels)\nreturn data, labels\nfeatures,labels = load_dataset('seeds')\nlabels = labels == 'Canadian'\ndef learn_model(features, labels):\nbest_acc = -1.0\nfor fi in range(features.shape[1]):\nthresh = features[:,fi].copy()\nthresh.sort()\nfor t in thresh:\npred = (features[:,fi] > t)\nacc = (pred == labels).mean()\nif acc > best_acc:\nbest_acc = acc\nbest_fi = fi\nbest_t = t\nreturn best_t, best_fi\ndef apply_model(features, model):\nt, fi = model\nreturn features[:,fi] > t\ndef accuracy(features, labels, model):\npreds = apply_model(features, model)\nreturn np.mean(preds == labels)\nerror = 0.0\nfor fold in range(10):\ntraining = np.ones(len(features), bool)\ntraining[fold::10] = 0\ntesting = ~training\nmodel = learn_model(features[training], labels[training])\ntest_error = accuracy(features[testing], labels[testing], model)\nerror += test_error\nerror /= 10.0\nprint('Ten fold cross-validated error was {0:.1%}.'.format(error))\nfeatures -= features.mean(0)\nfeatures /= features.std(0)\nerror = cross_validate(features, labels)\nprint('Ten fold cross-validated error after z-scoring was {0:.1%}.'.format(error))"}, {'role': 'assistant', 'content': 'modelling'}]