API: preprocessing.imputation
skyulf.preprocessing.imputation
Imputation nodes package.
Split from a single 416-LOC module into per-imputer files
_common.py — shared helpers (column resolution, polars fill values, sklearn transform) simple.py — SimpleImputer knn.py — KNNImputer iterative.py — IterativeImputer (MICE)
All public names are re-exported here so existing imports such as
from skyulf.preprocessing.imputation import SimpleImputerCalculator
continue to work unchanged.
SimpleImputerApplier
Bases: BaseApplier
Apply fitted Simple Imputer fill values to missing values in selected columns.
The calculator artifact records per-column values for mean, median,
most_frequent (also accepted as mode), or constant strategies.
Missing columns seen during fitting are restored with their stored value.
Source code in skyulf-core/skyulf/preprocessing/imputation/simple.py
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 79 80 81 82 83 84 85 86 | |
SimpleImputerCalculator
Bases: BaseCalculator
Fit per-column values for filling missing data with sklearn-compatible strategies.
Supported strategy values are mean, median, most_frequent,
and constant; mode is normalized to most_frequent. Use
columns to select columns and fill_value with constant.
Mean and median operate on numeric columns, while the other strategies can
operate on all selected columns.
Source code in skyulf-core/skyulf/preprocessing/imputation/simple.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |