From 17578022018f08d31835a13021c52ee930605455 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Tue, 30 Apr 2024 15:43:09 +0200 Subject: [PATCH 1/3] change Float64 to Float32 in fitresult --- src/builtins/Transformers.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/builtins/Transformers.jl b/src/builtins/Transformers.jl index c1ddd62e..e14938a0 100644 --- a/src/builtins/Transformers.jl +++ b/src/builtins/Transformers.jl @@ -581,7 +581,7 @@ function MMI.fit(transformer::Standardizer, verbosity::Int, X) is_invertible = !transformer.count && !transformer.ordered_factor # initialize fitresult: - fitresult_given_feature = LittleDict{Symbol,Tuple{Float64,Float64}}() + fitresult_given_feature = LittleDict{Symbol,Tuple{AbstractFloat,AbstractFloat}}() # special univariate case: if is_univariate @@ -631,7 +631,6 @@ function MMI.fit(transformer::Standardizer, verbosity::Int, X) ) end end - fitresult_given_feature = Dict{Symbol,Tuple{Float64,Float64}}() isempty(cols_to_fit) && verbosity > -1 && @warn "No features to standarize." From ac82a225e7f7f651e00f71ffd86063ccf4c23b83 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Wed, 1 May 2024 13:12:21 +0200 Subject: [PATCH 2/3] update codecov action to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b5d87fb..7bff42a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 with: file: lcov.info From 66303c491ed58379af3a214d1b06e24c12295289 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Wed, 1 May 2024 13:19:11 +0200 Subject: [PATCH 3/3] eps of type std(v) --- src/builtins/Transformers.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/builtins/Transformers.jl b/src/builtins/Transformers.jl index e14938a0..b72ce890 100644 --- a/src/builtins/Transformers.jl +++ b/src/builtins/Transformers.jl @@ -503,9 +503,10 @@ mutable struct UnivariateStandardizer <: Unsupervised end function MMI.fit(transformer::UnivariateStandardizer, verbosity::Int, v::AbstractVector{T}) where T<:Real - std(v) > eps(Float64) || + stdv = std(v) + stdv > eps(typeof(stdv)) || @warn "Extremely small standard deviation encountered in standardization." - fitresult = (mean(v), std(v)) + fitresult = (mean(v), stdv) cache = nothing report = NamedTuple() return fitresult, cache, report