Skip to Main Content
机器学习设计模式
book

机器学习设计模式

by Valliappa Lakshmanan, Sara Robinson, Michael Munn
September 2022
Beginner to intermediate content levelBeginner to intermediate
386 pages
7h 36m
Chinese
Southeast University Press
Content preview from 机器学习设计模式
302
6
6
-
15
:特征数据既可以使用历史特征进行离线检索(用于模型训练),也可以在线检索(用
于服务)。
这些部署是通过单独的在线和批处理客户端来访问的:
_feast_online_client = Client(serving_url='localhost:6566')
_feast_batch_client = Client(serving_url='localhost:6567',
core_url='localhost:6565')
批处理服务。
为了训练模型,历史特征检索由
BigQuery
支持,并使用
.get_batch_
features(...)
和批处理服务客户端进行访问。在这个案例中,我们向
Feast
提供了
一个包含实体和时间戳的
pandas
数据帧,特征数据将与它连接。这使得
Feast
基于
所请求的特征来产生一个时间点正确的数据集:
#
创建所有实体和时间戳的数据帧
entity_df
= pd.DataFrame(
{
"datetime": taxi_df.datetime,
"taxi_id": taxi_df.taxi_id,
}
)
为了检索历史特征,特征集中的特征通过特征集名称和特征名称来引用,用冒号分隔,
例如:
FS_NAME = taxi_rides
可复现设计模式
303
model_features = ['pickup_lat',
'pickup_lon', ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
数据科学原理

数据科学原理

Posts & Telecom Press, Sinan Ozdemir
Rust程序设计

Rust程序设计

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall

Publisher Resources

ISBN: 9787564196776