Question
In this exercise you are required to use scikit-learn to compare different machine learning algorithms applied on the iris dataset. Load the iris dataset https://www.dropbox.com/s/f9oypx9o7pbdcu5/iris.csv?dl=0
In this exercise you are required to use scikit-learn to compare different machine learning algorithms applied on the iris dataset.
Load the iris dataset https://www.dropbox.com/s/f9oypx9o7pbdcu5/iris.csv?dl=0 and split the data into training and test data with a test size of 0.4.
a) Implement a Multi-Layer Perceptron classifier with one hidden layer containing 50 neurons. Train it on the training data and test it on the test data. Provide a screenshot showing the obtained score. b) Implement a Decision Tree classifier. Train it on the training data and test it on the test data. Provide a screenshot showing the obtained score. c) Implement a 5-NN (5-Nearest Neighbors) classifier. Train it on the training data and test it on the test data. Provide a screenshot showing the obtained score. d) Given the results obtained and the number of dimensions of the feature vector, is the K-NN classifier suitable? e) How many parameters does the neural network model contain? f) Given two machine learning models A and B producing the same accuracy on the same problem, but A has much more parameters (degrees of freedom) than B. The training data is limited. Which one do you prefer?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started