I am tasked with implementing K nearest neighbor with java. To do so with 2 csv files. One is training and one is test, they contain the data from a census about how much people earn.
An example of some of the file is (this is exactly how it is in the file) :
meta data: age, workclass, fnlwgt, education, education-num, marital-status, occupation, relationship, race, sex, capital-gain, capital-loss, hours-per-week, native-country, earns
example 1: 25, Private, 226802, 11th, 7, Never-married, Machine-op-inspct, Own-child, Black, Male, 0, 0, 40, United-States, <=50K
example 2: 38, Private, 89814, HS-grad, 9, Married-civ-spouse, Farming-fishing, Husband, White, Male, 0, 0, 50, United-States, <=50K
I just do not understand how to take the key information from these files using scanners and file readers, for example if i wanted just the hours each person worked at the simplist.
If you have a basic outline of how to implement this with knn too would be appericated...
sorry for breaking any rules or not understanding full how to ask questions in advance.