## What's new? |

## python 공부 - 컴퓨터 |

editing distance, levenshtein

sudo pip install python-levenshtein

ipython

import Levenshtein

Levenshtein.editops('obama','romney')

결과:

[('insert', 0, 0),

('replace', 1, 2),

('replace', 2, 3),

('replace', 3, 4),

('replace', 4, 5)]

이걸 응용하면 단어 → 숫자, 띄어쓰기제거를 통해서 단어 단위 Align 가능.

Error=Levenshtein.editops('134','1342')

for err in Error:

print err[0]

물론 multiple alternative 가 존재 하는 상황에서는 추가 작업이 필요하다.

sudo pip install python-levenshtein

ipython

import Levenshtein

Levenshtein.editops('obama','romney')

결과:

[('insert', 0, 0),

('replace', 1, 2),

('replace', 2, 3),

('replace', 3, 4),

('replace', 4, 5)]

이걸 응용하면 단어 → 숫자, 띄어쓰기제거를 통해서 단어 단위 Align 가능.

Error=Levenshtein.editops('134','1342')

for err in Error:

print err[0]

물론 multiple alternative 가 존재 하는 상황에서는 추가 작업이 필요하다.

written time : 2017-09-01 13:40:15.0

## 살 것들 - 일상 |

HDD 케이스, 도킹스테이션

written time : 2017-08-29 20:33:36.0

## Variation Inflation Factor - 컴퓨터 |

Unfortunately, not all collinearity problems can be

detected by inspection of the correlation matrix: it is possible for collinearity to exist between three or more variables even if no pair of variables

has a particularly high correlation. We call this situation multicollinearity.

multiInstead of inspecting the correlation matrix, a better way to assess

collinearity is to compute the variance inflation factor (VIF). The VIF is

the ratio of the variance of βˆj when fitting the full model divided by the

variance of βˆj if fit on its own. The smallest possible value for VIF is 1,

which indicates the complete absence of collinearity. Typically in practice

there is a small amount of collinearity among the predictors. As a rule of

thumb, a VIF value that exceeds 5 or 10 indicates a problematic amount of

collinearity.

공식은 ISL Chapter 3. Linear Regression 3.3 마지막 부분 p. 102

detected by inspection of the correlation matrix: it is possible for collinearity to exist between three or more variables even if no pair of variables

has a particularly high correlation. We call this situation multicollinearity.

multiInstead of inspecting the correlation matrix, a better way to assess

collinearity is to compute the variance inflation factor (VIF). The VIF is

the ratio of the variance of βˆj when fitting the full model divided by the

variance of βˆj if fit on its own. The smallest possible value for VIF is 1,

which indicates the complete absence of collinearity. Typically in practice

there is a small amount of collinearity among the predictors. As a rule of

thumb, a VIF value that exceeds 5 or 10 indicates a problematic amount of

collinearity.

공식은 ISL Chapter 3. Linear Regression 3.3 마지막 부분 p. 102

written time : 2017-08-20 21:15:33.0