Data Leakage Test
The Data Leakage Test results provide insights into the presence of data leakage from the training dataset to the test/validation dataset.
Execute Test:
The code executes the Data Leakage Test:
Initialize Data Leakage Rules:
Use the
LQRules()
function to initialize the rules for the test.
Add Rules:
Use the
rules.add()
function to add specific rules with the following parameters:metric
: The metric used to detect data leakage (e.g., overlapping_samples).metric_threshold
: The threshold for the metric, indicating the degree of overlap required to flag data leakage.
Configure Test Run:
Define the test run configuration, including the project name, test name, and session credentials.
Execute Data Leakage Test:
Use the
data_leakage_test()
function to execute the test with the following parameters:test_session
: The session object managing tests.test_name
: Name of the test run.train_dataset_name
: Name of the training dataset.dataset_name
: Name of the field dataset (test/validation dataset).type
: Type of test, which should be set to "data_leakage".output_type
: Type of output expected from the model.train_embed_col_name
: Name of the column containing embeddings in the training dataset.embed_col_name
: Name of the column containing embeddings in the field dataset.rules
: Predefined rules for the test.
Add Test to Session:
Use the
test_session.add()
function to register the test with the test session.
Run Test:
Use the
test_session.run()
function to start the execution of all tests added to the session, including the Data Leakage Test.
By following these steps, you can effectively detect data leakage from the training dataset to the test/validation dataset using the Data Leakage Test.
Interpreting Test Results for Data Leakage Test
![](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%252FPoD2LCTuZHQwtdEQn4HF%252Fimage.png%3Falt%3Dmedia%26token%3D65d8483e-6b2f-4989-b5ed-ffc605f11488&width=768&dpr=4&quality=100&sign=cb28df84&sv=1)
Donut Chart
The donut chart displays the proportion of leaked and genuine data points detected by the test.
Venn Diagram
The Venn diagram illustrates the relationship between the training dataset and the test/validation dataset.
The overlap region in the diagram represents the data points that are present in both datasets, indicating potential data leakage.
Understand the overall extent and relationship of data leakage between the training and test/validation datasets.
Embedding View
The Embedding View allows users to analyse patterns and clusters in the leaked data points.
It provides insights into the distribution and similarity of embeddings associated with leaked data points.
Data Grid
The Data Grid presents detailed information about the leaked data points, including image identifiers, labels, and confidence scores.
Users can explore individual data points and assess the characteristics of leaked 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%252FlwnApirdciYDRqA0c20s%252Fimage.png%3Falt%3Dmedia%26token%3D473407c7-4e24-412a-bfd3-1c5df4e6b997&width=768&dpr=4&quality=100&sign=f4d513c2&sv=1)
Image View
The Image View allows users to visualise leaked data points alongside their annotations and original images.
It provides a detailed examination of individual leaked data points for further analysis.
Explore detailed information and visual representations of leaked data points to understand their characteristics and potential impact on model performance.
Last updated