خرید بک لینک

Vote count: 0

I have a machine leaing problem and want to optimize my SVC estimators as well as the feature selection.

For optimizing SVC estimators I use essentially the code from the docs. Now my question is, how can I combine this with recursive feature elimination cross validation (RCEV)? That is, for each estimator-combination I want to do the RCEV in order to determine the best combination of estimators and features.

I tried the solution from this thread, but it yields the following error:

ValueError: Invalid parameter C for estimator RFECV. Check the list of available parameters with `estimator.get_params().keys()`.

My code looks like this:

tuned_parameters = [{'keel': ['rbf'], 'gamma': [1e-4,1e-3],'C': [1,10]},
                    {'keel': ['linear'],'C': [1, 10]}]

estimator = SVC(keel="linear")
selector = RFECV(estimator, step=1, cv=3, scoring=None)
clf = GridSearchCV(selector, tuned_parameters, cv=3)
clf.fit(X_train, y_train)

The error appears at clf = GridSearchCV(selector, tuned_parameters, cv=3).

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 5 مرداد 1395 ساعت: 20:52

صفحه بندی