How to improve machine learning classification testing result?

1 次查看(过去 30 天)
I want to do machine learning classification of data with inputs (1000x720) and targets (2x720),
I've tried using the neural networks functions with the following parameters:
net.divideParam.trainRatio = 0.65; % ratio of data used for the training
net.divideParam.valRatio = 0.0;
net.divideParam.testRatio = 0.35; % ratio of data used for the testing
But, the testing result was only around 54%.
I've tried changing the training and testing ratio, increasing the training epochs and changing the hiddenLayerSize value:
hiddenLayerSize = 20;
net.trainParam.epochs = 5000;
But no significant improvement can be seen.
What can I do to improve the testing result? (to at least >70%)
Thank you in advance.
  2 个评论
the cyclist
the cyclist 2022-5-19
It's not really possible to help without seeing the data or your code.
Also, how do you know that the inputs predict the target? Predictibility isn't guaranteed. Just hoping for more accuracy doesn't mean it can be achieved.
Sandy Winardi
Sandy Winardi 2022-5-19
Sorry for the confusion, I'm fairly new to this topic.
The "targets" is the known outputs of the inputs.
The inputs data consists of 720 observations and 1000 features.
The classification has 2 classes (0 or 1).
I've attached the inputs and outputs if it's still not clear.

请先登录,再进行评论。

回答(1 个)

Gagan Agarwal
Gagan Agarwal 2023-10-4
Hi Sandy Winardi,
I understand that you are trying to classify data with 720 observations and 1000 features. To improve the testing result accuracy of your machine learning model, you can try the following approaches:
  1. Feature Selection/Dimensionality Reduction: It is very unlikely that all 1000 features are relevant for classification. You can use techniques like Principal Component Analysis (PCA) to identify the most informative features.
  2. Data Preprocessing: Normalize the input features to have zero mean and unit variance. This will help the model converge faster and improve performance.
  3. Hyperparameter Tuning: Experiment with different hyper parameters like learning rate, number of layers, and number of nodes in each layer.
  4. Cross-Validation: Instead of relying solely on a fixed train-test split, consider using cross-validation techniques such as k-fold cross-validation etc.
For more information about the various parameters that can be adjusted in the “network” function, please refer to the following documentation: -
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by