Я работаю в Pyspark. Я использую GridSearchCV с алгоритмом ALS
, но я получил сообщение об ошибке ... любая помощь?
Спасибо
als = ALS(maxIter=5, regParam=0.01, userCol="userId", itemCol="movieId", ratingCol="rating",
coldStartStrategy="drop")
param_grid = {'rank': [10,50,100,150],
'regParam': [0.01,0.05,0.1,0.15]}
# run grid search
grid_search = GridSearchCV(als, param_grid=param_grid, scoring='accuracy')
start = time()
model_gridSeach=grid_search.fit(features_train,lable_train)
print("GridSearchCV took %.2f seconds for %d candidate parameter settings."
% (time() - start, len(grid_search.cv_results_['params'])))
report(grid_search.cv_results_)
вывод:
Cannot clone object 'ALS_855af664ffc8' (type <class 'pyspark.ml.recommendation.ALS'>):
it does not seem to be a scikit-learn estimator as it does not implement a 'get_params' methods.