If it is so, please do not duplicate code. Use a method that is called by both apply_regression and apply_multiclass, or merge these two methods into one and use the method get_label_type from CLabels to find out if you should use to_multiclass or to to_regression.