223
223
end
224
224
225
225
@testset " Sequential" begin
226
- # TODO
226
+ x = rand (Normal (0 ,10 ), 1500 )
227
+ y = x + rand (Normal (0 ,2 ), 1500 )
228
+ z = y + rand (Normal (0 ,5 ), 1500 )
229
+ t = Table (; x, y, z)
230
+ T = Scale (low= 0.2 , high= 0.8 ) → EigenAnalysis (:VDV )
231
+ n, c = apply (T, t)
232
+ tₒ = revert (T, n, c)
233
+ @test Tables. matrix (t) ≈ Tables. matrix (tₒ)
234
+
235
+ x = rand (Normal (0 ,10 ), 1500 )
236
+ y = x + rand (Normal (0 ,2 ), 1500 )
237
+ z = y + rand (Normal (0 ,5 ), 1500 )
238
+ t = Table (; x, y, z)
239
+ T = Select (:x , :z ) → ZScore () → EigenAnalysis (:V ) → Scale (low= 0 , high= 1 )
240
+ n, c = apply (T, t)
241
+ tₒ = revert (T, n, c)
242
+ @test Tables. matrix (t) ≈ Tables. matrix (tₒ)
227
243
end
228
244
229
245
@testset " Parallel" begin
230
- # TODO
246
+ x = rand (Normal (0 ,10 ), 1500 )
247
+ y = x + rand (Normal (0 ,2 ), 1500 )
248
+ z = y + rand (Normal (0 ,5 ), 1500 )
249
+ t = Table (; x, y, z)
250
+ T = Scale (low= 0.3 , high= 0.6 ) ∥ EigenAnalysis (:VDV )
251
+ n, c = apply (T, t)
252
+ tₒ = revert (T, n, c)
253
+ @test Tables. matrix (t) ≈ Tables. matrix (tₒ)
254
+
255
+ # check cardinality of Parallel
256
+ x = rand (Normal (0 ,10 ), 1500 )
257
+ y = x + rand (Normal (0 ,2 ), 1500 )
258
+ z = y + rand (Normal (0 ,5 ), 1500 )
259
+ t = Table (; x, y, z)
260
+ T = ZScore () ∥ EigenAnalysis (:V )
261
+ n = T (t)
262
+ @test length (Tables. columnnames (n)) == 6
263
+
264
+ # distributivity with respect to Sequential
265
+ x = rand (Normal (0 ,10 ), 1500 )
266
+ y = x + rand (Normal (0 ,2 ), 1500 )
267
+ z = y + rand (Normal (0 ,5 ), 1500 )
268
+ t = Table (; x, y, z)
269
+ T₁ = Center ()
270
+ T₂ = Scale (low= 0.2 , high= 0.8 )
271
+ T₃ = EigenAnalysis (:VD )
272
+ P₁ = T₁ → (T₂ ∥ T₃)
273
+ P₂ = (T₁ → T₂) ∥ (T₁ → T₃)
274
+ n₁ = P₁ (t)
275
+ n₂ = P₂ (t)
276
+ @test Tables. matrix (n₁) ≈ Tables. matrix (n₂)
231
277
end
232
278
end
0 commit comments