Build a very straightforward and fully functional machine

Assignment Help JAVA Programming
Reference no: EM13692649

KNN Assignment:

Build a very straightforward and fully functional machine learning classifier with the K-Nearest Neighbor (KNN) algorithm. The KNN model will read a set of data specified by the user, decide the appropriate class of the new instance, and finally output the performance metrics of the model based on test data set.

Requirements:

  • The implementation should  be written in Java.
  • The distance metric used  should be Euclidean distance.
  • The model should use the  training data set as the existing data set to classify the data in the  test set.
  • The performance metrics  output needs to include the confusion matrix and accuracy  (1-misclassification rate).
  • The code must be commented  so that each implemented component of the KNN algorithm is properly  labeled.
  • Use object-orien ted techniques (do not make the whole program one monolithic procedu ral implementation).
    • Separate the distance  calculations, sorting, data structure, and other components so that each  of them can be developed and reviewed individually.
  • Implement the classifier  as a standalone program.

Assignment Deliverable:

This is what I need for my output

1) All source code

2) A copy of the output when K=3

3) A copy of the output when K=5

4) A copy of the output when K=7

5) Confusion matrix and accuracy

A few notes:

- Input/output streams

- Distance calculation

- KNN algorithm

- Confusion matrix and accuracy

- Object-oriented and commented codes

2) You must take the input file path from the command line. We want students to learn how to input dataset from file into memory. In the real world, we will run multiple datasets via multiple files to analyze the results. Coding the file name in your program is not practical.

3) Make sure you test all the rows and use all the other data points as your training data. For example, when you are testing row 1, you need to use rows 2 to 150 as the training data for the calculation. When you are testing row 2, you need to use rows 1 and rows 3 to 150 for the calculation.

4) You should not use a K with an even number. After locating the K nearest neighbors, we need to take the majority for the predicted value. An even number K will potentially have many ties when you are trying to select the majority.

5) I may choose to run a subset of the input data. Please make sure your program works for any input data with the same format.

Reference no: EM13692649

Questions Cloud

Calculate the payments for the new loan. : Crazy hours Construction purchased a new loader for $280,000 using a 25 annual end of year payment plan at 10% interest. At the end of 10 years they decided to refinance the loader with a new company with 15-year loan.
Earth-moving equipment is considering an investment : A profitable company making earth-moving equipment is considering an investment of $100,000 on equipment, which will have a 5 year useful life and, no salvage value. If money is worth 10% which one of the following there methods of depreciation would..
What is the marginal revenue product of the fourth worker : What is the marginal product of the third worker? What is the marginal revenue product of the fourth worker? What is the marginal cost of the sixth worker?
Build distributed applications using technologies : Build distributed applications using technologies like Unix and Java sockets, SUN RPC, Java RMI, and message-passing tools such as PVM and MPI and
Build a very straightforward and fully functional machine : Build a very straightforward and fully functional machine learning classifier with the K-Nearest Neighbor (KNN) algorithm. The KNN model will read a set of data specified by the user, decide the appropriate class of the new instance, and finally o..
Determine the classification of the lease for us gaap : Determine the classification of the lease for US GAAP?  Does the classification differ for IFRS?  If so, why?  Provide comments where any judgment by CCI's management would be necessary.
Lagging indicators and unemployment rate the price of gold : Economists argue at what point of the Business Cycle our country is now situated. Utilizing the concepts of leading, coincident and lagging indicators and Unemployment rate the price of gold and oil is rapidly raising and gasoline is often over $4.00..
How much will energy maxs payment drop with the new loan : Energy Max engineering constructed a small office building for their firm 5 years ago. They financed it with bank loan for $450000 over 15 years at 6% interest with quarterly payment and compounding. The loan can be refinanced through an insurance fi..
How many cigars and brandy does he consume per night : How many cigars and brandy does he consume per night? (Money is no object!) What if J.P.'s doctor tells him that he should limit his consumption of (the sum of) cigars and brandy to 5 per night. If he follows this advice, how many glasses of brandy a..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd