具體就是:
在函式呼叫的引數中使用for in 輸入引數值
scores = parallel(
delayed(_fit_and_score)(
clone(estimator), X, y, scorers, train, test, verbose, None,
fit_params, return_train_score=return_train_score,
return_times=True, return_estimator=return_estimator,
error_score=error_score)
for train, test in cv.split(X, y, groups))
這個parallel是Parallel的實體,它直接被當作函式呼叫。delayed是個函式,他的引數是傳入一個函式。_fit_and_score是傳入的函式
問題:
1、后面多了個for in 給train,test賦值。我想知道這個是個什么原理。
2、delayed的引數是個函式,為什么傳入的_fit_and_score和它引數要用"()"括起來
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/96605.html
上一篇:tensorflow 環境下安裝jupyter 時候出錯
下一篇:貼一個“自動出題器”python
