eds_scikit.utils.checks
MissingConceptError
MissingConceptError(required_concepts: Union[List[str], List[Tuple[str, str]]], df_name: str = '')
Bases: Exception
Exception raised when a concept is missing
Source code in eds_scikit/utils/checks.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
MissingTableError
MissingTableError(required_tables: Union[List[str], List[Tuple[str, str]]], data_name: str = '')
Bases: Exception
Exception raised when a table is missing in the Data
Source code in eds_scikit/utils/checks.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
|
concept_checker
concept_checker(function: Callable, concepts: List[str] = None, only_adds_concepts: bool = True, *args, **kwargs) -> Any
Decorator to use on functions that - Takes a DataFrame as first argument - Adds a concept to it
The decorator checks: - If the first argument is a DataFrame - If the concepts to be added aren't already in the DataFrame - If the function correctly adds the concepts - If no additionnal columns are added (if only_adds_concepts is True)
If one of this checks fails, raises an error
Source code in eds_scikit/utils/checks.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
algo_checker
algo_checker(function: Callable, algos: Optional[str] = None, *args, **kwargs) -> Any
Decorator to use on wrapper that calls specific functions based on the 'algo' argument
The decorator checks if the provided algo is an implemented one.
If this checks fails, raises an error
Source code in eds_scikit/utils/checks.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|