Closed vickydeka closed 1 year ago
Still missing tests as suggested in the review.
Still missing tests as suggested in the review.
I am not exactly sure, how to add that.
You can copy the example that was failing in our test/transforms/zscore.jl file and add check the expected result. You can find examples in the file. After you add these, GitHub will run them automatically to make sure that the tests are passing in all platforms.
and add check the expected res
a=rand(Int,3)
b=rand(3)
t = Table(; a, b)
T = ZScore(:b)
n, c = apply(T, t)
@test isapprox(mean(n.b), 0; atol=1e-6)
@test isapprox(std(n.b), 1; atol=1e-6)
tₒ = revert(T, n, c)
@test Tables.matrix(t) ≈ Tables.matrix(tₒ)
Will in this way work?
That should work 👍🏻
Em sáb., 10 de dez. de 2022 02:42, vickydeka @.***> escreveu:
and add check the expected res
a=rand(Int,3)
b=rand(3)
t = Table(; a, b)
T = ZScore(:b)
n, c = apply(T, t) @test isapprox(mean(n.b), 0; atol=1e-6) @test isapprox(std(n.b), 1; atol=1e-6)
tₒ = revert(T, n, c) @test Tables.matrix(t) ≈ Tables.matrix(tₒ)
Will in this way work?
— Reply to this email directly, view it on GitHub https://github.com/JuliaML/TableTransforms.jl/pull/160#issuecomment-1345147036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3LCX62O72XX5DZ63QLWMQJ35ANCNFSM6AAAAAASZTR6HA . You are receiving this because you were mentioned.Message ID: @.***>
Please add the example that was failing to the test suite so that the issue is not reintroduced.
It is now added.
Merging #160 (de468ec) into master (976ce71) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #160 +/- ##
=======================================
Coverage 95.15% 95.16%
=======================================
Files 27 27
Lines 888 889 +1
=======================================
+ Hits 845 846 +1
Misses 43 43
Impacted Files | Coverage Δ | |
---|---|---|
src/transforms.jl | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Thank you @vickydeka for the contribution 💯 The tests are failing for reasons that are not related to your changes.
@juliohm I fixed the Assertion Error and it is working fine now, then again was getting
ERROR: MethodError: no method matching getindex(::NamedTuple{(:a, :b), Tuple{Vector{Int64}, Vector{Float64}}}, ::Colon, ::Vector{Symbol})
forI guess the ZScore function expects the input data to be a tabular data structure, like DataFrame or a Table, but the input data in this case is a NamedTuple. Converting into dataframe, I am getting correct output: