本文整理匯總了Python中joblib.Parallel.head方法的典型用法代碼示例。如果您正苦於以下問題:Python Parallel.head方法的具體用法?Python Parallel.head怎麽用?Python Parallel.head使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類joblib.Parallel
的用法示例。
在下文中一共展示了Parallel.head方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: GetPriceData
# 需要導入模塊: from joblib import Parallel [as 別名]
# 或者: from joblib.Parallel import head [as 別名]
return ret
if __name__ == '__main__':
ticks = [['000001', '000300']]
index = True
# ticks = ['300311', '000917']
ins = GetPriceData(sid=ticks, index=True, data_source=['mysql', 'remote1'])
start_date = '2015-07-01'
end_date = '2015-12-31'
from joblib import Parallel, delayed
FILE_NAME = 'proper_n_config_workflow.csv'
# params = generate_param_config(ticks, isindex=True, look_back=519,
# start_date=start_date,
# data_source=['myql', 'remote1'])
# params.to_csv(FILE_NAME)
get_config = make_config(FILE_NAME)
final = Parallel(n_jobs=4, verbose=True)(
delayed(predict)(tick, index, look_back=519,
start_date=start_date, end_date=end_date,
get_config_func=get_config)
for tick in ticks)
final = pd.concat(final)
print(final.head())