Extract
Python port of org.openml.webapplication.features.FantailConnector.
Drives dataset-level meta-feature (quality) computation and upload. Two
characterizer sets, mirroring CharacterizerFactory:
* simple — the base qualities from load_qualities
(SimpleMetaFeatures-equivalent counts + pymfe groups). Matches Java's
CharacterizerFactory.simple() scope, with pymfe groups added on the
Python side.
* all — everything in simple plus the sklearn landmarker port from
src.qualities.landmarkers. Java's CfsSubsetEval_* landmarkers are
omitted (see landmarkers module docstring).
Deviations from Java (documented):
* Java's FantailConnector.extractFeatures removes row_id_attribute
and is_ignore columns before characterizing. The Python path computes
over the full dataset (matching what ProcessDataset / existing
load_qualities already do). Landmarker values on datasets with
ID-like columns will diverge from Java for this reason.
* Java polls via dataqualitiesUnprocessed with the full expected-quality
list. We do the same, but only the static SimpleMetaFeatures + landmarker
IDs are used as the filter — pymfe-derived names vary per dataset and
aren't included.
ExtractFeatures
Port of FantailConnector. Construct with a characterizer_set
of "simple" or "all"; call process(did) for one dataset or
poll() to loop the qualities-unprocessed endpoint.
Source code in src/qualities/extract.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 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 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 | |
characterizer_set = characterizer_set
instance-attribute
client = client
instance-attribute
dataset_format = dataset_format
instance-attribute
last_result = None
instance-attribute
mode = mode
instance-attribute
priority_tag = priority_tag
instance-attribute
__init__(client, mode='normal', characterizer_set='simple', priority_tag=None, dataset_format='arff')
Source code in src/qualities/extract.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
poll()
Loop data_qualities_unprocessed, processing each dataset id
until the server returns "No unprocessed" (Java's
fetchUnprocessedQualities catches the same string).
Source code in src/qualities/extract.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
process(did)
Compute qualities for one dataset and upload. Returns the
DataQuality (Java uploads as a side effect — same here).
Source code in src/qualities/extract.py
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 | |