Initialize theta matrix