-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from prio-data/drift_detection_all_models
Drift detection all models
- Loading branch information
Showing
56 changed files
with
233 additions
and
16,505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,4 +211,5 @@ cython_debug/ | |
*.bak | ||
|
||
# txt logs | ||
*.txt | ||
|
||
*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from viewser import Queryset, Column | ||
|
||
def generate(): | ||
""" | ||
Contains the configuration for the input data in the form of a viewser queryset. That is the data from viewser that is used to train the model. | ||
This configuration is "behavioral" so modifying it will affect the model's runtime behavior and integration into the deployment system. | ||
There is no guarantee that the model will work if the input data configuration is changed here without changing the model settings and algorithm accordingly. | ||
Returns: | ||
- queryset_base (Queryset): A queryset containing the base data for the model training. | ||
""" | ||
|
||
# VIEWSER 6, Example configuration. Modify as needed. | ||
|
||
queryset_base = (Queryset("meow_meow", "priogrid_month") | ||
# Create a new column 'ln_sb_best' using data from 'priogrid_month' and 'ged_sb_best_count_nokgi' column | ||
# Apply logarithmic transformation, handle missing values by replacing them with NA | ||
.with_column(Column("ln_sb_best", from_loa="priogrid_month", from_column="ged_sb_best_count_nokgi") | ||
.transform.ops.ln().transform.missing.replace_na()) | ||
|
||
# Create a new column 'ln_ns_best' using data from 'priogrid_month' and 'ged_ns_best_count_nokgi' column | ||
# Apply logarithmic transformation, handle missing values by replacing them with NA | ||
.with_column(Column("ln_ns_best", from_loa="priogrid_month", from_column="ged_ns_best_count_nokgi") | ||
.transform.ops.ln().transform.missing.replace_na()) | ||
|
||
# Create a new column 'ln_os_best' using data from 'priogrid_month' and 'ged_os_best_count_nokgi' column | ||
# Apply logarithmic transformation, handle missing values by replacing them with NA | ||
.with_column(Column("ln_os_best", from_loa="priogrid_month", from_column="ged_os_best_count_nokgi") | ||
.transform.ops.ln().transform.missing.replace_na()) | ||
|
||
# Create columns for month and year_id | ||
.with_column(Column("month", from_loa="month", from_column="month")) | ||
.with_column(Column("year_id", from_loa="country_year", from_column="year_id")) | ||
|
||
# Create columns for country_id, col, and row | ||
.with_column(Column("c_id", from_loa="country_year", from_column="country_id")) | ||
.with_column(Column("col", from_loa="priogrid", from_column="col")) | ||
.with_column(Column("row", from_loa="priogrid", from_column="row")) | ||
) | ||
|
||
return queryset_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import numpy as np | ||
import pandas as pd | ||
import runpy | ||
import logging | ||
from model_path import ModelPath | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import numpy as np | ||
import pandas as pd | ||
import runpy | ||
import logging | ||
from model_path import ModelPath | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.