Hi Fabrizo,
The error message you're seeing indicates that fitPosterior is being called with an input argument of type 'cell', which is not supported. fitPosterior is a MATLAB function that adjusts the posterior probabilities of a binary classifier trained using fitcsvm. It is not directly applicable to multiclass SVMs or cell arrays.
If you have a multiclass SVM model, you need to ensure that you're working with an SVM model object, not a cell array.
To convert a multiclass SVM model into individual binary SVM model objects, you would typically need to train binary classifiers separately for each class pair. However, this is not practical or necessary for most applications because fitcecoc handles the multiclass problem internally.
If you're trying to adjust posterior probabilities for a multiclass SVM model created with fitcecoc, you can't directly use fitPosterior because it's designed for binary classification. Instead, you can use the predict function, which provides the scores or posterior probabilities as part of its output.
Hope it Helps!