Add parameter checking
Finish refactoring _internal_linregr_train_hetero