Main Content

모델 개발과 평가

특징 선택, 특징 엔지니어링, 모델 선택, 하이퍼파라미터 최적화, 교차 검증, 예측 성능 평가 및 분류 정확도 비교 테스트

고품질 예측 분류 모델을 개발하는 경우 적합한 특징(또는 예측 변수)을 선택하고 하이퍼파라미터(추정되지 않은 모델 모수)를 조율해야 합니다.

특징 선택과 하이퍼파라미터 조율을 통해 여러 모델이 생성될 수 있습니다. 모델 간 k겹 오분류율, ROC(수신자 조작 특성) 곡선 또는 혼동 행렬을 비교할 수 있습니다. 또는, 통계 검정을 수행하여 어떠한 분류 모델이 다른 모델보다 성능이 훨씬 더 뛰어난지 여부를 파악할 수 있습니다.

분류 모델을 훈련시키기 전에 새로운 특징을 가공 및 처리하려면 gencfeatures를 사용하십시오.

분류 모델을 대화형 방식으로 만들고 평가하려면 분류 학습기 앱을 사용하십시오.

조정된 하이퍼파라미터를 가진 모델을 자동으로 선택하려면 fitcauto를 사용하십시오. 이 함수는 다양한 하이퍼파라미터 값으로 분류 모델 유형을 선택해 보고 새 데이터에서 잘 수행될 것으로 예상되는 최종 모델을 반환합니다. 어떤 분류기 유형이 데이터에 가장 적합한지 확신하지 못할 경우 fitcauto를 사용하십시오.

특정 모델의 하이퍼파라미터를 조율하려면 하이퍼파라미터 값을 선택하고 이들 값을 사용하여 모델을 교차 검증하십시오. 예를 들어, SVM 모델을 조정하려면 상자 제약 조건과 커널 스케일의 집합을 선택하고, 값의 쌍 각각에 대해 모델을 교차 검증하십시오. Statistics and Machine Learning Toolbox™에서 제공되는 특정 분류 함수는 베이즈 최적화, 그리드 탐색 또는 임의 탐색을 통해 자동 하이퍼파라미터 조율 기능을 제공합니다. 베이즈 최적화를 구현하는 메인 함수 bayesopt는 여러 다른 응용 사례에 사용할 수 있을 정도로 유연합니다. Bayesian Optimization Workflow 항목을 참조하십시오.

분류 모델을 해석하려면 lime, shapley 또는 plotPartialDependence를 사용할 수 있습니다.

분류 학습기머신러닝 지도 학습을 사용하여 데이터를 분류하도록 모델 훈련시키기

함수

모두 확장

fscchi2Univariate feature ranking for classification using chi-square tests (R2020a 이후)
fscmrmrRank features for classification using minimum redundancy maximum relevance (MRMR) algorithm (R2019b 이후)
fscncaFeature selection using neighborhood component analysis for classification
oobPermutedPredictorImportanceOut-of-bag predictor importance estimates for random forest of classification trees by permutation
permutationImportancePredictor importance by permutation (R2024a 이후)
predictorImportanceEstimates of predictor importance for classification tree
predictorImportanceEstimates of predictor importance for classification ensemble of decision trees
relieffRank importance of predictors using ReliefF or RReliefF algorithm
selectFeaturesSelect important features for NCA classification or regression (R2023b 이후)
sequentialfsSequential feature selection using custom criterion
gencfeaturesPerform automated feature engineering for classification (R2021a 이후)
describeDescribe generated features (R2021a 이후)
transformTransform new data using generated features (R2021a 이후)
fitcautoAutomatically select classification model with optimized hyperparameters (R2020a 이후)
bayesoptSelect optimal machine learning hyperparameters using Bayesian optimization
hyperparametersVariable descriptions for optimizing a fit function
optimizableVariableVariable description for bayesopt or other optimizers
crossvalEstimate loss using cross-validation
cvpartition교차 검증을 위한 데이터 분할
repartitionRepartition data for cross-validation
test교차 검증을 위한 검정 인덱스
training교차 검증을 위한 훈련 인덱스

LIME(Local Interpretable Model-Agnostic Explanations)

limeLocal interpretable model-agnostic explanations (LIME) (R2020b 이후)
fitFit simple model of local interpretable model-agnostic explanations (LIME) (R2020b 이후)
plotPlot results of local interpretable model-agnostic explanations (LIME) (R2020b 이후)

섀플리 값

shapleyShapley values (R2021a 이후)
fitCompute Shapley values for query points (R2021a 이후)
plotPlot Shapley values using bar graphs (R2021a 이후)
boxchartVisualize Shapley values using box charts (box plots) (R2024a 이후)
swarmchartVisualize Shapley values using swarm scatter charts (R2024a 이후)

부분 종속성

partialDependenceCompute partial dependence (R2020b 이후)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots

혼동행렬

confusionchartCreate confusion matrix chart for classification problem
confusionmat분류 문제에 대한 혼동행렬 계산

ROC(수신자 조작 특성) 곡선

rocmetricsReceiver operating characteristic (ROC) curve and performance metrics for binary and multiclass classifiers (R2022a 이후)
addMetricsCompute additional classification performance metrics (R2022a 이후)
averageCompute performance metrics for average receiver operating characteristic (ROC) curve in multiclass problem (R2022a 이후)
plotPlot receiver operating characteristic (ROC) curves and other performance curves (R2022a 이후)
perfcurve분류기 출력값에 대한 ROC(수신자 조작 특성) 곡선 또는 기타 성능 곡선
testcholdoutCompare predictive accuracies of two classification models
testckfoldCompare accuracies of two classification models by repeated cross-validation

객체

모두 확장

FeatureSelectionNCAClassificationFeature selection for classification using neighborhood component analysis (NCA)
FeatureTransformerGenerated feature transformations (R2021a 이후)
BayesianOptimizationBayesian optimization results

속성

ConfusionMatrixChart PropertiesConfusion matrix chart appearance and behavior
ROCCurve PropertiesReceiver operating characteristic (ROC) curve appearance and behavior (R2022a 이후)

도움말 항목

분류 학습기 앱

특징 선택

특징 엔지니어링

자동 모델 선택

하이퍼파라미터 최적화

모델 해석

교차 검증

분류 성능 평가