2
$\begingroup$

I'm trying to solve a classification problem from the KDD cup archive of 2004. Details can be found here: KDD 2004 Archive I'm only dong the particle physics part. The description of dataset is as follows: Each line in the training and the test file describes one example. The structure of each line is as follows:

The first element of each line is an EXAMPLE ID that uniquely describes the example. You will need this EXAMPLE ID when you submit results.

The second element is the class of the example. Positive examples are denoted by 1, negative examples by 0. Test examples have a "?" in this position. This is a balanced problem so the target values are roughly half 0's and 1's.

All following elements are feature values. There are 78 feature values in each line.

Missing values: columns 22,23,24 and 46,47,48 use a value of "999" to denote "not available", and columns 31 and 57 use "9999" to denote "not available". These are the column numbers in the data tables starting with 1 for the first column (the case ID numbers). If you remove the first two columns (the case ID numbers and the targets), and start numbering the columns at the first attribute, these are attributes 20,21,22, and 44,45,46, and 29 and 55, respectively. You may treat missing values any way you want, including coding them as a unique value, imputing missing values, using learning methods that can handle missing values, ignoring these attributes, etc.

Training data for the quantum physics task: 50,000 train cases
Test data for the quantum physics task: 100,000 test cases

The elements in each line are separated by whitespace. My actual problem is, that when I run the code, I get two outputs. One is the "predicted" value, which is obtained after comparing the nearest neighbors and getting the average (either 0, or 1). Second output is the "actual" value, which comes out to be a question-mark ('?'). In order to calculate the accuracy, I need to compare the "predicted" values with some "actual" values, which, in my case are question-marks. I don't know how to exactly compare the values, because apparently, I don't have any values from which I can compare my predicted values.
Here is an attached screen-shot of my output: kNN.py Output Screen-shot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.