我有两个带标签的课程 我想用matlab中的高斯混合模型进行分类 但我不知道如何计算两个班级的测试数据的概率
clear all
clc
train_class0_data = load('train-class0.data');
train_class0_label = load('train-class0.label');
train_class1_data = load('train-class1.data');
train_class1_label = load('train-class1.label');
test_data = load('test.data');
test_label = load('test.label');
GMMObject_Class0 = gmdistribution.fit(train_class0_data,2,'Regularize',0.001,'SharedCov', true,'CovType','diagonal' );
Probability_Class0 = posterior(GMMObject_Class0, test_data);
GMMObject_Class1 = gmdistribution.fit(train_class1_data,2,'Regularize',0.001,'SharedCov', true,'CovType','diagonal' );
Probability_Class1 = posterior(GMMObject_Class1, test_data);
请指导我如何计算概率?