본문 바로가기
AZ ml

다중-클래스 분류 해석방법 (7)

by EasyGPT 2016. 1. 13.
반응형

Multi-class classification  다중클래스 분류

Example experiment  예제 실험


In this experiment we will perform a letter recognition task as an example of multi-class classification.
실험에서는 다중 클래스 분류의 예로 문자인식 작업을 수행합니다.

The classifier will attempt to predict a certain letter (class), given some hand-written attribute values extracted from the hand-written images.  
필기이미지에서 추출된 필기 특성값이 있다는 전제 하에 분류기(classififier) 특정 문자(클래스) 예측합니다.

In the training data, there are sixteen features extracted from hand-written letter images.  
훈련데이터에 필기문자 이미지에서 추출된 16개의 특성이 있습니다.

The twenty-six letters form our twenty-six classes. 26개의 문자가 26개의 클래스를 구성합니다.

An experiment has been set up to train a multi-class classification model for letter recognition and predict on the same feature set on a test dataset, as shown in Figure 6. 
그림6 표시된 대로 문자인식을 위해 다중클래스 분류모델을 설정하고 테스트 데이터집합에 설정된 동일한 특성에 대한 예측을 수행하도록 실험이 설정되었습니다.

screenshot_of_experiment

screenshot_of_experiment

Figure 6 Experiment of Letter Recognition Multi-Class Classification Problem  
그림6 문자인식 다중클래스 분류문제 실험


Visualizing the results from Score Model module by right/left clicking on the output port of Score Model module and then clicking Visualize, you should see a window as in Figure 7.  
모델채점 모듈의 출력부분을 마우스 오른쪽 단추로 클릭/왼쪽 단추로 클릭한 다음 시각화 클릭하여 모델채점 결과를 시각화하면 그림7 같이 창이 표시되어야 합니다.

screenshot_of_experiment

Figure 7 Visualize Score Model Result in Multi-Class Classification  
그림7 다중클래스 분류에서 모델채점 결과 시각화


Result interpretation  결과 해석


The left sixteen columns represent the feature values of the test set.
왼쪽에 있는 16개의 열이 테스트 집합의 특성 값을 나타냅니다.

The columns with names Scored Probabilities for Class "XX" are just like the Scored Probabilities column in the two-class case.
클래스 “XX” 채점된 이란 이름의 열은 2-클래스 경우의 채점된 확률 열과 같습니다.

They show the probability that the corresponding entry falls into a certain class.  
 채점된 은 해당 항목이 특정 클래스에 속할 확률을 보여줍니다.

For example, for the first entry, there is 0.003571 probability that it is an “A”, 0.000451 probability that it is a “B”, so on and so forth.  
예를 들어, 첫째 항목에서 “A”일 확률은 0.003571이고, “B”인일 확률은 0.000451 입니다.

The last column Scored Labels is the same as Scored Labels in the two-class case.  
마지막 열인 채점된 레이블 2-클래스의 채점된 레이블과 같습니다.

It selects the class with the largest scored probability as the predicted class of the corresponding entry.  
점수가 매겨진 확률이 가장 높은 클래스를 해당 항목의 예측 클래스로 선택합니다.

For example, for the first entry, the scored label is “F” since it has the largest probability to be an “F” (0.916995).  
예를 들어, 첫째 항목에서 가장 확률은 “F”(0.916995)이므로 점수가 매겨진 레이블은 “F” 입니다.


Web service publication  웹서비스 게시


This time, instead of using Project Columns to select some columns as the output of our web service, we would like to get the scored label for each entry and the probability of the scored label.  
이때, 프로젝트 사용하여 웹서비스의 출력이 열을 선택하지 않고, 항목의 채점된 레이블 채점된 레이블의 확률 가져오려고 합니다.

The basic logic is to find the largest probability among all the scored probabilities.  
기본 논리는 점수가 채점된 확률 중에서 가장 확률을 찾는 것입니다.

To do this, we need to use Execute R Script module. 
그러려면 R스크립트실행 모듈을 사용해야 합니다.

The R code is shown in Figure 8 and the experiment is as Figure 9. 
R
코드는 그림8 표시되고 실험은 그림9 같습니다.

screenshot_of_experiment

Figure 8 R code for extracting Scored Labels and the associated probabilities of the labels  
그림8 채점된 레이블 레이블의 연관된 확률을 추출하는 R코드


screenshot_of_experiment

Figure 9 Final Scoring Experiment of Letter Recognition Multiclass Classification Problem  
그림9 문자인식 다중클래스 분류 문제의 마지막 채점 실험


After publishing and running the web service, and entering some input feature values, the returned result looks like
Figure 10.
웹서비스를 게시하고 실행한 다음 입력 특성 값을 입력하면 그림10 같은 결과가 반환됩니다.

This hand-written letter, with its extracted sixteen features, is predicted to be a “T” with 0.9715 probability.  
추출된 16개의 특성을 가진 필기문자는 확률이 0.9715 “T” 예측됩니다.

screenshot_of_experiment

 

screenshot_of_experiment

Figure 10 Web Service Result of Iris Two-Class Classification 
그림10 붓꽃 2-클래스 분류의 웹서비스 결과

반응형

댓글