Question: I would like to Implement a method in Matlab to estimate the coecients of a linear classification model using least squares, however I am not

I would like to Implement a method in Matlab to estimate the coecients of a linear classification model using least squares, however I am not sure which coefficients are correct, so far these 2 sets were outputted:
(0.8638,-0.3898,-0.3286) and (0.1362,0.3898,0.3286), are these correct? Do I have to include both or only one coefficient set is needed?
This is the code I've used:
% Part a
% Loading the dataset
data = load('Data.mat');
X = data.X; % Features
T = data.T; % Targets
% Calculating coefficients using the least squares classifier (defined at end of code)
w = leastSquaresClassifier(X, T);
% Display the calculated coefficients
fprintf('Estimated Coefficients (including intercept):
');
disp(w);
I would like to Implement a method in Matlab to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!