جلب سمات صحيحة لنقطة زمنية محددة
تجنّب تسرّب التسميات عند إنشاء مجموعات التدريب.
جلب سمات صحيحة لنقطة زمنية محددة درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Time-Travel Problem
To train fairly, each label needs the feature values that were known before the event, not after. Mixing up time leaks the future into your model. ⏳
What Label Leakage Is
Label leakage happens when a feature secretly carries information from after the prediction moment. The model looks brilliant offline, then flops live.
A Concrete Trap
Joining today's account balance onto a loan made last year is a classic leak. The right value is the balance as it was at loan time.
Point-in-Time Joins
A point-in-time join matches each event to the latest feature value that existed at or before that event's timestamp. No peeking ahead.
The Entity DataFrame
You hand Feast an entity dataframe: entity keys plus an event timestamp for each training row you want features for.
entity_df = pd.DataFrame({"driver_id": [1001], "event_timestamp": [pd.Timestamp("2024-01-01")]})Get Historical Features
Call get_historical_features with that dataframe, and Feast does the time-correct join against the offline store for you.
store.get_historical_features(entity_df=entity_df, features=["driver_stats:conv_rate"])Turn It Into a Dataset
Call to_df on the result to get a training dataframe where every row carries correct, leak-free feature values.
training_df = job.to_df()TTL Guards Freshness
If the nearest value is older than the feature's ttl, Feast leaves it null instead of attaching something out of date.
Same Logic, Two Stores
Historical reads hit the offline store for training; online reads hit the online store for serving. The feature definition stays identical, so there is no skew.
Why It Matters
Point-in-time correctness is what makes offline scores you can trust. Skip it and your validation numbers are a comforting lie. 🎯
The Big Picture
Define once, materialize for speed, and join by time for training. Together these give you a feature store that is fast, consistent, and honest.
Quick Check
Why use a point-in-time join when building a training set?
Recap
You used point-in-time joins via get_historical_features to build leak-free training sets, while the same definitions serve online. That is a complete feature store loop. 🏁
الأسئلة الشائعة
هل درس «جلب سمات صحيحة لنقطة زمنية محددة» مجاني؟
نعم — نص درس «جلب سمات صحيحة لنقطة زمنية محددة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.
ماذا ستتعلم في «جلب سمات صحيحة لنقطة زمنية محددة»؟
تجنّب تسرّب التسميات عند إنشاء مجموعات التدريب. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟
لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «جلب سمات صحيحة لنقطة زمنية محددة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟
نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- لماذا توجد مخازن السمات
- تحديد عروض السمات باستخدام Feast
- تجسيد السمات في مخزن عبر الإنترنت
- جلب سمات صحيحة لنقطة زمنية محددة