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

  Allows the user to enter a temperature and whether

Write a program that allows the user to enter a temperature and whether the temperature is stated in Celsius or Fahrenheit...or whethe

  Create a data set with 100 integer values.

Create a data set with 100 integer values. Create a program that uses the division method of hashing to store the data values into hash tables with table sizes of 7,,51 and 151. Use the linear probing method of collision resolution. Print out the ..

  Report the last letter of each word in the string

Write a sequence of Java statements that report the last letter of each word in the string.

  Write a program to test your class definition

Do not define an input method. The only method that can set the counter is the one that sets it to zero. Write a program to test your class definition.

  Part-1inheritance write code using eclipse and output

part-1inheritance write code using eclipse and output screenimplement a subclass square that extends the rectangle

  Create a java program to calculate the circumference

Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.

  Java program for real estate agent

Write down java program for real estate agent. Program must perform the following tasks: ask users for average house price for the each of past 5 years for single family residence of 1500 square feet.

  This project is for designing and developing a college

this project is for designing and developing a college registration program. prepare a java program to register

  Web engineering principles

web application development, Web Engineering methodology, UML-based Web Engineering (UWE), models to the expansion of web applications, Object Oriented Web Solutions (OOWS),Web Modeling Language (WebML) methodology, Object-Oriented Hypermedia Design..

  Declare another television object called portable

Add to the comment header as indicated at the top of the program.

  Develops algorithms for problem solving

The graduate designs and develops algorithms for problem solving and implements those algorithms using appropriate program code.

  Write an application with three labeled text field

Write an application with three labeled text fields,one each for the initial amount of a savings account, the annual interest rate, and the number of years. Add a button "Calculate" and a read-only text area to display the balance of the savings acco..

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