Showing posts with label Research. Show all posts
Showing posts with label Research. Show all posts

Sunday, March 30, 2014

DCT 유도, Discrete Cosine Transform, DCT proof

DCT 유도 배경.

 x(n)의 DFT (Discrete Fourier Transform) 결과인 X(k)는 복소수 값을 가지기 때문에 그래프로 표현할 때 불편하다. 그런데 x(n)이 실수이고, X(k)의 값도 실수라면 편할 것이다. 간단히 생각해 보면 exp 대신에 cos을 사용하면 될 것이다. (DCT)

DCT는 DCT-1,2,3,4로 네가지가 있는데 보통 DCT-2를 많이 사용한다.


DCT 목표.
 실수 x(n)에 대한 주파수 변환 결과 역시 실수가 되는 것.


DCT 유도 방법.
 실수 x(n)이 대칭 성질을 가지면 DFT 결과인 X(k)는 실수라는 성질을 이용한다.
  1. 임의의 실수 x(n)이 주어졌을 때, 주어진 신호의 성질은 유지하면서 대칭 성질을 가지는 새로운 신호 s(n)을 정의
  2. DFT를 구함
  3. 정규화 과정을 거침 (두 영역에서의 에너지를 동일하게 하기 위함. Parserval 정리)


주의할 점.

 DFT와 다르게 DCT의 k축은 정확한 주파수를 의미하는 것은 아니고, 단지 주파수와 관련있는 새로운 변수이다.


장점.
 DCT는 DFT에 비하여 에너지 집중화 (compact)가 높다. 실수 x(n)이 시간 영역에서 높은 상관도를 가지고, 전체 에너지가 시간 영역에 넓게 분포하면, 전체 에너지가 일부 k에 집중되는 성질을 가진다.

 N-point DCT에서 에너지가 집중되어 있는 L개의 X(k)를 선택하고 싶은 경우, MSE (mean square error)를 이용하여 평가한다.





Monday, March 24, 2014

How to convert a binary MMF file to ASCII MMF file

In HTS, 're_clustered_all.mmf.1mix' file is binary format.

In order to convert this file to ASCII format,
use the HTK's HHEd !!!


HHEd -A -C configure_file -H input_binary_mmf_file -w output_ascii_mmf_file empty_edit_script_file hmm_model_list_file

example)
/home/HHEd -A -C /home/trn.cnf -D -T 1 -H /home/re_clustered_all.mmf.1mix -w /home/output_ascii /home/null.hed /home/tiedlist

Thursday, March 20, 2014

Overcomplete

Describing a frame having a set of functions more than a basis.

예를 들어,
같은 크기의 사각형(a basis)이 두개가 있을 때
이 두개의 사각형은 각각의 사각형을 나타내는 것 뿐만 아니라
합쳐져서(a set of functions) 직사각형을 표현할 수도 있다.

Tuesday, February 18, 2014

Generative model vs. Discriminative model (2) from wiki

Generative model

From Wikipedia, the free encyclopedia
In probability and statistics, a generative model is a model for randomly generating observable data, typically given some hidden parameters. It specifies a joint probability distribution over observation and label sequences. Generative models are used in machine learning for either modeling data directly (i.e., modeling observations draws from a probability density function), or as an intermediate step to forming a conditional probability density function. A conditional distribution can be formed from a generative model through Bayes' rule.
Shannon (1948) gives an example in which a table of frequencies of English word pairs is used to generate a sentence beginning with "representing and speedily is an good"; which is not proper English but which will increasingly approximate it as the table is moved from word pairs to word triplets etc.
Generative models contrast with discriminative models, in that a generative model is a full probabilistic model of all variables, whereas a discriminative model provides a model only for the target variable(s) conditional on the observed variables. Thus a generative model can be used, for example, to simulate (i.e. generate) values of any variable in the model, whereas a discriminative model allows only sampling of the target variables conditional on the observed quantities. Despite the fact that discriminative models do not need to model the distribution of the observed variables, they cannot generally express more complex relationships between the observed and target variables. They don't necessarily perform better than generative models at classification and regression tasks.
Examples of generative models include:
If the observed data are truly sampled from the generative model, then fitting the parameters of the generative model to maximize the data likelihood is a common method. However, since most statistical models are only approximations to the true distribution, if the model's application is to infer about a subset of variables conditional on known values of others, then it can be argued that the approximation makes more assumptions than are necessary to solve the problem at hand. In such cases, it can be more accurate to model the conditional density functions directly using a discriminative model (see above), although application-specific details will ultimately dictate which approach is most suitable in any particular case.

Discriminative model

From Wikipedia, the free encyclopedia
Jump to: navigationsearch
Discriminative models, also called conditional models, are a class of models used in machine learning for modeling the dependence of an unobserved variable y on an observed variable x. Within a probabilistic framework, this is done by modeling the conditional probability distribution P(y|x), which can be used for predicting y from x.
Discriminative models, as opposed to generative models, do not allow one to generate samples from the joint distribution of x and y. However, for tasks such as classification and regression that do not require the joint distribution, discriminative models can yield superior performance.[1][2] On the other hand, generative models are typically more flexible than discriminative models in expressing dependencies in complex learning tasks. In addition, most discriminative models are inherently supervised and cannot easily be extended to unsupervised learning. Application specific details ultimately dictate the suitability of selecting a discriminative versus generative model.
Examples of discriminative models used in machine learning include:

Generative model vs. Discriminative model

그림 출처 : http://hgycap.tistory.com/10


위의 그림이 generative(생성)와 discriminative(판별)의 차이를 가장 잘 설명해주고 있다.

1.
둘다 궁극적 목표는 p(y|x)를 구하는 것이지만 직접적으로 구하느냐 간접적으로 구하느냐 차이가 있다.

2.
Generative model은 클래스 (y)에 해당하는 데이터 (x)의 분포를 모델링하기 때문에 샘플 데이터를 생성할 수 있지만,
discriminative model은 샘플 데이터를 생성하지 못한다.

3.
Generative model은 각 클래스의 데이터들의 분포에 초점을 맞추는 반면,
discriminative model은 클래스간의 차이점에 초점을 맞춘다.

예) Generative model은 데이터를 Gaussian model로 모델링해서 mean을 구하는 것이라고 볼 수 있다.

Supervised vs. Unsupervised Learning


  • Supervised : data with label/target information
  • Unsupervised : data without label/target information