@@ -150,7 +150,7 @@ function revert(transform::FeatureTransform, newtable, cache)
150
150
@assert isrevertible (transform) " Transform is not revertible"
151
151
152
152
newfeat, newmeta = divide (newtable)
153
- fcache, mcache = cache
153
+ fcache, mcache = cache
154
154
155
155
feat = revertfeat (transform, newfeat, fcache)
156
156
meta = revertmeta (transform, newmeta, mcache)
@@ -159,7 +159,7 @@ function revert(transform::FeatureTransform, newtable, cache)
159
159
end
160
160
161
161
function reapply (transform:: FeatureTransform , table, cache)
162
- feat, meta = divide (table)
162
+ feat, meta = divide (table)
163
163
fcache, mcache = cache
164
164
165
165
for assertion in assertions (transform)
@@ -180,22 +180,20 @@ reapplymeta(::FeatureTransform, meta, mcache) = meta
180
180
# STATELESS FALLBACKS
181
181
# --------------------
182
182
183
- reapply (transform:: StatelessTableTransform , table, cache) =
184
- apply (transform, table) |> first
183
+ reapply (transform:: StatelessTableTransform , table, cache) = apply (transform, table) |> first
185
184
186
- reapply (transform:: StatelessFeatureTransform , table, cache) =
187
- apply (transform, table) |> first
185
+ reapply (transform:: StatelessFeatureTransform , table, cache) = apply (transform, table) |> first
188
186
189
187
# ------------------
190
188
# COLWISE FALLBACKS
191
189
# ------------------
192
190
193
191
function applyfeat (transform:: ColwiseFeatureTransform , feat, prep)
194
192
# retrieve column names and values
195
- cols = Tables. columns (feat)
196
- names = Tables. columnnames (cols)
193
+ cols = Tables. columns (feat)
194
+ names = Tables. columnnames (cols)
197
195
snames = choose (transform. colspec, names)
198
-
196
+
199
197
# function to transform a single column
200
198
function colfunc (n)
201
199
x = Tables. getcolumn (cols, n)
@@ -225,11 +223,11 @@ end
225
223
226
224
function revertfeat (transform:: ColwiseFeatureTransform , newfeat, fcache)
227
225
# transformed columns
228
- cols = Tables. columns (newfeat)
226
+ cols = Tables. columns (newfeat)
229
227
names = Tables. columnnames (cols)
230
-
228
+
231
229
caches, snames = fcache
232
-
230
+
233
231
# function to transform a single column
234
232
function colfunc (i)
235
233
n = names[i]
@@ -248,11 +246,11 @@ end
248
246
249
247
function reapplyfeat (transform:: ColwiseFeatureTransform , feat, fcache)
250
248
# retrieve column names and values
251
- cols = Tables. columns (feat)
249
+ cols = Tables. columns (feat)
252
250
names = Tables. columnnames (cols)
253
251
254
252
caches, snames = fcache
255
-
253
+
256
254
# check that cache is valid
257
255
@assert length (names) == length (caches) " invalid caches for feat"
258
256
@@ -296,4 +294,4 @@ include("transforms/eigenanalysis.jl")
296
294
include (" transforms/projectionpursuit.jl" )
297
295
include (" transforms/rowtable.jl" )
298
296
include (" transforms/coltable.jl" )
299
- include (" transforms/parallel.jl" )
297
+ include (" transforms/parallel.jl" )
0 commit comments