brunch

You can make anything
by writing

C.S.Lewis

by 라인하트 Nov 30. 2020

앤드류 응의 머신러닝(14-7): PCA 적용하기

   온라인 강의 플랫폼 코세라의 창립자인 앤드류 응 (Andrew Ng) 교수는 인공지능 업계의 거장입니다. 그가 스탠퍼드 대학에서 머신 러닝 입문자에게 한 강의를 그대로 코세라 온라인 강의 (Coursera.org)에서 무료로 배울 수 있습니다. 이 강의는 머신러닝 입문자들의 필수코스입니다. 인공지능과 머신러닝을 혼자 공부하면서 자연스럽게 만나게 되는 강의입니다. 


Dimensionality Reduction 

(차원 축소)


Applying PCA (PCA 적용)  


Advice for Applying PCA (PVA를 적용에 관한 충고)  


   In an earlier video, I had said that PCA can be sometimes used to speed up the running time of a learning algorithm. In this video, I'd like to explain how to actually do that, and also say some, just try to give some advice about how to apply PCA.


   지난 강의에서 PCA 차원 축소는 학습 알고리즘의 속도를 개선한다고 설명했습니다. 이번 강의에서 실제로 어떻게 가능한 지를 설명하고 PCA를 적용하는 법을 설명합니다.   



   Here's how you can use PCA to speed up a learning algorithm, and this supervised learning algorithm speedup is actually the most common use that I personally make of PCA. Let's say you have a supervised learning problem, note this is a supervised learning problem with inputs X and labels Y, and let's say that your examples xi are very high dimensional. So, lets say that your examples, xi are 10,000 dimensional feature vectors. One example of that, would be, if you were doing some computer vision problem, where you have a 100x100 images, and so if you have 100x100, that's 10000 pixels, and so if xi are, you know, feature vectors that contain your 10000 pixel intensity values, then you have 10000 dimensional feature vectors. So with very high-dimensional feature vectors like this, running a learning algorithm can be slow, right? Just, if you feed 10,000 dimensional feature vectors into logistic regression, or a neural network, or support vector machine or what have you, just because that's a lot of data, that's 10,000 numbers, it can make your learning algorithm run more slowly.


  여기 PCA 알고리즘으로 속도를 향상하는 방법이 있습니다. 많은 사람들이 지도 학습 알고리즘의 속도를 높이기 위해 PCA를 사용합니다. 여기 입력 x와 레이블 y가 있는 지도 학습 문제가 있습니다. 학습 예제 x^(i)는 매우 고차원이고 10,000차원의 피처 벡터입니다. 이 예가 100 X 100 픽셀의 이미지를 처리하는 컴퓨터 비전 문제라면 10,000 픽셀인 10,000 피처 벡터입니다.  학습 알고리즘이 매우 높은 차원의 피처 벡터를 실행할 때 느려질 수 있습니다. 10,000차원의 벡터를 로지스틱 회귀, 인공 신경망 또는 서포트 벡터 머신에서 구동할 때, 학습 데이터 셋이 많다면 학습 알고리즘은 더 느려집니다. 


       

   Fortunately with PCA we'll be able to reduce the dimension of this data and so make our algorithms run more efficiently. Here's how you do that. We are going first check our labeled training set and extract just the inputs, we're just going to extract the X's and temporarily put aside the Y's. So this will now give us an unlabelled training set x1 through xm which are maybe there's a ten thousand dimensional data, ten thousand dimensional examples we have. So just extract the input vectors x1 through xm. Then we're going to apply PCA and this will give me a reduced dimension representation of the data, so instead of 10,000 dimensional feature vectors I now have maybe one thousand dimensional feature vectors. So that's like a 10x savings. 


   다행히 PCA를 사용하여 데이터의 차원을 줄이면 학습 알고리즘의 성능을 향상할 수 있습니다. 여기 레이블이 있는 m개의 학습 셋 (x^(1), y^(1)), (x^(2), y^(2)),..., (x^(m), y^(m))이 있습니다. 여기서 레이블 y^(i)은 그대로 두고 입력 데이터 x^(i)만을 추출합니다. 입력 벡터  x^(1), x^(2),..., x^(m)까지 추출합니다. 레이블이 지정되지 않은 x^(1), x^(2),..., x^(m)까지의 학습 셋을 얻을 수 있고, 학습 셋은 R^(10,000) 차원입니다. 그런 다음 PCA를 적용하여 10,000차원의 피처 벡터를 1,000차원의 피처 벡터로 줄입니다. 새로운 학습 셋은 10 배의 절감 효과가 있습니다. 학습 셋 x^(1), x^(2),..., x^(m)을  PCA로 저차원으로 낮춘 학습 셋 z^(1), z^(2),..., z^(m)으로 표현합니다. 



   So this gives me, if you will, a new training set. So whereas previously I might have had an example x1, y1, my first training input, is now represented by z1. And so we'll have a new sort of training example, which is Z1 paired with y1. And similarly Z2, Y2, and so on, up to ZM, YM. Because my training examples are now represented with this much lower dimensional representation Z1, Z2, up to ZM. 


   이제 새로운 학습 셋이 만들어졌습니다. 원 데이터 셋의 첫 번째 예제는 (x^(1), y^(1))이었지만, 새로운 학습 셋의 첫 번째 예제는 (z^(1), y^(1))으로 표시합니다.  z^(1)은 y^(1)과 짝을 이룹니다. 마찬가지로 (z^(2), y^(2))으로, ( z^(m), y^(m))으로 표현합니다. 학습 예제는 z^(1), z^(2),..., z^(m)은 훨씬 더 낮은 차원의 데이터입니다. 



   Finally, I can take this reduced dimension training set and feed it to a learning algorithm maybe a neural network, maybe logistic regression, and I can learn the hypothesis H, that takes this input, these low-dimensional representations Z and tries to make predictions. So if I were using logistic regression for example, I would train a hypothesis that outputs, you know, one over one plus E to the negative-theta transpose Z, that takes this input to one these z vectors, and tries to make a prediction.


   마지막으로 차원이 축소된 학습 셋을 로지스틱 회귀나 인공 신경망과 같은 학습 알고리즘에 적용할 수 있습니다. 저차원의 데이터 z를 가지고 예측을 하는 가설 h(z)를 계산할 수 있습니다. 예를 들어, 로지스틱 회귀를 사용할 경우 가설 hθ(z) = 1 / ( 1 + e^(-θ^Tz))입니다. 입력 z 벡터를 가져와 예측을 시도하는 가설을 학습합니다. 


   And finally, if you have a new example, maybe a new test example X. What you do is you would take your test example x, map it through the same mapping that was found by PCA to get you your corresponding z. And that z then gets fed to this hypothesis, and this hypothesis then makes a prediction on your input x.


   마지막으로 새로운 테스트 셋 예제 x가 있을 수 있습니다. 테스트 예제 x를 가져와 PCA를 사용하여 z를 매핑합니다. 그리고, z를 가설 hθ(z)에 입력하여 예측합니다.  


   

   One final note, what PCA does is it defines a mapping from x to z and this mapping from x to z should be defined by running PCA only on the training sets. And in particular, this mapping that PCA is learning, right, this mapping, what that does is it computes the set of parameters. That's the feature scaling and mean normalization. And there's also computing this matrix Ureduce. But all of these things that Ureduce, that's like a parameter that is learned by PCA and we should be fitting our parameters only to our training sets and not to our cross validation or test sets and so these things the Ureduce so on, that should be obtained by running PCA only on your training set. And then having found Ureduce, or having found the parameters for feature scaling and the mean normalization and scaling the scale that you divide the features by to get them on to comparable scales. Having found all those parameters on the training set, you can then apply the same mapping to other examples that may be In your cross-validation sets or in your test sets, OK? Just to summarize, when you're running PCA, run your PCA only on the training set portion of the data not the cross-validation set or the test set portion of your data. 


   마지막으로 PCA는 x^(i)에서 z^(i)로의 매핑을 정의합니다. 그리고 이 매핑은 PCA를 학습 셋에 대하여 실행해야만 합니다. 이 매핑은 파라미터 셋을 계산합니다. 이 매핑은 피처 스케일링과 정규화를 수반합니다. 이 매핑은 Ureduce 행렬을 계산합니다. Ureduce는 PCA가 학습한 파라미터입니다. 파라미터를 교차 검증 셋이나 테스트 셋이 아닌 학습 셋에만 맞추어야 합니다. Ureduce는 학습 셋에서 PCA를 실행한 결과입니다. 그리고,  피처 스케일링과 정규화 파라미터를 찾고 피처를 비교 가능한 스케일로 나눕니다. 학습 셋에서 이런 모든 파라미터를 찾았다면, 교차 검증 셋과 테스트 셋에 있는 예제에 대해 동일한 매핑을 적용합니다. 요약하면, 교차 검증 셋이나 테스트 셋이 아닌 학습 셋에서만 PCA를 실행해야 합니다. 


   And that defines the mapping from x to z and you can then apply that mapping to your cross-validation set and your test set and by the way in this example I talked about reducing the data from ten thousand dimensional to one thousand dimensional, this is actually not that unrealistic. For many problems we actually reduce the dimensional data. You know by 5x maybe by 10x and still retain most of the variance and we can do this barely effecting the performance, in terms of classification accuracy, let's say, barely affecting the classification accuracy of the learning algorithm. And by working with lower dimensional data our learning algorithm can often run much much faster. 


   그리고, x^(i)에서 z^(i)로 매핑을 정의하고 교차 검증 셋과 테스트 셋에 적용할 수 있습니다. 이 예에서 10,000차원의 데이터를 1,000차원으로 줄이는 것을 다루었습니다. 이것은 현실 세계에서 차원 축소는 많이 하는 작업입니다. 5배로 또는 10배로 줄이지만, 대부분의 분산을 그대로 유지하고 있고 분류 정확도 측면에서 성능에 거의 영향을 미치지 않습니다. 예를 들어, 학습 알고리즘의 분류 정확도에 거의 영향을 미치지 않습니다. 그리고, 저 차원의 데이터로 작업을 하면 학습 알고리즘은 훨씬 더 빨리 동작합니다.   



   To summarize, we've so far talked about the following applications of PCA. First is the compression application where we might do so to reduce the memory or the disk space needed to store data and we just talked about how to use this to speed up a learning algorithm. In these applications, in order to choose K, often we'll do so according to, figuring out what is the percentage of variance retained, and so for this learning algorithm, speed up application often will retain 99% of the variance. That would be a very typical choice for how to choose k. So that's how you choose k for these compression applications.


   요약하면, 지금까지 PCA의 몇 가지 응용 사례에 대해 이야기했습니다. 첫 번째 응용 사례는 데이터를 저장하는 메모리와 하드 디스크 공간을 줄이고 학습 알고리즘의 속도를 높이기 위한 데이터 압축입니다. 데이터 압축 사례는 k를 선택하기 위해 몇 % 의 분산을 유지하는 지를 파악하였습니다. 속도를 높이기 위해 일반적으로 99%의 분산을 유지하는 경우가 많습니다. 이것이 데이터 압축 사례에서 k를 선택하는 방법입니다. 


   Whereas for visualization applications while usually we know how to plot only two dimensional data or three dimensional data, and so for visualization applications, we'll usually choose k equals 2 or k equals 3, because we can plot only 2D and 3D data sets. So that summarizes the main applications of PCA, as well as how to choose the value of k for these different applications.


   두 번째 응용 사례는 데이터 시각화입니다. 일반적으로 2차원 데이터와 3차원 데이터만을 도식화할 수 있습니다. 따라서 k = 2 또는 k = 3을 선택합니다. PCA의 응용 사례에 따른 k 값을 선택하는 방법도 함께 언급했습니다. 


   I should mention that there is often one frequent misuse of PCA and you sometimes hear about others doing this hopefully not too often. I just want to mention this so that you know not to do it. And there is one bad use of PCA, which iss to try to use it to prevent over-fitting. Here's the reasoning. This is not a great way to use PCA, but here's the reasoning behind this method, which is, you know if we have Xi, then maybe we'll have n features, but if we compress the data, and use Zi instead and that reduces the number of features to k, which could be much lower dimensional. And so if we have a much smaller number of features, if k is 1,000 and n is 10,000, then if we have only 1,000 dimensional data, maybe we're less likely to over-fit than if we were using 10,000-dimensional data with like a thousand features. So some people think of PCA as a way to prevent over-fitting. But just to emphasize this is a bad application of PCA and I do not recommend doing this. And it's not that this method works badly. If you want to use this method to reduce the dimensional data, to try to prevent over-fitting, it might actually work OK. But this just is not a good way to address over-fitting. 


   PCA를 오용하는 사례도 많습니다. PCA를 너무 자주 사용하지 않는 것이 좋습니다. PCA의 한 가지 오용 사례는 과적합을 방지하기 위해 PCA를 사용하는 것입니다. 이렇게 사용하는 이유가 있습니다. 즉, n개의 피처를 가진  x^(i)를 k개의 피처를 z^(i)를 사용합니다. k가 n 보다 훨씬 적은 수를 가집니다. 예를 들면, k가 1,000이고 n은 10,000을 가정하면, 1,000차원의 데이터는 10,000차원의 데이터보다 과적합일 가능성이 적습니다. 그래서, 사람들은 PCA를 과적합을 방지하는 방법으로 사용합니다. 이것은 정말 PCA의 오용 사례이고, 절대로 권장하지 않습니다. 과적합을 방지하기 위해 PCA를 사용하는 것이 잘못 동작하는 것은 아닙니다. 아마 과적합을 방지하고 정상적으로 동작할 수 있습니다. 단지 이것이 과적합을 해결하는 좋은 방법이 아니기 때문입니다. 



   Instead, if you're worried about over-fitting, there is a much better way to address it, to use regularization instead of using PCA to reduce the dimension of the data. And the reason is, if you think about how PCA works, it does not use the labels y. You are just looking at your inputs xi, and you're using that to find a lower-dimensional approximation to your data. So what PCA does, is it throws away some information. It throws away or reduces the dimension of your data without knowing what the values of y is, so this is probably okay using PCA this way is probably okay if, say 99 percent of the variance is retained, if you're keeping most of the variance, but it might also throw away some valuable information.    And it turns out that if you're retaining 99% of the variance or 95% of the variance or whatever, it turns out that just using regularization will often give you at least as good a method for preventing over-fitting and regularization will often just work better, because when you are applying linear regression or logistic regression or some other method with regularization, well, this minimization problem actually knows what the values of y are, and so is less likely to throw away some valuable information, whereas PCA doesn't make use of the labels and is more likely to throw away valuable information. 


    과적합이 걱정될 경우 PCA를 사용하여 데이터의 차원을 줄이는 것보다 정규화를 사용하는 것이 훨씬 더 좋은 방법입니다. PCA가 어떻게 동작하는 지를 생각해 봅시다. 레이블 y를 사용하지 않습니다. 입력 x^(i)를 살펴보고 저 차원의 근사치를 찾습니다. 레이블 y의 값이 무엇인지 알지도 못한 채 데이터의 차원을 줄입니다. 99%의 분산을 유지하기 때문에 PCA를 사용해도 괜찮을 수 있습니다. 하지만, 일부 귀중한 정보를 버릴 수도 있습니다. 99%의 분산이나 95%의 분산을 유지하는 경우 정규화를 사용하는 것만으로 과적합을 방지할 수 있습니다. 선형 회귀 또는 로지스틱 회귀에 정규화를 적용한다고 가정합니다. 비용 함수가 최소화 문제를 해결할 때 y의 값을 알기 때문에 중요한 정보를 버릴 가능성이 적습니다. 반대로 PCA는 그렇지 않습니다. 레이블을 사용하지 않고 귀중한 정보를 버릴 가능성이 더 큽니다. 


   So, to summarize, it is a good use of PCA, if your main motivation to speed up your learning algorithm, but using PCA to prevent over-fitting, that is not a good use of PCA, and using regularization instead is really what many people would recommend doing instead. 


   요약하면, 학습 알고리즘의 속도를 높이기 위해 PCA를 사용하는 것은 좋지만 과적합을 방지하기 위해 PCA를 사용하는 것은 좋지 않습니다. 과적합을 방지하기 위해서는 정규화를 사용하는 것이 훨씬 더 효과적입니다. 


    Finally, one last misuse of PCA. And so I should say PCA is a very useful algorithm, I often use it for the compression on the visualization purposes. But, what I sometimes see, is also people sometimes use PCA where it shouldn't be. So, here's a pretty common thing that I see, which is if someone is designing a machine-learning system, they may write down the plan like this: let's design a learning system. Get a training set and then, you know, what I'm going to do is run PCA, then train logistic regression and then test on my test data. So often at the very start of a project, someone will just write out a project plan than says lets do these four steps with PCA inside. Before writing down a project plan the incorporates PCA like this, one very good question to ask is, well, what if we were to just do the whole without using PCA.


   마지막으로 PCA의 오용의 또 다른 사례입니다. PCA는 매우 유용한 알고리즘입니다. 시각화 목적으로 압축을 가끔 사용합니다. 그러나, 사람들이 PCA를 사용하지 말아야 할 곳에서 가끔 사용한다는 것입니다. 제 생각에 꽤 흔한 오용이 있습니다. 누군가가 머신 러닝 시스템을 설계한다면 다음과 같은 계획을 세울 수 있습니다.

  

    학습 셋 수집

    차원 축소를 위해 PCA 실행

    로지스틱 회귀에서 학습

    테스트 셋에서 테스트


   종종 프로젝트 초기에 누군가 프로젝트 계획을 적고  PCA를 포함한 4 가지 단계를 하자고 말할 것입니다. PCA를 실행하기 전에 던질 수 있는 좋은 질문이 있습니다. 


   PCA를 사용하지 않고 머신 러닝 시스템을 설계하면 어떨까요? 



   And often people do not consider this step before coming up with a complicated project plan and implementing PCA and so on. And sometime, and so specifically, what I often advise people is, before you implement PCA, I would first suggest that, you know, do whatever it is, take whatever it is you want to do and first consider doing it with your original raw data xi, and only if that doesn't do what you want, then implement PCA before using Zi. So, before using PCA you know, instead of reducing the dimension of the data, I would consider well, let's ditch this PCA step, and I would consider, let's just train my learning algorithm on my original data. Let's just use my original raw inputs xi, and I would recommend, instead of putting PCA into the algorithm, just try doing whatever it is you're doing with the xi first. And only if you have a reason to believe that doesn't work, so that only if your learning algorithm ends up running too slowly, or only if the memory requirement or the disk space requirement is too large, so you want to compress your representation, but if only using the xi doesn't work, only if you have evidence or strong reason to believe that using the xi won't work, then implement PCA and consider using the compressed representation.


   종종 사람들은 복잡한 프로젝트 계획을 세우고 PCA를 구현하기 전에 이것을 고려하지 않습니다. 가끔 PCA를 구현하기 전에 먼저 원래 데이터로 무엇이든지 수행하는 것을 고려하라고 조언합니다. 데이터 x^(i)를 사용하여 원하는 작업을 수행하지 않을 상황에서만 z^(i)를 사용하는 것이 좋습니다. PCA를 사용하기 전에 데이터의 차원을 줄이는 대신에 PCA 단계를 버리고 원래 데이터 x^(i)를 사용하는 것이 좋습니다. 이것이 제대로 작동하지 않을 경우나 학습 알고리즘이 너무 느리거나 메모리나 디스크 공간이 부족할 경우에만 PCA를 사용합니다. 따라서, X^(i)를 사용할 때 제대로 작동하지 않는다는 강력한 이유가 있을 때 비로소 PCA를 고려합니다. 


   Because what I do see, is sometimes people start off with a project plan that incorporates PCA inside, and sometimes they, whatever they're doing will work just fine, even with out using PCA instead. So, just consider that as an alternative as well, before you go to spend a lot of time to get PCA in, figure out what k is and so on. 


   제가 보기에 사람들은 PCA를 프로젝트 계획에 넣고서 시작합니다. 많은 경우 PCA를 적용하지 않아도 잘 동작할 것입니다. PCA를 사용하기 위해 많은 시간을 보내기 전에 k가 무엇인지를 파악하는 것에 더 많은 시간을 사용하십시오. 


   So, that's it for PCA. Despite these last sets of comments, PCA is an incredibly useful algorithm, when you use it for the appropriate applications and I've actually used PCA pretty often and for me, I use it mostly to speed up the running time of my learning algorithms.  But I think, just as common an application of PCA, is to use it to compress data, to reduce the memory or disk space requirements, or to use it to visualize data. And PCA is one of the most commonly used and one of the most powerful unsupervised learning algorithms. And with what you've learned in these videos, I think hopefully you'll be able to implement PCA and use them through all of these purposes as well.  


   지금까지 PCA 였습니다. 마지막 설명에도 불구하고, PCA는 매우 유용한 알고리즘입니다. 적절하게 사용한다면 학습 알고리즘의 실행 시간을 단축합니다. 그러나 PCA는 보통 데이터를 압축하거나 메모리 또는 디스크 공간을 줄이거나 데이터를 시각화하기 위해 사용합니다. PCA는 가장 일반적으로 사용되는 가장 강력한 비지도 학습 알고리즘 중에 하나입니다. 이번 강의에서 PCA를 구현하고 적용하는 법을 배웠습니다. 모든 목적에 맞게 사용할 수 있기를 바랍니다. 


앤드류 응의 머신러닝 동영상 강의



정리하며


   PCA는 차원 축소 문제를 해결하는 가장 인기 있는 알고리즘 중 하나입니다. 수학적으로 데이터가 직교 투영할 때 점과 표면 사이의 거리의 제곱의 합이 최소가 되는 더 낮은 차원의 표면 또는 직선을 찾는 것입니다. PCA는 데이터를 투영할 더 낮은 차원을 찾아서 직교 투영하기 위해  투영 오차의 제곱을 최소화합니다. 정리하면, PCA는 n차원 데이터를 k차원으로 축소합니다. 


   PCA를 사용하는 사례는 크게 두 가지가 있습니다. 첫 번째 응용 사례는 데이터를 저장하는 메모리와 하드 디스크 공간을 줄이고 학습 알고리즘의 속도를 높이기 위한 데이터 압축입니다. 데이터 압축 사례는 k를 선택하기 위해 몇 % 의 분산을 유지하는 지를 파악하였습니다. 속도를 높이기 위해 일반적으로 99%의 분산을 유지하는 경우가 많습니다. 이것이 데이터 압축 사례에서 k를 선택하는 방법입니다. 두 번째 응용 사례는 데이터 시각화입니다. 일반적으로 2차원 데이터와 3차원 데이터만을 도식화할 수 있습니다. 따라서 k = 2 또는 k = 3을 선택합니다. 


   학습 알고리즘의 속도를 높이는 데이터 압축의 사례는 이미지를 분석하는 컴퓨터 비전의 사례가 대표적입니다. 100 X 100 픽셀의 이미지를 처리하는 컴퓨터 비전 문제라면 10,000 피처 벡터입니다.  학습 알고리즘이 매우 높은 차원의 피처 벡터를 실행할 때 느려질 수 있습니다. 10,000차원의 벡터를 로지스틱 회귀, 인공 신경망 또는 서포트 벡터 머신에서 구동할 때, 학습 데이터 셋이 많다면 학습 알고리즘은 더 느려집니다. 


    PCA를 사용하여 데이터의 차원을 줄이면 학습 알고리즘의 성능을 향상할 수 있습니다. 레이블이 있는 m개의 학습 셋 (x^(1), y^(1)), (x^(2), y^(2)),..., (x^(m), y^(m))이 있습니다. 여기서 레이블 y^(i)은 그대로 두고 입력 데이터 x^(i)만을 추출합니다. 그런 다음 PCA를 적용하여 10,000차원의 피처 벡터를 1,000차원의 피처 벡터로 줄입니다. 새로운 학습 셋은 10 배의 절감 효과가 있습니다. 학습 셋 x^(1), x^(2),..., x^(m)을  PCA로 저차원으로 낮춘 학습 셋 z^(1), z^(2),..., z^(m)으로 표현합니다. 차원이 축소된 학습 셋을 로지스틱 회귀나 인공 신경망과 같은 학습 알고리즘에 적용할 수 있습니다. PCA는 교차 검증 셋이나 테스트 셋이 아닌 학습 셋에서만 실행합니다. 


   학습 알고리즘의 속도를 높이기 위해 PCA를 사용하는 것은 좋지만 과적합을 방지하기 위해 PCA를 사용하는 것은 좋지 않습니다. 과적합을 방지하기 위해서는 정규화를 사용하는 것이 훨씬 더 효과적입니다.  


   제 생각에 꽤 흔한 오용이 있습니다. 누군가가 머신 러닝 시스템을 설계한다면 다음과 같은 계획을 세울 수 있습니다.

  

    (1) 학습 셋 수집

    (2) 차원 축소를 위해 PCA 실행

    (3) 로지스틱 회귀에서 학습

    (4) 테스트 셋에서 테스트


   이때 PCA를 실행하기 전에 던질 수 있는 좋은 질문이 있습니다. 바로 PCA를 사용하지 않을 수 있는 지를 먼저 확인하는 것입니다. x^(i)를 사용할 때 제대로 작동하지 않는다는 강력한 이유가 있을 때 비로소 PCA를 고려합니다.



문제 풀이


   다음 중 PCA를 적용하는 올바른 사례는 무엇입니까? 


정답은 1번, 2번, 4번입니다. 


매거진의 이전글 앤드류 응의 머신러닝(14-6):PCA 파라미터 k결정
작품 선택
키워드 선택 0 / 3 0
댓글여부
afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari