'Difference between "fitcecoc(<chosen model template>)" and individidual multiclass model classifier ("fitcnb, fitcknn, fitcdiscr, fitctree")

I am wondering which is difference of fitting a multiclass classifier through fitcecoc or the individual model commands as shown above in the subject line.

For example, is there a difference in the following commands?


mdl = fitcdiscr(X,Y,"OptimizeHyperparameters","all");
 
% or

tdiscr = templateDiscriminant;
mdl = fitcecoc(X,Y,'Learners',tdiscr ,"OptimizeHyperparameters","all");


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source