initQ function

initQ - generates classification matrix