-
Notifications
You must be signed in to change notification settings - Fork 15
/
16 실습 - 차원축소
1 lines (1 loc) · 60 KB
/
16 실습 - 차원축소
1
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"16 실습 - 차원축소","provenance":[],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"markdown","metadata":{"id":"4di_nmaFk0Zu"},"source":["# PCA (주성분 분석)"]},{"cell_type":"markdown","metadata":{"id":"-eRv2nFqlMAZ"},"source":["* PCA는 데이터의 분산(variance)을 최대로 하는 축을 찾는 것을 반복하여, 고차원 공간의 표본들을 저차원 공간으로 변환하는 기법\n","\n","\n"]},{"cell_type":"markdown","metadata":{"id":"n45Y8uyUlGMJ"},"source":["![대체 텍스트](http://i.imgur.com/jWJ2nUs.png)"]},{"cell_type":"markdown","metadata":{"id":"ebumLhy25esv"},"source":["## 1 차원 축소의 예\n","\n","변수 갯수를 차원이라고 생각할 수 있음"]},{"cell_type":"code","metadata":{"id":"kSe1NKhQlG9f","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490557315,"user_tz":-540,"elapsed":376,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"e3d21063-eaf7-44af-b067-c5696f255e77"},"source":["국어 = 80\n","영어 = 60\n","수학 = 90\n","과학 = 70\n","\n","평균 = (국어 + 영어 + 수학 + 과학)/4 # 5개 차원을 1개 차원으로 축수\n","\n","평균"],"execution_count":42,"outputs":[{"output_type":"execute_result","data":{"text/plain":["75.0"]},"metadata":{},"execution_count":42}]},{"cell_type":"code","metadata":{"id":"wWnVJ9vK5YY9","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490588404,"user_tz":-540,"elapsed":256,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"dd8c43e0-9048-4417-bfa5-b715da4db9d7"},"source":["몸무게 = 70\n","키 = 180\n","\n","BMI = 몸무게 / (키*키) # 2개 차원을 1개 차원으로 축소\n","\n","BMI "],"execution_count":43,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0.0021604938271604936"]},"metadata":{},"execution_count":43}]},{"cell_type":"markdown","metadata":{"id":"zc4GQj2oNn3G"},"source":["\n","\n","---\n","\n"]},{"cell_type":"markdown","metadata":{"id":"c_viMcGaNpEN"},"source":["## 2 PCA 예제"]},{"cell_type":"markdown","metadata":{"id":"EIDZeP-lOB52"},"source":["### 1) 예제 데이터"]},{"cell_type":"code","metadata":{"id":"zwp8In2uNWgi","colab":{"base_uri":"https://localhost:8080/","height":205},"executionInfo":{"status":"ok","timestamp":1637490614823,"user_tz":-540,"elapsed":337,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"c05923eb-2aba-468d-de22-86d29d648242"},"source":["import pandas as pd\n","# Eating, exercise habbit and their body shape\n","df = pd.DataFrame(columns=['calory', 'breakfast', 'lunch', 'dinner', 'exercise', 'body_shape'])\n","\n","df.loc[0] = [1200, 1, 0, 0, 2, 'Skinny']\n","df.loc[1] = [2800, 1, 1, 1, 1, 'Normal']\n","df.loc[2] = [3500, 2, 2, 1, 0, 'Fat']\n","df.loc[3] = [1400, 0, 1, 0, 3, 'Skinny']\n","df.loc[4] = [5000, 2, 2, 2, 0, 'Fat']\n","df.loc[5] = [1300, 0, 0, 1, 2, 'Skinny']\n","df.loc[6] = [3000, 1, 0, 1, 1, 'Normal']\n","df.loc[7] = [4000, 2, 2, 2, 0, 'Fat']\n","df.loc[8] = [2600, 0, 2, 0, 0, 'Normal']\n","df.loc[9] = [3000, 1, 2, 1, 1, 'Fat']\n","\n","df.head()"],"execution_count":44,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>calory</th>\n"," <th>breakfast</th>\n"," <th>lunch</th>\n"," <th>dinner</th>\n"," <th>exercise</th>\n"," <th>body_shape</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>1200</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>2</td>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2800</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>Normal</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>3500</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>Fat</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>1400</td>\n"," <td>0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>3</td>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>5000</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>0</td>\n"," <td>Fat</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" calory breakfast lunch dinner exercise body_shape\n","0 1200 1 0 0 2 Skinny\n","1 2800 1 1 1 1 Normal\n","2 3500 2 2 1 0 Fat\n","3 1400 0 1 0 3 Skinny\n","4 5000 2 2 2 0 Fat"]},"metadata":{},"execution_count":44}]},{"cell_type":"markdown","metadata":{"id":"RU435e2UNWgn"},"source":["### 2) vector 추출"]},{"cell_type":"code","metadata":{"id":"aTsVKtciNWgn","colab":{"base_uri":"https://localhost:8080/","height":205},"executionInfo":{"status":"ok","timestamp":1637490290093,"user_tz":-540,"elapsed":26,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"e1b218ec-45cb-4614-df58-4311a3b1be7c"},"source":["# X is feature vectors\n","X = df[['calory', 'breakfast', 'lunch', 'dinner', 'exercise']]\n","X.head()"],"execution_count":24,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>calory</th>\n"," <th>breakfast</th>\n"," <th>lunch</th>\n"," <th>dinner</th>\n"," <th>exercise</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>1200</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>2</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2800</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>1</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>3500</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>1</td>\n"," <td>0</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>1400</td>\n"," <td>0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>3</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>5000</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>2</td>\n"," <td>0</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" calory breakfast lunch dinner exercise\n","0 1200 1 0 0 2\n","1 2800 1 1 1 1\n","2 3500 2 2 1 0\n","3 1400 0 1 0 3\n","4 5000 2 2 2 0"]},"metadata":{},"execution_count":24}]},{"cell_type":"code","metadata":{"id":"W7pLlFliNWgq","colab":{"base_uri":"https://localhost:8080/","height":205},"executionInfo":{"status":"ok","timestamp":1637490290093,"user_tz":-540,"elapsed":25,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"4199f40e-1e6f-4887-f67a-c6a51b2ea4db"},"source":["# Y is labels\n","Y = df[['body_shape']]\n","Y.head()"],"execution_count":25,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>body_shape</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>Normal</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>Fat</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>Fat</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" body_shape\n","0 Skinny\n","1 Normal\n","2 Fat\n","3 Skinny\n","4 Fat"]},"metadata":{},"execution_count":25}]},{"cell_type":"markdown","metadata":{"id":"_-jESafVNWgv"},"source":["### 3) feature vector 표준화"]},{"cell_type":"code","metadata":{"id":"jTYWHiC6NWgv","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290094,"user_tz":-540,"elapsed":25,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"4149b022-f3d2-406b-f246-8bdc7e74c494"},"source":["from sklearn.preprocessing import StandardScaler\n","x_std = StandardScaler().fit_transform(X)\n","\n","x_std"],"execution_count":26,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[-1.35205803, 0. , -1.3764944 , -1.28571429, 1. ],\n"," [ 0.01711466, 0. , -0.22941573, 0.14285714, 0. ],\n"," [ 0.61612771, 1.29099445, 0.91766294, 0.14285714, -1. ],\n"," [-1.18091145, -1.29099445, -0.22941573, -1.28571429, 2. ],\n"," [ 1.89972711, 1.29099445, 0.91766294, 1.57142857, -1. ],\n"," [-1.26648474, -1.29099445, -1.3764944 , 0.14285714, 1. ],\n"," [ 0.18826125, 0. , -1.3764944 , 0.14285714, 0. ],\n"," [ 1.04399418, 1.29099445, 0.91766294, 1.57142857, -1. ],\n"," [-0.15403193, -1.29099445, 0.91766294, -1.28571429, -1. ],\n"," [ 0.18826125, 0. , 0.91766294, 0.14285714, 0. ]])"]},"metadata":{},"execution_count":26}]},{"cell_type":"code","metadata":{"id":"g_KzSYIMNWgx","executionInfo":{"status":"ok","timestamp":1637490290094,"user_tz":-540,"elapsed":23,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}}},"source":["StandardScaler?"],"execution_count":27,"outputs":[]},{"cell_type":"code","metadata":{"id":"2Y5sAh8VOiK4","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290248,"user_tz":-540,"elapsed":177,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"74e86ea4-8030-4acd-af31-4c52c0751b0d"},"source":["print(x_std.mean())\n","print(x_std.std())"],"execution_count":28,"outputs":[{"output_type":"stream","name":"stdout","text":["3.552713678800501e-17\n","1.0\n"]}]},{"cell_type":"code","metadata":{"id":"tVAlWTMC7zXF","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490791671,"user_tz":-540,"elapsed":276,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"52273b66-12ff-48b9-8dfc-7efc352ebda6"},"source":["x_std"],"execution_count":45,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[-1.35205803, 0. , -1.3764944 , -1.28571429, 1. ],\n"," [ 0.01711466, 0. , -0.22941573, 0.14285714, 0. ],\n"," [ 0.61612771, 1.29099445, 0.91766294, 0.14285714, -1. ],\n"," [-1.18091145, -1.29099445, -0.22941573, -1.28571429, 2. ],\n"," [ 1.89972711, 1.29099445, 0.91766294, 1.57142857, -1. ],\n"," [-1.26648474, -1.29099445, -1.3764944 , 0.14285714, 1. ],\n"," [ 0.18826125, 0. , -1.3764944 , 0.14285714, 0. ],\n"," [ 1.04399418, 1.29099445, 0.91766294, 1.57142857, -1. ],\n"," [-0.15403193, -1.29099445, 0.91766294, -1.28571429, -1. ],\n"," [ 0.18826125, 0. , 0.91766294, 0.14285714, 0. ]])"]},"metadata":{},"execution_count":45}]},{"cell_type":"code","metadata":{"id":"q6UAaEze75Sq","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490795451,"user_tz":-540,"elapsed":267,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"8a3b04bf-f0e1-44cf-938b-b14289cf6394"},"source":["x_std.T"],"execution_count":46,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[-1.35205803, 0.01711466, 0.61612771, -1.18091145, 1.89972711,\n"," -1.26648474, 0.18826125, 1.04399418, -0.15403193, 0.18826125],\n"," [ 0. , 0. , 1.29099445, -1.29099445, 1.29099445,\n"," -1.29099445, 0. , 1.29099445, -1.29099445, 0. ],\n"," [-1.3764944 , -0.22941573, 0.91766294, -0.22941573, 0.91766294,\n"," -1.3764944 , -1.3764944 , 0.91766294, 0.91766294, 0.91766294],\n"," [-1.28571429, 0.14285714, 0.14285714, -1.28571429, 1.57142857,\n"," 0.14285714, 0.14285714, 1.57142857, -1.28571429, 0.14285714],\n"," [ 1. , 0. , -1. , 2. , -1. ,\n"," 1. , 0. , -1. , -1. , 0. ]])"]},"metadata":{},"execution_count":46}]},{"cell_type":"markdown","metadata":{"id":"S0OJ6rcXNWgz"},"source":["### 4) feature 간 공분산 행렬계산"]},{"cell_type":"code","metadata":{"id":"EsRD5rBxNWg1","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290249,"user_tz":-540,"elapsed":173,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"f449bd24-4307-4390-f38e-49f92a09e84d"},"source":["import numpy as np\n","\n","# features are columns from x_std\n","features = x_std.T \n","covariance_matrix = np.cov(features)\n","\n","\n","\n","print(covariance_matrix)"],"execution_count":31,"outputs":[{"output_type":"stream","name":"stdout","text":["[[ 1.11111111 0.88379717 0.76782385 0.89376551 -0.93179808]\n"," [ 0.88379717 1.11111111 0.49362406 0.81967902 -0.71721914]\n"," [ 0.76782385 0.49362406 1.11111111 0.40056715 -0.76471911]\n"," [ 0.89376551 0.81967902 0.40056715 1.11111111 -0.63492063]\n"," [-0.93179808 -0.71721914 -0.76471911 -0.63492063 1.11111111]]\n"]}]},{"cell_type":"code","metadata":{"id":"dcCx3i7e8ihj","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490842287,"user_tz":-540,"elapsed":287,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"1db28d4a-7b4a-40b3-ee92-b47d3845e7ba"},"source":["x_std.T.dot(x_std)/9"],"execution_count":47,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[ 1.11111111, 0.88379717, 0.76782385, 0.89376551, -0.93179808],\n"," [ 0.88379717, 1.11111111, 0.49362406, 0.81967902, -0.71721914],\n"," [ 0.76782385, 0.49362406, 1.11111111, 0.40056715, -0.76471911],\n"," [ 0.89376551, 0.81967902, 0.40056715, 1.11111111, -0.63492063],\n"," [-0.93179808, -0.71721914, -0.76471911, -0.63492063, 1.11111111]])"]},"metadata":{},"execution_count":47}]},{"cell_type":"markdown","metadata":{"id":"fPQTE54yNWg2"},"source":["### 5) 고유 벡터(Eigen Vectors)와 고유값(Eigen Values) 산출"]},{"cell_type":"code","metadata":{"id":"SZM7B525NWg3","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290249,"user_tz":-540,"elapsed":170,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"f9e71730-56fd-4bf8-f58d-dd84c62435a9"},"source":["eig_vals, eig_vecs = np.linalg.eig(covariance_matrix)\n","print('Eigenvalues \\n%s' %eig_vals)\n","print('Eigenvectors \\n%s' %eig_vecs)"],"execution_count":33,"outputs":[{"output_type":"stream","name":"stdout","text":["Eigenvalues \n","[4.0657343 0.8387565 0.07629538 0.27758568 0.2971837 ]\n","Eigenvectors \n","[[-0.508005 -0.0169937 -0.84711404 0.11637853 0.10244985]\n"," [-0.44660335 -0.36890361 0.12808055 -0.63112016 -0.49973822]\n"," [-0.38377913 0.70804084 0.20681005 -0.40305226 0.38232213]\n"," [-0.42845209 -0.53194699 0.3694462 0.22228235 0.58954327]\n"," [ 0.46002038 -0.2816592 -0.29450345 -0.61341895 0.49601841]]\n"]}]},{"cell_type":"code","metadata":{"id":"gswIA3qUNWg7","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290250,"user_tz":-540,"elapsed":169,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"b91241ed-742b-463c-add5-3749c47a51f1"},"source":["# 1개 차원으로 축소했을때 73%의 정보를 보유\n","eig_vals[0] / sum(eig_vals)"],"execution_count":34,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0.7318321731427545"]},"metadata":{},"execution_count":34}]},{"cell_type":"markdown","metadata":{"id":"Iz3WqbWdNWg9"},"source":["### 6) 고유벡터(Eigen Vector)를 기준으로 데이터를 투영"]},{"cell_type":"code","metadata":{"id":"LVITokrDEOos","executionInfo":{"status":"ok","timestamp":1637490950034,"user_tz":-540,"elapsed":261,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"284037fb-35fc-43f2-817e-0d8e20df49a2","colab":{"base_uri":"https://localhost:8080/"}},"source":["eig_vecs.T[0]"],"execution_count":48,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([-0.508005 , -0.44660335, -0.38377913, -0.42845209, 0.46002038])"]},"metadata":{},"execution_count":48}]},{"cell_type":"code","metadata":{"id":"g1Z4VErxNWg9","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290250,"user_tz":-540,"elapsed":167,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"de4ac759-4b6c-497a-d8f9-6920d201c3fe"},"source":["projected_X = x_std.dot(eig_vecs.T[0])\n","projected_X"],"execution_count":35,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([ 2.22600943, 0.0181432 , -1.76296611, 2.73542407, -3.02711544,\n"," 2.14702579, 0.37142473, -2.59239883, 0.39347815, -0.50902498])"]},"metadata":{},"execution_count":35}]},{"cell_type":"code","metadata":{"id":"-ZBMM62kNWhJ","colab":{"base_uri":"https://localhost:8080/","height":205},"executionInfo":{"status":"ok","timestamp":1637490290250,"user_tz":-540,"elapsed":166,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"9367686c-830d-4637-cf2c-43073c4fa8c9"},"source":["result = pd.DataFrame(projected_X, columns=['PC1'])\n","result['y-axis'] = 0.0\n","result['label'] = Y\n","result.head()"],"execution_count":36,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>PC1</th>\n"," <th>y-axis</th>\n"," <th>label</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>2.226009</td>\n"," <td>0.0</td>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>0.018143</td>\n"," <td>0.0</td>\n"," <td>Normal</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>-1.762966</td>\n"," <td>0.0</td>\n"," <td>Fat</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>2.735424</td>\n"," <td>0.0</td>\n"," <td>Skinny</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>-3.027115</td>\n"," <td>0.0</td>\n"," <td>Fat</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain":[" PC1 y-axis label\n","0 2.226009 0.0 Skinny\n","1 0.018143 0.0 Normal\n","2 -1.762966 0.0 Fat\n","3 2.735424 0.0 Skinny\n","4 -3.027115 0.0 Fat"]},"metadata":{},"execution_count":36}]},{"cell_type":"code","metadata":{"id":"qpgqiL4QNWhM","colab":{"base_uri":"https://localhost:8080/","height":458},"executionInfo":{"status":"ok","timestamp":1637490290958,"user_tz":-540,"elapsed":873,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"56f69778-3260-4e31-fab7-475a4085a82e"},"source":["import matplotlib.pyplot as plt\n","import seaborn as sns\n","%matplotlib inline\n","\n","sns.lmplot('PC1', 'y-axis', data=result, fit_reg=False, # x-axis, y-axis, data, no line\n"," scatter_kws={\"s\": 50}, # marker size\n"," hue=\"label\") # color\n","\n","# title\n","plt.title('PCA result')"],"execution_count":37,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.\n"," FutureWarning\n"]},{"output_type":"execute_result","data":{"text/plain":["Text(0.5, 1.0, 'PCA result')"]},"metadata":{},"execution_count":37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JTBpEkqSmDSJLUlEEkSWrKINJ2K8mG/onqP0pyTpLF/fo9knwyyU+SfD/Jl5L8er/tK0nuSvKFttVL2w6DSNuzNVV1cP9U6kHgNf0HKj8LXFBVj6iqJwB/DuzeH/NXwCvblCttmwwiqXMh8EjgUGBdVX1waENVXVZVF/avvwb8ok2J0rbJINJ2L8k84Ei6T/M/lm4OHElbiUGk7dmi/vH9K4D/onvGmaStzKdva3u2pn98/y8luQI4plE90nbJKyLp/s4HFiY5bmhFkscleVrDmqRtmkEkDdPP2/RC4LB++PYVwP8FbgVIciFwDvCsJDcmmXFPCJdmG5++LUlqyisiSVJTBpEkqSmDSJLUlEEkSWrKIJIkNWUQSZKaMogkSU39f1bYYm1GLGJwAAAAAElFTkSuQmCC\n","text/plain":["<Figure size 432.125x360 with 1 Axes>"]},"metadata":{"needs_background":"light"}}]},{"cell_type":"markdown","metadata":{"id":"ZJ6gr23YPhfr"},"source":["\n","\n","---\n","\n"]},{"cell_type":"markdown","metadata":{"id":"VhprUX7gNWhP"},"source":["## 3 scikit-learn 활용 PCA"]},{"cell_type":"code","metadata":{"id":"8hNAo6pDNWhQ","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490290959,"user_tz":-540,"elapsed":7,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"720f2c91-ccad-416f-f101-1fccd0697c94"},"source":["from sklearn import decomposition\n","pca = decomposition.PCA(n_components=1)\n","sklearn_pca_x = pca.fit_transform(x_std)\n","sklearn_pca_x"],"execution_count":38,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[-2.22600943],\n"," [-0.0181432 ],\n"," [ 1.76296611],\n"," [-2.73542407],\n"," [ 3.02711544],\n"," [-2.14702579],\n"," [-0.37142473],\n"," [ 2.59239883],\n"," [-0.39347815],\n"," [ 0.50902498]])"]},"metadata":{},"execution_count":38}]},{"cell_type":"code","metadata":{"id":"uMdCh2hFNWhR","colab":{"base_uri":"https://localhost:8080/","height":442},"executionInfo":{"status":"ok","timestamp":1637490291260,"user_tz":-540,"elapsed":305,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"b13f0765-7e63-4793-cb0d-bfc970cb3caf"},"source":["sklearn_result = pd.DataFrame(sklearn_pca_x, columns=['PC1'])\n","sklearn_result['y-axis'] = 0.0\n","sklearn_result['label'] = Y\n","\n","sns.lmplot('PC1', 'y-axis', data=sklearn_result, fit_reg=False, # x-axis, y-axis, data, no line\n"," scatter_kws={\"s\": 50}, # marker size\n"," hue=\"label\") # color"],"execution_count":39,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.\n"," FutureWarning\n"]},{"output_type":"execute_result","data":{"text/plain":["<seaborn.axisgrid.FacetGrid at 0x7f502f1aac90>"]},"metadata":{},"execution_count":39},{"output_type":"display_data","data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAaIAAAFgCAYAAAD5K33QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAdFUlEQVR4nO3de7hfVX3n8fcnVxKoATRyV7xQLSrF8QwdrFqUS2NvQYtTlLFg7VDbWrXWdujYpyLFDtpWnXZaLKMUZBi12naMV0SQEcULR4oiAoIUh3CRQLgYEpKc5Dt//Hbg5HCSc/udrJNz3q/nyXP23mv99v7+MJ5P9t5r75WqQpKkVua1LkCSNL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iQ1ZRBJkpoyiCRJTRlEkqSmDCJJUlMGkSSpqf8PG9aLHEwIDDsAAAAASUVORK5CYII=\n","text/plain":["<Figure size 432.125x360 with 1 Axes>"]},"metadata":{"needs_background":"light"}}]},{"cell_type":"code","metadata":{"id":"ZRbZndmmcqMe","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1637490291261,"user_tz":-540,"elapsed":8,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"d6040b30-0651-4f27-f115-a908e5a925df"},"source":["from sklearn import decomposition\n","pca = decomposition.PCA(n_components=2)\n","sklearn_pca_x = pca.fit_transform(x_std)\n","sklearn_pca_x"],"execution_count":40,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[-2.22600943, -0.54936514],\n"," [-0.0181432 , -0.23871898],\n"," [ 1.76296611, 0.36868681],\n"," [-2.73542407, 0.4544983 ],\n"," [ 3.02711544, -0.41305057],\n"," [-2.14702579, -0.83449111],\n"," [-0.37142473, -1.05380594],\n"," [ 2.59239883, -0.3985085 ],\n"," [-0.39347815, 2.09420397],\n"," [ 0.50902498, 0.57055116]])"]},"metadata":{},"execution_count":40}]},{"cell_type":"code","metadata":{"id":"MVe_ILkacs95","colab":{"base_uri":"https://localhost:8080/","height":442},"executionInfo":{"status":"ok","timestamp":1637490291950,"user_tz":-540,"elapsed":435,"user":{"displayName":"이민호","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GiFPPatrtQJJCEfMd6D3DoTVRog9gVm7Ovj5Lex=s64","userId":"15829449822908558555"}},"outputId":"ee7b55a1-b7a9-4e9c-d63f-8a6a8e110b41"},"source":["sklearn_result = pd.DataFrame(sklearn_pca_x, columns=['PC1', 'PC2'])\n","sklearn_result['label'] = Y\n","\n","sns.lmplot('PC1', 'PC2', data=sklearn_result, fit_reg=False, # x-axis, y-axis, data, no line\n"," scatter_kws={\"s\": 50}, # marker size\n"," hue=\"label\") # color"],"execution_count":41,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.\n"," FutureWarning\n"]},{"output_type":"execute_result","data":{"text/plain":["<seaborn.axisgrid.FacetGrid at 0x7f502a92a210>"]},"metadata":{},"execution_count":41},{"output_type":"display_data","data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAaMAAAFgCAYAAAAW6RbuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de5RfZX3v8fc3c0lmkiagZJGEiwhNpSCXyhxOI0IBlYPYI9JKj5aDYm1paT3V07JaWlleWqzU0tZTa7FUKcjheKGiUkWRcjmAQGvkEEK4mECphCQ6gCQmM8lvZvI9f+ydMBkmmcz1md/k/Vpr1u+3n71n7y9ZkA/72c9+nshMJEkqaVbpAiRJMowkScUZRpKk4gwjSVJxhpEkqbjW0gVMtDPPPDO/9a1vlS5D0r4rShfQjGbcndGzzz5bugRJ0ijNuDCSJDUfw0iSVJxhJEkqzjCSJBVnGEmSijOMJEnFGUaSpOIMI0lScTNuBgbNUI0eeOJ22LgWFhwMR5wO7Z2lq5I0QQwjTX/rH4KvXgR9PTDQBy1tcOfH4K1XwuJjS1cnaQLYTafprdFTBVH/Npg9HzpfXn32b6vaGz2lK5Q0AQwjTW9P3F7dEbXP3bW9fW7V/uQdZeqSNKEMI01vG9dWXXPDGeiDjc9MbT2SJoVhpOltwcHVM6LhtLTBgoOmth5Jk8Iw0vR2xOnQ1gmNLbu2N7ZU7YefVqYuSRPKMNL01t5ZjZprnQ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WWrqA8cjMN+zlodcDNwMfmsRy9tpIdUfEBcAvAq/PafJQbxR/1tPdM8Ahg7YPrts0CernLl8Grs/MG0vXMxqZ+UJE3AGcCTTV4JFm1NR3RnsSEUsHbZ4NPFaqltGIiDOBPwDekpk9peuZgb4LLI2IV0ZEO/B24KbCNc1I9WCAzwKPZuZfla5nb0TEwh0jWCOig2qgS1P83dHsZvJoui8Dr6Ia5fUfwG9l5rT/P+CIWAPMBp6rm+6f7qMAI+Ic4JPAQuAF4MHM/C9lq9q9iDgL+ATQAlydmR8tXNIeRcTngVOpljT4IfChzPxs0aL2QkS8DrgbWEn13yHAH2fmzeWq2rOIOBa4lurfjVnAlzLzT8pWtW+YsWEkSWoeM7abTpLUPAwjSVJxhpEkqTjDSJJUnGEkSSrOMNI+JSIG6pncH46IGyKis25fFBFfiIgnIuJ7EXFzRPxMve9bEfFCRHy9bPXSzGUYaV/Tm5nH17NfN4Dfql/O/ApwZ2YekZknAH8EHFj/zl8A55cpV9o3GEbal90N/DRwGtCXmZ/esSMzV2Tm3fX324CflClR2jcYRtonRUQr8Caq2QFeTbXWjqRCDCPtazrq5QGWAz+gmjtNUmFNPWu3NAa99fIAO0XEKuBtheqRhHdGEsDtwOyIuHBHQ0QcGxEnF6xJ2qcYRtrn1aWpcxMAAABOSURBVGtGnQO8oR7avQr4GLABICLuBm4AXh8RayNi2s5ILjUrZ+2WJBXnnZEkqTjDSJJUnGEkSSrOMJIkFWcYSZKKM4wkScUZRpKk4v4/weTb2Zve4rEAAAAASUVORK5CYII=\n","text/plain":["<Figure size 432.125x360 with 1 Axes>"]},"metadata":{"needs_background":"light"}}]},{"cell_type":"markdown","metadata":{"id":"qxxHu8ooPgJ0"},"source":["\n","\n","---\n","\n"]}]}