LDA showed probability problems in calculating probability of labels

1 view (last 30 days)
data = importdata('LDA data.mat')
features=data(:,1:end-1); %split data without labels
lable=data(:,end); %get the labels
W=LDA(features,lable); %perform LDA on data
L = [ones(170884,1) features] * W';
P = exp(L) ./ repmat(sum(exp(L),1),[170884 1]);
handles.features = features;
guidata(hObject, handles);
Problem: Assuming I have seven data sets in columns to compare and a last column being label. I perform a simple LDA on it. Thing is, P gave me all the example, 0.0000079.... when its supposed to be 0.021. When all the rows add up, they equal to 1 so that probability of labels can be caluclated. Need help please!!!

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!