Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Nearest Neighbors We use a subset of the Iris Plants Database dataset ( provided by WEKA, contained in the iris.arff file ) . Each plant
Nearest Neighbors
We use a subset of the "Iris Plants Database" dataset provided by WEKA, contained in the "iris.arff" file
Each plant record ie example is represented by the attributes.
SepalLength: the sepal length in cm
SepalWidth: the sepal width in cm
PetalLength: the petal length in cm
PetalWidth: the petal width in cm
Class: the classification attribute, with the possible values Irissetosa, Irisversicolor, Irisvirginica
We want to predict the class for each of the following plants:
Plant #SepalLength; SepalWidth; PetalLength; PetalWidth
Plant #SepalLength; SepalWidth; PetalLength; PetalWidth
Plant #SepalLength; SepalWidth; PetalLength; PetalWidth
Part Manual Computation
Apply the Nearest Neighbor learning algorithm to classify the three tobepredicted plants ie Plants # to determine what kind of plant it is
Try the three different values for the neighborhood size; ie k; ; and Use one of the geometry distance functions eg Manhattan or Euclidean distance function
For k convert the data of the set of Plants #together with their predicted class into the ARFF format, and save it in the "plantstestarff" file.
For k convert the data of the set of Plants #together with their predicted class into the ARFF format, and save it in the "plantstestarff" file.
For k convert the data of the set of Plants #together with their predicted class into the ARFF format, and save it in the "plantstestarff" file.
Part Analysis with WEKA
Convert the dataset containing examples ie Plants # into the ARFF format supported by WEKA and save it in the "plantstrain.arff" file.
Launch the WEKA tool, and then activate the "Explorer" environment.
Open the "plantstrain" dataset ie saved in the "plantstrain.arff" file For each attribute and for each of its possible values, how many instances in each class have the feature value ie the class distribution of the feature values
Go to the "Classify" tab. Select the IBk classifier. In the "Test options" panel select the "Supplied test set" option. Activate the nearby "Set..." button and locate the "plantstestarff" file. Run the classifier and observe the results shown in the "Classifier output" window.
How many instances used for the training? How many for the test?
How many instances are incorrectly classified?
What is the MAE mean absolute error made by the learned classifier?
What can you infer from the information shown in the Confusion Matrix?
Visualize the errors made by the learned classifier. In the plot, how can you differentiate between the correctly and incorrectly classified instances? In the plot, how can you see the detailed information of an incorrectly classified instance?
How can you save the learned classifier to a file?
Now, click on the "IBk K W label ie close to the "Choose" button Set KNN equal to ie to use the neighborhood size of and then click the OK button to save the new setting. Activate the nearby "Set..." button and locate the "plantstestarff" file. Run the classifier and observe the results shown in the "Classifier output" window.
How many instances are incorrectly classified?
What is the MAE mean absolute error made by the learned classifier?
What can you infer from the information shown in the Confusion Matrix?
Visualize the errors made by the learned classifier. In the plot, how can you differentiate between the correctly and incorrectly classified instances? In the plot, how can you see the detailed information of an incorrectly classified instance?
Now, click on the "IBk K W label ie close to the "Choose" button Set KNN equal to ie to use the neighborhood size of and then click the OK button to save the new setting. Activate the nearby "Set..." button and locate the "plantstestarff" file. Run the classifier and observe the results shown in the "Classifier output" window.
How many instances are incorrectly classified?
What is the MAE mean absolute error made by the learned classifier?
What can you infer from the information shown in the Confusion Matrix?
Visualize the errors made by the learned classifier. In the plot, how can you differentiate between the correctly and incorrectly classified instances? In the plot, how can you see the detailed information of an incorrectly classified instance?
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