[Solved] EECS658 Assignment 1

$25

File Name: EECS658_Assignment_1.zip
File Size: 188.4 KB

SKU: [Solved] EECS658 Assignment 1 Category: Tag:
5/5 - (1 vote)

Deliverables:

  1. Copy of Rubric1.docx with your name and ID filled out (do not submit a PDF)
  2. Python source code for CheckVersions
  3. Screen print showing the successful execution of CheckVersions
  4. Python source code for NBClassifier
  5. Screen print showing the successful execution of NBClassifier 6. Answers to the following questions:
    1. How many samples in NBClassifer were in the training set?
    2. How many samples in NBClassifer were in the test set?
    3. Using the confusion matrix, manually calculate the Accuracy value. Does it match the value calculated by your program? If not, why? (Manually includes using a spreadsheet).
    4. Using the confusion matrix, manually calculate the Precision values for each iris variety. Do they match the values calculated by your program? If not, why?
    5. Using the confusion matrix, manually calculate the Recall values for each iris variety. Do they match the values calculated by your program? If not, why?
    6. Using the confusion matrix, manually calculate the F1 values for each iris variety. Do they match the values calculated by your program? If not, why?

Assignment:

  • Install Python on your system if it is not already.
    • See Python for Windows Primer on BlackBoard (under Assignment 1) for help on Windows
    • For help on Linux, see:
    • Install the following Python libraries.
      • scipy o numpy o pandas o sklearn
    • The scipy installation page provides excellent instructions for installing the above libraries on multiple different platforms, such as Linux, mac OS X and Windows. If you have any doubts or questions, refer to this guide, it has been followed by thousands of people.
    • To verify you have installed Python and the SciPy libraries write a Python program called CheckVersions that 1) prints out the versions of Python, scipy, numpy, pandas, and sklearn and 2) prints out Hello World! o Hint: use this code for part 1): # Python version import sys print(Python: {}.format(sys.version))

# scipy import scipy

print(scipy: {}.format(scipy.__version__))

# numpy import numpy print(numpy: {}.format(numpy.__version__))

# pandas import pandas

print(pandas: {}.format(pandas.__version__))

# scikit-learn import sklearn

print(sklearn: {}.format(sklearn.__version__))

  • Write a Python program called NBClassifier that does the following:
    • Loads the iris data set (located in iris.csv file in the BlackBoard

Assignment 1 folder) o Creates a training set with half of the 150 samples and a test set with the rest.

  • Classifies the iris data set using the Python built-in Nave Bayesian classifier, GaussianNB.
  • Prints out the overall accuracy of the classifier.
  • Prints out the confusion matrix. o Prints out the P, R, and F1 score for each of the 3 varieties of iris. o You may (and probably should) use the Python built-in programs.

Remember:

  • Your Programming Assignments are individual-effort.
  • You can brainstorm with other students and help them work through problems in their programs, but everyone should have their own unique assignment programs.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] EECS658 Assignment 1[Solved] EECS658 Assignment 1
$25