Question
In MATLAB, I need to generate a confusion matrix for the test partition using Bayesian classifier. Can you help me with this and make sure
In MATLAB, I need to generate a confusion matrix for the test partition using Bayesian classifier. Can you help me with this and make sure I have done everything previously correctly?
I had loaded 'fisheries' which comes standard in Matlab.
Then I partition the data set. 60% training and 40% test
using the first two classes
species (1:100)
meas (1:100,;)
-----------------------------------
load ('fisheriris');
%Partition dataset into 60% training partition and 40% test partition
trainingPartition = (1:60);
testPartition = (61:100);
%Use only the first 100 entries (the first 2 classes)
speciesSet = species(1:100, :);
measSet = meas(1:100, :);
Workspace Name A Value 150x4 double 150x4 double 100x4 double 150x1 cell 100x1 cell 1x40 double 1x60 double ans meas th measSubset species species Subset test training Workspace Name A Value 150x4 double 150x4 double 100x4 double 150x1 cell 100x1 cell 1x40 double 1x60 double ans meas th measSubset species species Subset test training
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