Function for selecting a subset of parameters from X, which minimize the in sample error measure. Algorithm acts in a greedy manner, either adding one parameter at a time (forward), or removing one at a time (backward). Args: X (np.ndarray): Training data of shape[n_sa
(X, y, model, parameters, error_measure,
direction='forward')