Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

모델 개발과 평가

특징 선택, 특징 엔지니어링, 모델 선택, 하이퍼파라미터 최적화, 교차 검증, 잔차 진단 및 플롯

고품질 회귀 모델을 개발하는 경우 적합한 특징(또는 예측 변수)을 선택하고, 하이퍼파라미터(데이터에 피팅되지 않는 모델 모수)를 조율하고, 잔차 진단을 통해 모델 가정을 평가해야 합니다.

하이퍼파라미터의 값을 선택하고 선택한 값을 사용하여 모델에 대한 교차 검증을 반복하는 방식으로 하이퍼파라미터를 조율할 수 있습니다. 이 과정을 통해 여러 개의 모델이 생성되며, 이러한 모델 중에서 가장 적합한 모델이 추정된 일반화 오차를 최소화하는 모델일 수 있습니다. 예를 들어, SVM 모델을 조정하려면 상자 제약 조건과 커널 스케일의 집합을 선택하고, 값의 쌍 각각에 대해 모델을 교차 검증한 후 10겹 교차 검증된 평균 제곱 오차 추정값과 비교하십시오.

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

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

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

Statistics and Machine Learning Toolbox™에서 제공되는 특정 비모수적 회귀 함수는 베이즈 최적화, 그리드 탐색 또는 임의 탐색을 통해 자동 하이퍼파라미터 조율 기능을 제공합니다. 베이즈 최적화를 구현하는 메인 함수 bayesopt는 여러 다른 응용 사례에 사용할 수 있을 정도로 유연합니다. 자세한 내용은 Bayesian Optimization Workflow 항목을 참조하십시오.

회귀 모델을 해석하려면 lime, shapley, plotPartialDependence를 사용할 수 있습니다.

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

함수

모두 확장

fsrftestUnivariate feature ranking for regression using F-tests (R2020a 이후)
fsrmrmrRank features for regression using minimum redundancy maximum relevance (MRMR) algorithm (R2022a 이후)
fsrncaFeature selection using neighborhood component analysis for regression
oobPermutedPredictorImportanceOut-of-bag predictor importance estimates for random forest of regression trees by permutation
partialDependenceCompute partial dependence (R2020b 이후)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
predictorImportanceEstimates of predictor importance for regression tree
predictorImportanceEstimates of predictor importance for regression 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
stepwiselmPerform stepwise regression
stepwiseglmCreate generalized linear regression model by stepwise regression
genrfeaturesPerform automated feature engineering for regression (R2021b 이후)
describeDescribe generated features (R2021a 이후)
transformTransform new data using generated features (R2021a 이후)
fitrautoAutomatically select regression model with optimized hyperparameters (R2020b 이후)
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교차 검증을 위한 훈련 인덱스

시계열 데이터의 경우

tspartitionPartition time series data for cross-validation (R2022b 이후)
testTest indices for time series cross-validation (R2022b 이후)
trainingTraining indices for time series cross-validation (R2022b 이후)

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 이후)

부분 종속성

partialDependenceCompute partial dependence (R2020b 이후)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
coefCIConfidence intervals of coefficient estimates of linear regression model
coefTestLinear hypothesis test on linear regression model coefficients
dwtestDurbin-Watson test with linear regression model object
plotScatter plot or added variable plot of linear regression model
plotAddedAdded variable plot of linear regression model
plotAdjustedResponseAdjusted response plot of linear regression model
plotDiagnosticsPlot observation diagnostics of linear regression model
plotEffectsPlot main effects of predictors in linear regression model
plotInteractionPlot interaction effects of two predictors in linear regression model
plotResidualsPlot residuals of linear regression model
plotSlicePlot of slices through fitted linear regression surface
coefCIConfidence intervals of coefficient estimates of generalized linear regression model
coefTestLinear hypothesis test on generalized linear regression model coefficients
devianceTestAnalysis of deviance for generalized linear regression model
plotDiagnosticsPlot observation diagnostics of generalized linear regression model
plotResidualsPlot residuals of generalized linear regression model
plotSlicePlot of slices through fitted generalized linear regression surface
coefCIConfidence intervals of coefficient estimates of nonlinear regression model
coefTestLinear hypothesis test on nonlinear regression model coefficients
plotDiagnosticsPlot diagnostics of nonlinear regression model
plotSlicePlot of slices through fitted nonlinear regression surface
linhyptestLinear hypothesis test

객체

모두 확장

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

도움말 항목

회귀 학습기 앱 워크플로

특징 선택

특징 엔지니어링

  • Automated Feature Engineering for Regression
    Use genrfeatures to engineer new features before training a regression model. Before making predictions on new data, apply the same feature transformations to the new data set.

자동 모델 선택

하이퍼파라미터 최적화

모델 해석

교차 검증

선형 모델 진단

  • 선형 회귀 결과 해석하기
    선형 회귀 결과 출력되는 통계량을 표시하고 해석합니다.
  • 선형 회귀
    선형 회귀 모델을 피팅하고 결과를 검토합니다.
  • Linear Regression with Interaction Effects
    Construct and analyze a linear regression model with interaction effects and interpret the results.
  • Summary of Output and Diagnostic Statistics
    Evaluate a fitted model by using model properties and object functions.
  • F-통계량과 t-통계량
    선형 회귀에서 F-통계량은 모델 또는 모델 성분의 유의성을 검정하는 분산분석(ANOVA) 방식에 대한 검정 통계량입니다. t-통계량은 회귀 계수에 대한 추론을 할 때 유용합니다.
  • 결정계수(R 제곱)
    결정계수(R 제곱)는 선형 회귀 모델에서 독립 변수 X로 설명되는 응답 변수 y의 비례적인 변동량을 나타냅니다.
  • 계수 표준 오차 및 신뢰구간
    추정된 계수 분산 및 공분산은 회귀 계수 추정값의 정밀도를 캡처합니다.
  • Residuals
    Residuals are useful for detecting outlying y values and checking the linear regression assumptions with respect to the error term in the regression model.
  • Durbin-Watson Test
    The Durbin-Watson test assesses whether or not there is autocorrelation among the residuals of time series data.
  • Cook’s Distance
    Cook's distance is useful for identifying outliers in the X values (observations for predictor variables).
  • Hat Matrix and Leverage
    The hat matrix provides a measure of leverage.
  • Delete-1 Statistics
    Delete-1 change in covariance (CovRatio) identifies the observations that are influential in the regression fit.

일반화 선형 모델 진단

  • Generalized Linear Models
    Generalized linear models use linear methods to describe a potentially nonlinear relationship between predictor terms and a response variable.

비선형 모델 진단

  • Nonlinear Regression
    Parametric nonlinear models represent the relationship between a continuous response variable and one or more continuous predictor variables.