writing defination of LogReg and PCA