본문 바로가기
728x90
반응형

분류 전체보기268

[Data Science] Data Preprocessing (5) - Data Transformation Data Transformationattribute의 모든 값을 새로운 값으로 매핑하는 함수를 의미한다.Normalizationmin-max normalizationz-score normalizationDiscretization: concept of hierarchy climbingetc NormalizationMin-max normalization: $[a, b]$로 변환$M = \max(A), \ m = \min(A)$라 하면\[ v' = \cfrac{v - m}{M- m}(b- a) + a\] Z-score normalization\[ v' = \cfrac{v - \mu_A}{\sigma_A} \] Example다음과 같이 5개의 데이터에 대하여, 각 물음의 방법으로 normalize하여라.\[ 2.. 2023. 3. 28.
[Data Science] Data Preprocessing (4) - Data Reduction StrategyDimensionality reductionwavelet transformPincipal components analysis (PCA)Feature subset selection, feature creationMunerosity reduction (data reduction)regressionhistograms, clustering, samplingdata cube aggregationData compresison Curse of dimensionality차원이 증가하면 데이터는 점점 sparse하게 공간을 차지하게 된다.sparse해지기 때문에 앞서 배운 distance가 작아져 데이터들간의 distance가 의미가 거의 없어지게 된다.차원이 $d$인 hypercube(초입방체) 내부에 .. 2023. 3. 28.
[Data Science] Data Preprocessing (3) - Data Integration Data Integration다양한 데이터 소스들을 data warehouse에 종합하는 작업을 말한다.이 때 다양한 이슈들이 발생할 수 있다.예를 들어, schema integration, entity resolution, redundancy, inconsistency  Schema integrationheterogeneous shema들을 통합해야 한다.이때 같은 의미를 갖는데, 스키마에 따라 다르게 정의될 수 있는데, 이를 통합한다.A.cus_id는 B.custumer_id와 동일하게 고객식별번호이다.Entity resolution다양한 source에 기록된 record들을 식별해야한다. 특히 real-world entity에 동일하게 대응되는 고유명사(사람 이름 등)에서 많이 발생한다.Redund.. 2023. 3. 28.
[Data Science] Data Preprocessing (2) - Data Cleaning 실제 세상의 데이터는 매우 더럽다. (dirty) 아래 여러 이유가 있다.Incompletemissing value가 종종 존재한다.예를 들어, 분석가는 고객의 주소가 중요하다고 생각하여 데이터를 조회했지만, 처음 DB를 구축한 사람은 그것이 중요하지 않다고 생각할 수 있기 때문이다.Noisynoise, error, outlierssalary = -10 과 같이 음수가 될 수 없는 attribute에 음수가 저장될 수 있다.Inconsistent값 자체는 문제가 없지만, 다른 attribute와 비교했을 때 오류가 있는 경우age=40인데, birthday=03/01/2020 인경우, age와 birthday는 문제없지만 현재 2023년과 비교했을 때 40세는 명백한 오류다.과거에는 평점을 1, 2, 3.. 2023. 3. 28.
다항분포, Multinomial Distribution Multinomial Distribution, 다항분포categorical variable에 대한 모델링에 유용한 분포다. $k$개의 범주(category)가 있고, $s$개의 반응(response)에 대하여 $P(s=i)=\theta_i$로 표기할 수 있다.$X_i$는 $n$개의 반응(response) 중에서 $s=i$인 반응의 개수이다. $(X_1, X_2, \dots, X_n) \sim \text{Multinomial}(n, \theta_1, \theta_2, \dots, \theta_k)$ \[ p(x, \dots, x_n) = \dbinom{n}{x_1\dots x_k}\theta_1^{x_1} \cdots \theta_k^{x_k} = \cfrac{n!}{x_1! \times \cdots \t.. 2023. 3. 23.
조건부확률과 독립 (Conditioning, Independence) Section 8. Conditioning and Independence. 조건부확률과 독립Conditional distribution of $Y$ given $X=x$\[ P(Y \in B | X=x) = \cfrac{P(Y \in B, X=x)}{P(X=x)} \]Conditional distribution - Discrete\[ p_{Y|X}(y|x) = \cfrac{p_{X,Y}(x,y)}{p_X(x)} \]Conditional distribution - Continuousconditional density of $Y$, given $X=x$\[ f_{Y|X}(y|x) = \cfrac{f_{X,Y}(x,y)}{f_X(x)} \]따라서 확률 $P(a \le Y \le b|X=x)$를 구하면\[ P(.. 2023. 3. 23.
728x90
반응형