How do the options work for the 'fitcdiscr' function using Statistics and Machine Learning Toolbox in MATLAB R2023b?

I am using "fitcdiscr" function from the Statistics and Machine Learning Toolbox and I have the following questions on how to use the options for the "fitcdiscr" function
1) How do I obtain weights for the trained model to calculate the projected space ?
2) Is there any way to hide the training output in command terminal?
3) Does providing 'OptimizeHyperparameters', 'auto' name-value pair to train the model on the hyperparameters update gamma and delta iteratively or do we need to train the model with the obtained hyperparameters once more to obtain valid results ?
4) Does training model followed with 'cvshrink' regularization and training model with inbuilt optimization yield same results ? Is either of them computationally intensive than the other?

 채택된 답변

1) How do I obtain weights for the trained model to calculate the projected space ?
'Coeffs' property is suitable for the workflow to obtain weights. The values in the 'Coeffs' property are used to define the boundary between classes. You can find more information about 'Coeffs' in the link below:
2) Is there any way to hide the training output in command terminal?
you can use the 'Hyperparameteroptimizationoptions' and set 'Verbose' to 0.
For e.g.
>> load fisheriris
>> opts = struct('Verbose', 0);
>> mdl = fitcdiscr(meas,species,'OptimizeHyperparameters','auto', 'HyperparameterOptimizationOptions',opts)
3) Does providing 'OptimizeHyperparameters','auto' train the model on the hyperparameters gamma and delta iteratively or do we need to train the model with the obtained hyperparameters once more to obtain valid results?
When a model is trained with hyperparameter optimization, several combinations of the hyperparameters are tried out, and when the best combination is found, a model trained with the best combination of parameters is returned. you don't have to retrain a model with the found parameter values. 
4) Does training model and regularizing with 'cvshrink', training model with "fitcdiscr" with inbuilt optimization yield same results. is either of them computationally intensive than the other?
'cvshrink' and hyperparameter optimization use different methods to try out values of delta and gamma, so by default they are not going to yield the same results.

추가 답변 (0개)

카테고리

제품

릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by