10/2/2023 0 Comments Sequential search python![]() Score = self._calc_score(X_train.values, X_test.values, y_train.values, y_test.values,indices) ![]() # Add a feature one by one until k_features is reachedĪdd the remaining features one-by-one from the remaining feature setĬalculate the score for every feature combinations # Find the single feature having best score Score = self._calc_score(X_train.values, X_test.values, y_train.values, y_test.values, p) Which gives the maximum model performance Iterate through the feature space to find the first feature Max_indices = tuple(range(X_train.shape)) Y_train - Training label Pandas dataframeĭef fit(self, X_train, X_test, y_train, y_test): ![]() Instantiate with Estimator and given number of featuresĭef _init_(self, estimator, k_features):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |