LDA algorithm, variable construction