1. Requirements and data set description
This is a binary classification task evaluating classification accuracy (percentage of correctly predicted labels). The training set has 1000 samples and the test set has 9000 samples. Your prediction should be a 9000 x 1 vector. You'll also need an Id column (1 to 9000), and that should include a header. The format is as follows:
Id,Solution
1,0
2,1
3,1
...
9000,0
Dataset download address
Link: https://pan.baidu.com/s/1Dy5uF_OAmCQC3G-71e-yEQ?pwd=tjzq
Extraction code: tjzq
2. Import package and read data
import numpy as np
import pandas as pd
from sklearn.metrics import accuracy_score
from sklearn.model_selection import cross_val_score
import os
train_data = pd.read_csv('../input/train.csv',header = None)
train_labels = pd.read_csv('../input/trainLabels.csv',header = None)
test_data = pd.read_csv('../input/test.csv',header = None)
If the following model reports an error when running, you can try the following method
train_data = pd.read_csv('data-science-london-scikit-learn/train.csv',header