how classify gaussien distribution ?
조회 수: 1 (최근 30일)
이전 댓글 표시
hi every one i do binary classification , i have 40 segments and 11 features , each feature represent a gaussien distribution(100 samples) how can SVM classify this data.
thanks in advance
댓글 수: 0
답변 (1개)
Shantanu Dixit
2025년 1월 24일
Hi sweet,
You can train an SVM classifier to classify your data using the 'fitcsvm' function in MATLAB. You can organize your features 'X' as a matrix where each row corresponds to observation, and each column represents a feature. Similarly prepare labels 'Y' as a vector where each element corresponds to the class label for the respective row in 'X'. Use 'fitcsvm' function to train the SVM. For the gaussian distributed features, you may want to use an RBF kernel as follows
% X and Y as matrix of predictor data and array of class labels respectively
SVMModel = fitcsvm(X, Y, 'KernelFunction', 'rbf', 'Standardize', true, 'ClassNames', [-1, 1]);
Once the classifier is trained you can use it to classify new data as follows:
[label,score] = predict(SVMModel,newX);
Additionally you can refer to useful MathWorks documentation on Training SVM classifiers:
svm for binary classification: https://www.mathworks.com/help/stats/support-vector-machines-for-binary-classification.html#bsr5o09
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!