@pagal_guy wrote:
hello,
I am trying to solve the https://www.kaggle.com/c/home-depot-product-search-relevance problem and in one place I am using:
rfr = RandomForestRegressor(n_estimators = 500, n_jobs = -1, random_state = 2016, verbose = 1) tfidf = TfidfVectorizer(ngram_range=(1, 1), stop_words='english') tsvd = TruncatedSVD(n_components=10, random_state = 2016) clf = pipeline.Pipeline([ ('union', FeatureUnion( transformer_list = [ ('cst', cust_regression_vals()), ('txt1', pipeline.Pipeline([('s1', cust_txt_col(key='search_term')), ('tfidf1', tfidf), ('tsvd1', tsvd)])), ('txt2', pipeline.Pipeline([('s2', cust_txt_col(key='product_title')), ('tfidf2', tfidf), ('tsvd2', tsvd)])), ('txt3', pipeline.Pipeline([('s3', cust_txt_col(key='product_description')), ('tfidf3', tfidf), ('tsvd3', tsvd)])), ('txt4', pipeline.Pipeline([('s4', cust_txt_col(key='brand')), ('tfidf4', tfidf), ('tsvd4', tsvd)])) ], transformer_weights = { 'cst': 1.0, 'txt1': 0.5, 'txt2': 0.25, 'txt3': 0.0, 'txt4': 0.5 }, n_jobs = -1 )), ('rfr', rfr)]) param_grid = {'rfr__max_features': [10], 'rfr__max_depth': [20]} model = grid_search.GridSearchCV(estimator = clf, param_grid = param_grid, n_jobs = -1, cv = 5, verbose = 20, scoring=RMSE) model.fit(X_train, y_train)However I am getting an error:
Can someone please help me resolve this??
Posts: 1
Participants: 1
