Hello,
I have problem in the following code:
training_set, validation_set = train_test_split(aaron_judge, random_state = 1)
for i in range(6):
for k in range(6):
classifier = SVC(kernel = 'rbf', gamma = [i], C = [k])
classifier.fit(training_set[['plate_x', 'plate_z']], training_set.type)
current = classifier.score(validation_set[['plate_x', 'plate_z']], validation_set.type )
if maximum < current:
maximum = current
cecko = k
icko = i
print(maximum, cecko, icko)
The thrown error is: TypeError: must be real number, not list
I guess the problem is this: [[‘plate_x’, ‘plate_z’]]
but I need both values as the ‘x_value’ consists of both of these while the label consists of only the ‘type’ column.
What should I do? Or what is exactly the problem?