フィルターのクリア

How can I improve the accuracy of the prediction method?

4 ビュー (過去 30 日間)
Atefeh
Atefeh 2024 年 1 月 9 日
コメント済み: Atefeh 2024 年 1 月 11 日
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 Center および File ExchangeCode Generation についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by