Skip to content

Commit

Permalink
Skeleton code about to be deleted. Slight changes in this commit, not…
Browse files Browse the repository at this point in the history
…hing serious. Eventually the sekeleton package will be deleted since it's no longer used, but kept around as a base of reference.
  • Loading branch information
jweaver committed Jun 9, 2012
1 parent 1b30929 commit c7babfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
@@ -1,11 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.weaverworx.usc.csci561.assignment3.skeleton;

import com.weaverworx.usc.csci561.assignment3.knn.KNNRecord;
import com.weaverworx.usc.csci561.assignment3.util.FileReader;
import com.weaverworx.usc.csci561.assignment3.util.ClassifierInputReader;
import com.weaverworx.usc.csci561.assignment3.util.LearningUtil;

/**
Expand All @@ -22,9 +18,9 @@ public static void main(String args[]) {

int K = LearningUtil.parseKArgument(args); // read K from user input

int[][] train = FileReader.getTrainingData(numberOfFeatures, numberOfClasses); // last column 785 is a class of train
int[][] train = ClassifierInputReader.getTrainingData(numberOfFeatures, numberOfClasses); // last column 785 is a class of train
// image
int[][] test = FileReader.getTestData(numberOfFeatures, numberOfClasses); // last column 785 is a class of test
int[][] test = ClassifierInputReader.getTestData(numberOfFeatures, numberOfClasses); // last column 785 is a class of test
// image

KNNRecord[] knn_records = new KNNRecord[train.length]; //
Expand Down
@@ -1,13 +1,9 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.weaverworx.usc.csci561.assignment3.skeleton;

import java.io.*;
import java.util.*;

import com.weaverworx.usc.csci561.assignment3.util.FileReader;
import com.weaverworx.usc.csci561.assignment3.util.ClassifierInputReader;
import com.weaverworx.usc.csci561.assignment3.util.LearningUtil;

/**
Expand All @@ -29,9 +25,9 @@ public static void main(String args[]) {

int threshold = LearningUtil.parseKArgument(args); // read threshold

int[][] trainingData = FileReader.getTrainingData(numberOfFeatures, numberOfClasses); // last column 785 is a class of train
int[][] trainingData = ClassifierInputReader.getTrainingData(numberOfFeatures, numberOfClasses); // last column 785 is a class of train
// image
int[][] testData = FileReader.getTestData(numberOfFeatures, numberOfClasses); // last column 785 is a class of test
int[][] testData = ClassifierInputReader.getTestData(numberOfFeatures, numberOfClasses); // last column 785 is a class of test
// image

//Setup N_Y: the number of times a given training data appears amongst ALL the training data.
Expand Down

0 comments on commit c7babfb

Please sign in to comment.