전체 글288

PCA(w/code) 👏 저번 시간에 PCA의 개념 및 주축을 찾기까지의 자세한 과정을 여러 방면으로 분석해보고 알아보았다. PCA(concepts) * dimensionality reduction 기법 중 대표적인 방법인 PCA에 대해서 알아보자! concepts> ① 고차원의 data를 낮은 차원으로 차원 축소하는 기법 (dimensionality reduction) ② 기준이 되는 정보는 data의 분산! (분산 sh-avid-learner.tistory.com 👏 이제는 직접 code로 실행해 scree plot으로 시각화해보고 주어진 unsupervised data를 알맞게 clustering해 실제 data가 PC 축에 맞게 잘 분리가 되는지 체크해보는 과정까지 해 보려 한다! 👏 PCA에 대해서 배웠던 개념을 아.. Machine Learning/Fundamentals 2022. 5. 31.
PCA(concepts) * dimensionality reduction 기법 중 대표적인 방법인 PCA에 대해서 알아보자! concepts> ① 고차원의 data를 낮은 차원으로 차원 축소하는 기법 (dimensionality reduction) ② 기준이 되는 정보는 data의 분산! (분산을 통해 데이터가 흩어진 정도를 알 수 있기 때문) ③ 고차원 data의 정보(분산)를 최대한 유지하는 eigenvector를 찾고, 해당 vector에 대해 data를 linear projection하는 과정 - 예시 - Q. 2차원 상에 주어진 data를 1차원으로 축소하려고 할 때 아래 두 line 중 원본 data의 정보를 최대한 많이 살린 채로 축소된 것은? - 오른쪽 line을 골라야 한다! (기존 2차원 data 분산을 최대한.. Machine Learning/Fundamentals 2022. 5. 30.
Feature Selection vs. Feature Extraction 🧜‍♂️ 빅데이터의 경우 feature 수가 너무 많아서 데이터를 처리하는 데 복잡하다. 따라서 우리는 적절하게 중요 feature만 선택하거나, 기존 feature들을 재조합한 일부 feature만 선택할 수 있다. 🧜‍♂️ for dimensionality reduction.. → 모델 복잡성 감소, 과적합 현상 방지, 일반화 성능 향상, 모델 computation 효능 향상을 위해 기존 feature를 이용해 selection & extraction을 진행한다 🧜‍♂️ 데싸를 공부한다면 반드시! 거쳐가야 할, 학습해야 할 두 가지 technique - feature extraction(하단 좌) & feature selection(하단 우) - 🧜‍♂️ feature extraction은 기존의 f.. Machine Learning/Fundamentals 2022. 5. 18.
eigenvalue & eigenvector * intro 🔅 위에서 배운 transform 연산에서 transformation에 영향을 받지 않는 부분, 즉 transform을 해도 방향이 변하지 않는 벡터(값은 변할 수 있음)를 '고유벡터(eigenvector)' (※ 벡터의 차원에서는 transformation은 곧 벡터가 가리키는 방향이 변함을 뜻한다. scalar 배를 곱한 결과, 즉 벡터 크기 변화는 중요치 X) 🔅 이 때, transformation에서 변하는 scalar 값을 'eigenvalue(고유값)'이라고 한다 🔅고유벡터 & 고유값은 항상 쌍을 이루고 있다 - λ는 고유값 - $T(v) = \lambda v$ 🔅 다시 고유벡터와 고유값을 정의하자면 아래와 같다 '임의의 $n x n$ 행렬 $A$에 대하여, 0이 아닌 솔루션 v.. Math & Linear Algebra/Concepts 2022. 5. 14.
linear & non-linear → span, basis, rank, projection 👏 저번 시간에 coefficient 두 종류 Pearson과 Spearman에 대해서 공부했었다! 👏 correlation 관련 수학 & 선대 기초 개념 span, basis, rank 그리고 응용한 projection 개념까지 이번 포스팅으로 간단히 알아보ZA Pearson & Spearman correlation coefficients 🧓🏻 데이터분석에 있어서 꼭 알고 넘어가야 할 개념인 두 coefficients 종류 Pearson과 Spearman에 대해 자세히 알아보자 ≫ 저번 coursera 강좌 posting에서 아주 잠깐 배웠던 적이 있었다 🏄🏻 coefficient sh-avid-learner.tistory.com 👏 모든 data를 좌표공간의 vector상으로 나타낼 수 있다. 또 여.. Math & Linear Algebra/Concepts 2022. 5. 13.
Pearson & Spearman correlation coefficients 🧓🏻 데이터분석에 있어서 꼭 알고 넘어가야 할 개념인 두 coefficients 종류 Pearson과 Spearman에 대해 자세히 알아보자 ≫ 저번 coursera 강좌 posting에서 아주 잠깐 배웠던 적이 있었다 🏄🏻 coefficients를 사용하게 된 배경 및 두 가지 종류의 coefficients를 자세히 살펴보면 from covariance> 🏄🏻 covariance란 '1개의 변수 값이 변화할 때 다른 변수가 어떠한 연관성을 나타내며 변하는 지를 측정하는 것'이다 🏄🏻 분산 = '한 개의 데이터가 퍼져 있는 정도' 🏄🏻 공분산(공통된 분산) = '두 개의 데이터가 퍼져 있는 정도(한 개의 변수가 왔다갔다 움직이는 동안 다른 변수가 어느 정도로 퍼져 있는 지 측정)' - 아래 그림과 함께 .. Math & Linear Algebra/Concepts 2022. 5. 13.
Cramer's Rule (+exercise) 👨‍🍳 경제수학에서도 본 적 있는, 실제 1차 연립방정식이 주어지면 여러 해들을 매우 간단하게 구할 수 있는, 강력한 Rule! Cramer's Rule에 대해 알아보ZA definition & proof> 👨‍🍳 주어진 1차 연립방정식> $a_{11}x_1 + a_{12}x_2 + ... + a_{1n}x_n = b_1$ $a_{21}x_1 + a_{22}x_2 + ... + a_{2n}x_n = b_2$ : $a_{n1}x_1 + a_{n2}x_2 + ... + a_{nn}x_n = b_n$ 👨‍🍳 '다음 1차 연립방정식의 계수행렬을 행렬 A라 할 때, 행렬 A가 |A| ≠ 0이면, 다음 연립방정식은 오직 하나의 해를 갖고 그 해는 $x_1 = \cfrac{|A_1|}{|A|}, x_2 = \cfra.. Math & Linear Algebra/Concepts 2022. 5. 9.
Bayesian Theorem 😺 이미 베이지안 이론과 관련한 문제에 대해서 옛날 포스팅에 다룬 바 있었다! Bayesian Theorem '(example - 2 exercises) Q1) At a certain stage of a criminal investigation, ①the inspector in charge is 60% convinced of the guilty of a certain suspect. Suppose now that a new piece of evidence that shows that ②th.. sh-avid-learner.tistory.com 😺 이젠 베이지안 이론에 관해 자세히 concept에 대해 알아보려 함! concepts> 🖐🏻 베이즈 정리는 한 마디로 '데이터라는 조건이 주어졌을 때의 조건부확.. Statistics/Concepts(+codes) 2022. 5. 7.
distribution》poisson distribution (포아송분포) * 이항분포 특성이나 개형이 비슷한 포아송 분포에 대해서 알아보자! distribution》binomial distribution (이항분포) * 확률분포 여태까지 총 3개에 대해서 배웠다 (z-분포 포함) 🎄 student's t-distribution distribution≫ Student's t-distribution (in-depth) ✋ 통계에 있어서 빼먹지 않아야 할, 무조건 숙지해야 할 '통계분.. sh-avid-learner.tistory.com concepts> 👑 어떤 단위공간에 내가 관심있는 사건이 몇 번 발생했는 가를 알고 싶을 떄 모델링하기 위해서 주로 활용 👑 주로 단위공간에서 우리가 관심있어하는 사건이 발생할 가능성이 희박한 경우 - 발생횟수를 모델링할 때 포아송 분포가 유용하.. Statistics/Concepts(+codes) 2022. 5. 6.
distribution》binomial distribution (이항분포) * 확률분포 여태까지 총 3개에 대해서 배웠다 (z-분포 포함) 🎄 student's t-distribution distribution≫ Student's t-distribution (in-depth) ✋ 통계에 있어서 빼먹지 않아야 할, 무조건 숙지해야 할 '통계분포' 개념 오늘은 가장 많이 사용하고 꼭 알아야 할 t-분포에 대해서 알아보려 한다 사실 저번 두 포스팅에서 t-분포에의 검정통계 sh-avid-learner.tistory.com 🎄 𝜒2 distribution 𝜒2 distribution + One-Sample 𝜒2 test 😽 저번 시간에 parametric vs. non-parametric 차이에 대해서 배웠다. 😽 이번 포스팅에는 non-parametric test를 처음으로 배워보려.. Statistics/Concepts(+codes) 2022. 5. 6.
Central Limit Theorem (CLT; 중심극한정리) 🐕 통계적으로 꼭 알아야 할 개념(기초)인 CLT - 중심극한정리에 대해서 짚고 넘어가보자! concepts> * 용어 정확히 (terminology) 🐕 ①sample 데이터 수가 많아질수록 ②sample의 평균은 ③모집단에 관계없이 ④정규분포에 근사한 형태로 나타난다 - 자세히 보자 - ①sample 데이터 수가 많아질수록 🙆🏾‍♀️ sample size는 최소 30이어야 한다 ②sample의 평균 🙆🏾‍♀️ sample의 평균을 구할 수 있는 분포(모집단)여야 한다 (근데 cauchy 분포를 제외하고는 거의 없다 보면 됨!) (sample의 평균 = sample 내 sample size 개수만큼 있는 data들의 평균) ③모집단에 관계없이 🙆🏾‍♀️ 모집단이 어떤 분포이든 상관이 없다. 무조건 모든.. Statistics/Concepts(+codes) 2022. 5. 5.
Law of Large Numbers (큰 수의 법칙; LLN) 👨🏾‍🔬 sample data 수가 커질수록, sample의 통계치는 점점 모집단의 모수와 같아진다는 뜻! ★ 구체적이게 말하면 'the mean of your sample is going to converge to the true mean of the population or to the expected value of the random variable' 👨🏾‍🔬 일반적으로 sample의 수가 30개 이상이면 큰 수의 법칙이 적용된다고 한다 👨🏾‍🔬 너무나 당연한 내용이므로..! 빠르게 훑고 넘어가자 🧚🏾 concepts - wikipedia - 'In probability theory, the law of large numbers (LLN) is a theorem that describes the .. Statistics/Concepts(+codes) 2022. 5. 5.
f distribution 🤠 저번 시간에 총 두 개의 분포 student's t-distribution & 𝜒2 distribution에 대해서 배웠다 (z-distribution과 더불어!) 🧚🏾‍♂️ student's t-distribution distribution≫ Student's t-distribution (in-depth) ✋ 통계에 있어서 빼먹지 않아야 할, 무조건 숙지해야 할 '통계분포' 개념 오늘은 가장 많이 사용하고 꼭 알아야 할 t-분포에 대해서 알아보려 한다 사실 저번 두 포스팅에서 t-분포에의 검정통계 sh-avid-learner.tistory.com 🧚🏾‍♂️ 𝜒2 distribution 𝜒2 distribution + One-Sample 𝜒2 test 😽 저번 시간에 parametric vs. non.. Statistics/Concepts(+codes) 2022. 5. 4.
Two-Samples 𝜒2 test ✈️ 저번 시간에 여러 statistical hypothesis test 중 chi-square test 첫 번째인 'one sample 𝜒2 test'에 대해서 배웠다. ✈️ 이젠 그 두 번째! 훨씬 더 많이 쓰이는 two-samples 𝜒2 test에 대해 다루려고 함! 𝜒2 distribution + One-Sample 𝜒2 test 😽 저번 시간에 parametric vs. non-parametric 차이에 대해서 배웠다. 😽 이번 포스팅에는 non-parametric test를 처음으로 배워보려 함! 카이제곱 검정 첫번째 test - 적합도 검정에 대해서 알아보ZA! 🤩 (독 sh-avid-learner.tistory.com * test of independence 검정원리 ✌🏿 2개의 범주형 .. Statistics/Concepts(+codes) 2022. 5. 3.
Visualization - Graphs summarized 🤫 데이터분석에 있어서 빼놓지 말고 꼭! 알아야 할 시각화 그래프 종류들 🤫 수시로 UPDATE하며 여러 그래프들의 특징을 정리해본다 :) kind represents.. data etc. line plot trend-based (over a period of time) continuous area plot accumulated totals two or more quantities stacked / unstacked histogram frequency (x-axis: bins / y-axis: frequency) bar chart (bar graph) compare the rules of a variable at a given point in time time-series * the length of b.. Visualizations/Various Graphs 2022. 5. 2.
𝜒2 distribution + One-Sample 𝜒2 test 😽 저번 시간에 parametric vs. non-parametric 차이에 대해서 배웠다. 😽 이번 포스팅에는 non-parametric test를 처음으로 배워보려 함! 카이제곱 검정 첫번째 test - 적합도 검정에 대해서 알아보ZA! 🤩 (독립성 검정은 다음 시간에) 🤲 범주형 변수를 statistical test에 활용하는 경우 카이제곱검정이 많이 사용된다! 🤲 카이제곱은 크게 두 가지로 나눈다. ① 적합도 검정 - Goodness of Fit Test = '하나의 범주형 변수에 대해 각 범주별 확률에 관한 검정' → compare multiple observed proportions to expected probabilities → 예) 어느 지역의 주거 형태가 아파트, 오피스텔, 주택 이렇게.. Statistics/Concepts(+codes) 2022. 5. 2.
Parametric vs. Non-Parametric Tests 👩‍🔬 Parametric(모수적) & Non-Parametric(비모수적) test 종류 구별은 매우 중요하다! 👩‍🔬 간략히 말하자면 모수적 방법은 data의 분포를 가정 (주로 정규성 - normal distribution)한 채 hypothetical test를 진행하는 방식(모집단에 대한 정보를 알고 있는 채로 진행)이고 & 비모수적 방법은 그런 분포가 아예 존재하지 않는다 생각하고 진행하는 방법(모집단에 대한 정보가 없음)이다. 👩‍🔬 일단 분포를 가정하고 시작하는, 대부분의 test로 모수적 방법을 진행하는 Parametric Method의 장점들부터 알아보자 Parametric Methods - 장점 1> 🙋‍♀️ skewed되거나 특정 방향으로 치우치지 않은 분포여도 신뢰할 만한 결과를 .. Statistics/Concepts(+codes) 2022. 5. 2.
Data Visualization with Python (1/2) (from Coursera) 1. Introduction to Data Visualization Tools 1) Why Build Visuals? * for exploratory data analysis(EDA) * communicate data clearly * share unbiased representation of data * use them to support recommendations to different stakeholders * always remember → 'Less is more effective' → 'Less is more attractive' → 'Less is more impactive' ex) - simple / cleaner / less distracting / much easier to read .. Visualizations/Fundamentals 2022. 5. 1.
Decision Trees (concepts) 'Decision Trees (DTs) are a non-parametric supervised learning method used for classification and regression. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. A tree can be seen as a piecewise constant approximation.' ▩ 앞서 소개했던 model list ▩ 👓 SLR 단순선형회귀모델 👓 MLR 다중선형회귀모델 👓 RR 릿지회귀모델 👓 LR 로지스틱회귀모델 🤠 이젠 reg.. Machine Learning/Models (with codes) 2022. 4. 27.
Types of Errors in Hypothesis Testing 👄 이번 포스팅에서는 우리가 무조건 마주하게 되는 두 가지 ERROR! 타입에 대해서 알아보려 한다! 🤝 👄 전체 모집단 population에 대한 충분한 정보가 제공되지 않았기 때문에! 우리는 sample을 이용하여 전체 population에 대한 추론을 하는 과정을 거친다. 이런 추론 과정을 일종의 hypothesis testing이라 하며, 이 testing 과정에서 우리는 당연히 sample만을 가지고 추론하기에 여러 error에 마주치게 됨 Hypothesis Test: H0 & Ha - concepts 1. Hypothesis Testing? → Null Hypothesis(H0) 🙆‍♂️ 1▶ Create a Hypothesis (without stating H0) ▷ (if data giv.. Statistics/Concepts(+codes) 2022. 4. 27.
ANOVA & (One-Way ANOVA + w/code) 🧐 우리는 한 sample 집단의 평균이 모집단의 평균이 같은 지를 검정했고 (one-sample t-test) T-test 👉 《One-sample T-test (w/ python code)》 👒 저번 시간에 statistics에서 빼놓을 수 없는 '가설검정 TEST - Hypothesis Test'에 대해 배웠다. Hypothesis Test: H0 & Ha - concepts 1. Hypothesis Testing? → Null Hypothesis(H0) 🙆‍♂️ 1▶ Creat.. sh-avid-learner.tistory.com 🧐 두 sample 집단평균끼리의 차이가 없는 지 있는 지도 검정했다 (two-samples 'independent' t-test) T-test 👉《Two-samples.. Statistics/Concepts(+codes) 2022. 4. 25.
distribution≫ Student's t-distribution (in-depth) ✋ 통계에 있어서 빼먹지 않아야 할, 무조건 숙지해야 할 '통계분포' 개념 오늘은 가장 많이 사용하고 꼭 알아야 할 t-분포에 대해서 알아보려 한다 사실 저번 두 포스팅에서 t-분포에의 검정통계량 & p-value를 사용해 hypothesis test 두 가지를 진행한 바 있다. T-test 👉 《One-sample T-test (w/ python code)》 👒 저번 시간에 statistics에서 빼놓을 수 없는 '가설검정 TEST - Hypothesis Test'에 대해 배웠다. Hypothesis Test: H0 & Ha - concepts 1. Hypothesis Testing? → Null Hypothesis(H0) 🙆‍♂️ 1▶ Creat.. sh-avid-learner.tistory.com .. Statistics/Concepts(+codes) 2022. 4. 25.
Logistic Regression Model (w/code) 👋🏻 저번 시간에 Logistic Regression Model이 무엇인지, 기초 개념에 대해서 학습했다. (↓↓↓↓↓↓) Logistic Regression Model (concepts) ** ML 개요 포스팅에서 다룬 'supervised learning'은 아래와 같은 절차를 따른다고 했다 (↓↓↓↓하단 포스팅 참조 ↓↓↓↓) ML Supervised Learning → Regression → Linear Regression 1. ML 기법 구분 💆.. sh-avid-learner.tistory.com 🙏 이젠 python으로 model을 직접 구현해보려 한다! - binary classification problem solving을 위해 필요한 모델이라 배움 - ++ scikit-learn 사용 .. Machine Learning/Models (with codes) 2022. 4. 25.
Data Analysis with Python (2/2) (from Coursera) 4) Model Development * A Model = a mathematical equation used to predict a value given one or more other values - Relating one or more independent variables to dependant variables (ex) 'highway-mpg' -> model -> 'predicted price') - the more relevant data have, the more accurate the model is - more data is important - different types of model) simple, multiple, and polynomial regression (1) Simpl.. Computer Science/Basics 2022. 4. 24.
Polynomial Regression Model * Linear Regression Model - 즉, y 종속변수와 x 독립변수(1개 또는 2개 이상)들 간의 관계가 선형인 경우를 뜻한다. 즉, x 독립변수의 증감 변화에 따라 y도 이에 상응하여 증감이 일정한 수치의 폭으로 변화한다. 🧏‍♀️ 우리는 크게 3가지의 Linear Regression Model에 대해 배웠다. 1. SLR (단순선형회귀모델) Simple Linear Regression (concepts) ** 우리는 저번시간에 Supervised Learning - Regression - Linear Regression까지 concepts에 대해 배웠다 (↓↓↓↓↓↓ 하단 포스팅 참조 ↓↓↓↓↓↓) ML Supervised Learning → Regression → Linear Regr.. Machine Learning/Models (with codes) 2022. 4. 24.
Logistic Regression Model (concepts) ** ML 개요 포스팅에서 다룬 'supervised learning'은 아래와 같은 절차를 따른다고 했다 (↓↓↓↓하단 포스팅 참조 ↓↓↓↓) ML Supervised Learning → Regression → Linear Regression 1. ML 기법 구분 💆🏽‍♂️ 답이 주어져 있는 Supervised Learning 🙅🏽 답이 주어져 있지 않은 UnSupervised Learning → Simple Linear Regression(단순선형회귀)은 답이 주어져 있는 Dependent variable & In.. sh-avid-learner.tistory.com - 지도학습의 절차 - ♣ 그리고 y label의 종류에 따라 classification & regression로 구분이 된다고 하였다.. Machine Learning/Models (with codes) 2022. 4. 24.
Data Analysis with Python (1/2) (from Coursera) 1. Importing Datasets * Why Data Analysis? - data is everywhere - helps us answers from data - discovering useful info / answering questions / predicting future or the unkown * Understanding the Data - target(label) = the name of the attribute that we want to predict - CSV(Comma Separated Value) file = source of data * Python Packages for DS (1) Scientific Computing Libraries * Pandas) data stru.. Computer Science/Basics 2022. 4. 22.