本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
特征传送
本文档介绍了可供您选择用于将特征提供给 BigQuery ML 模型训练和推理的方案。对于所有方案,您都必须先将特征保存在 BigQuery 表中,这是先决条件的第一步。
时间点正确性
用于训练模型的数据通常内置了时间依赖项。为时间敏感特征创建特征表时,请添加时间戳列,以表示每行在给定时间存在的特征值。随后在查询这些特征表中的数据时,您可以使用时间点查询函数,以确保训练和传送之间不存在数据泄露情况。此过程可实现时间点正确性。
在检索时间敏感特征时,使用以下函数指定截止时间点:
在 BigQuery ML 中传送特征
如需在 BigQuery ML 中训练模型和执行批量推理,您可以使用时间点正确性部分中所述的某个时间点查找函数来检索特征。您可以将这些函数包含在 CREATE MODEL
语句的 query_statement
子句中以进行训练,或者包含在适当的表值函数(例如 ML.PREDICT
)的 query_statement
子句中以进行服务。
使用 Vertex AI Feature Store 传送特征
如需向在 Vertex AI 中注册的 BigQuery ML 模型传送特征,您可以使用 Vertex AI Feature Store。Vertex AI Feature Store 以 BigQuery 中的特征表为基础,以低延迟管理和传送特征。您可以使用在线传送实时检索特征以进行在线预测,也可以使用离线传送来检索特征以用于模型训练。
如需详细了解如何准备要在 Vertex AI Feature Store 中使用的 BigQuery 特征数据,请参阅准备数据源。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[[["Features must be saved in BigQuery tables before they can be used for BigQuery ML model training and inference."],["Including a timestamp column in feature tables allows for point-in-time correctness, preventing data leakage between training and serving."],["`ML.FEATURES_AT_TIME` and `ML.ENTITY_FEATURES_AT_TIME` functions are used to specify point-in-time cutoffs when retrieving time-sensitive features."],["BigQuery ML models can use point-in-time lookup functions in `CREATE MODEL` statements or in table-valued functions like `ML.PREDICT` to retrieve features for training and batch inference."],["Vertex AI Feature Store can be used to manage and serve features with low latency for BigQuery ML models registered in Vertex AI, supporting both real-time online prediction and offline model training."]]],[]]