| 6 | import com.winvector.util.BurstMap; |
| 7 | |
| 8 | public interface VariableMapping extends Serializable { |
| 9 | |
| 10 | /** |
| 11 | * |
| 12 | * @return name of original column |
| 13 | */ |
| 14 | String origColumn(); |
| 15 | |
| 16 | /** |
| 17 | * |
| 18 | * @return left index (inclusive) of interval encoding to |
| 19 | */ |
| 20 | int indexL(); |
| 21 | |
| 22 | |
| 23 | /** |
| 24 | * |
| 25 | * @return right index (exclusive) of interval encoding to |
| 26 | */ |
| 27 | int indexR(); |
| 28 | |
| 29 | |
| 30 | /** |
| 31 | * |
| 32 | * @return true if want regularization (all but const terms should set this) |
| 33 | */ |
| 34 | boolean wantRegularization(); |
| 35 | |
| 36 | /** |
| 37 | * Take data from row and paste into vec |
| 38 | * @param row |
| 39 | * @param vec |
| 40 | */ |
| 41 | void process(BurstMap row, double[] vec); |
| 42 | |
| 43 | /** |
| 44 | * type of adaption |
| 45 | * @return |
| 46 | */ |
| 47 | String name(); |
| 48 | |
| 49 | /** |
| 50 | * |
| 51 | * @param base how many indices to skip (use to get per-outcome data, so base will be a multiple of encoding dimension) |
| 52 | * @param x vector soln. |
| 53 | * @return effect this variable has at each level ("" for unique level) |
| 54 | */ |
| 55 | SortedMap<String,Double> effects(int base, double[] x); |
| 56 | |
| 57 | /** |
| 58 | * |
| 59 | * @param base how many indices to skip (use to get per-outcome data, so base will be a multiple of encoding dimension) |
| 60 | * @param x vector soln |
| 61 | * @return map similar to effects, possibly with additional entries for pseudo-levels (to carry more detail) |
| 62 | */ |
| 63 | SortedMap<String, Double> detailedEffects(int base, double[] x); |
| 64 | |
| 65 | /** |
no outgoing calls
no test coverage detected