function for splitting dataset into subfeaturesset