Data Science/Python
[python] ML Model Parameter Optimization : GridSearchCV
from sklearn.model_selection import GridSearchCV from sklearn.neighbors import KNeighborsClassifier from sklearn.pipeline import Pipeline from sklearn.preprocessing import MinMaxScaler knn_pipe = Pipeline([('mms', MinMaxScaler()), ('knn', KNeighborsClassifier())]) params = [{'knn__n_neighbors': [3, 5, 7, 9], 'knn__weights': ['uniform', 'distance'], 'knn__leaf_size': [15, 20]}] gs_knn = GridSearc..
2022. 9. 17. 06:24
최근댓글