Spatio-Temporal Drift Detection
The Spatio Drift Detection Test is designed to detect and understand the localized changes in data distribution revealing how data evolves geographically over time.
Execute Test:
Initialize Drift Detection Rules:
Use the
DriftDetectionRules()
function to set up the framework for anomaly detection.Add rules using
rules.add()
with parameters defining the metric for drift detection and the threshold for identifying significant drift.
Configure Test Settings:
Clearly define both the training (historical data) and field (current data) datasets to analyze shifts over time and space.
Include metadata parameters like
primary_metadata
to ensure geographical variables are accounted for, and setprimary_metadata_type
to "categorical" for accurate categorization.
Execute Test:
Implement the
spatio_temporal_drift_test()
with necessary parameters:test_session
: The session managing tests.train_dataset_name
andfield_dataset_name
: Datasets to compare.rules
: Configured rules for detection.test_name
: Name of the test for tracking.
Add Test to Session:
Register the configured test with the session using
test_session.add()
.
Run Test:
Start test execution across the session with
test_session.run()
.
By following these steps, you have successfully set up and executed an Spatio-Temporal Drift Test on the RagaAI Testing Platform.
Post-execution, review the results to identify and remove or handle duplicates as necessary.
Analyzing Test Results:
In Distribution Data Points: Identified as "in distribution" when they fall within the predefined threshold, indicating alignment with the spatio-temporal data.
Out of Distribution Data Points: Labelled as "out of distribution" if they surpass the threshold, indicating potential drift that requires a thorough examination of the spatio-temporal data.
![](https://docs.raga.ai/~gitbook/image?url=https%3A%2F%2F1811327582-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYbIiNdp1QbG4avl7VShw%252Fuploads%252FeJtQM7VYjYCaBlLrGVyh%252FScreenshot%25202024-05-09%2520at%25204.12.53%2520PM.png%3Falt%3Dmedia%26token%3De71324ad-4680-49cd-b76f-b006af20b4de&width=768&dpr=4&quality=100&sign=167b3db0&sv=1)
Interpreting Test Results:
Embedding View: Utilize the Interactive Embedding View to visualize and understand the drift between spatio-temporal datasets interactively.
Data Grid View: Helps visualise annotations with spatio-temporal images sorted by mistake scores.
Image View: Delve into detailed analyses for each image.
Following these guidelines, you can effectively utilise Spatio Temporal Drift Detection in RagaAI to maintain the integrity and relevance of your models over time.
Last updated