필터 지우기
필터 지우기

How can I improve the accuracy of the prediction method?

조회 수: 11 (최근 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 CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by