How can I improve the accuracy of the prediction method?

5 次查看(过去 30 天)
Hello dear friends
I am writing a code to classify some feature matrices, all features are located in the feature.zip file, the sample feature is new_feature_vectorand I use the classification.m code to predict that the new_feature_vector matches with which matrix in feature.zip
But the written code gives me the wrong answer.
Can you advise?

回答(1 个)

Ayush Anand
Ayush Anand 2024-1-9
Hi Atefeh,
Machine learning models usually require iteratively tuning and reinitialising parameters, along with preprocessing the dataset and trying out different models to improve the accuracy. Here are a few steps you could try for the same:
  1. Data Preprocessing: Ensure that the `all_feature_vectors` and `all_labels` are properly preprocessed, handling NaN values, scaling the data and any other modifications if required.
  2. Model Complexity: The default settings for "fitcecoc" might not be suitable for your data. Parameters such as the kernel function and regularization might need to be tuned to your specific dataset for optimal performance.
  3. Overfitting: If the training data is not diverse enough, or if the model is too complex, the SVM might overfit to the training data, resulting in poor generalization to new data. You can use cross-validation or regularization to try and avoid this.
  4. Label Encoding: Ensure that the labels ("all_labels") are correctly encoded. If there's any inconsistency in label encoding between training and prediction, it could lead to incorrect predictions.
  5. Class Imbalance: If the dataset is imbalanced and biased more towards one of the classes, the model might be similarly biased towards the majority class. This can be addressed by using class weights or resampling techniques.
I hope this helps!
  1 个评论
Atefeh
Atefeh 2024-1-11
thank you for your feedback but would you mind proposing me a model that can be replaced by SVM ?
I have 35 pictures with 1500dpi resolution as my training set

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by