Skip to content

Add Julia implementation of r2_score #602

Add Julia implementation of r2_score

Add Julia implementation of r2_score #602

Triggered via pull request July 26, 2023 17:05
@sethaxensethaxen
synchronize #285
r2_score
Status Success
Total duration 56m 0s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

documenter.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 10 warnings
Documentation: ../../../.julia/packages/MCMCDiagnosticTools/IJZgB/src/rstar.jl#L158
doctest failure in ~/.julia/packages/MCMCDiagnosticTools/IJZgB/src/rstar.jl:158-162 ```jldoctest rstar; setup = :(using Random; Random.seed!(101)) julia> using MLJBase, MLJIteration, EvoTrees, Statistics julia> samples = fill(4.0, 100, 3, 2); ``` Subexpression: using MLJBase, MLJIteration, EvoTrees, Statistics Evaluated output: ┌ Warning: Module Distributions with build ID fafbfcfd-2971-9b15-0000-012f797039a5 is missing from the cache. │ This may mean Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 ┌ Warning: Module Distributions with build ID fafbfcfd-2971-9b15-0000-012f797039a5 is missing from the cache. │ This may mean Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 ┌ Warning: Module Distributions with build ID fafbfcfd-2971-9b15-0000-012f797039a5 is missing from the cache. │ This may mean Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 ┌ Warning: Module MLJBase with build ID ffffffff-ffff-ffff-0000-02c22a838ffd is missing from the cache. │ This may mean MLJBase [a7f614a8-145f-11e9-1d2a-a57a1082229d] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 ┌ Warning: Module Distributions with build ID fafbfcfd-2971-9b15-0000-012f797039a5 is missing from the cache. │ This may mean Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 WARNING: Method definition adapt_storage(Type{var"#s4"} where var"#s4"<:(StaticArraysCore.SArray{S, T, N, L} where L where N where T), Array{T, N} where N where T) where {S} in module AdaptStaticArraysExt at /home/runner/.julia/packages/Adapt/UtItS/ext/AdaptStaticArraysExt.jl:6 overwritten in module ArrayInterfaceStaticArrays at /home/runner/.julia/packages/ArrayInterfaceStaticArrays/TvmG5/src/ArrayInterfaceStaticArrays.jl:77. ** incremental compilation may be fatally broken for this module ** ┌ Warning: Module SpecialFunctionsChainRulesCoreExt with build ID fafbfcfd-9604-a3e0-0000-01346a5eee72 is missing from the cache. │ This may mean SpecialFunctionsChainRulesCoreExt [9eb7bdd4-e44c-55fc-b9cc-1a32cb715188] does not support precompilation but is imported by a module that does. └ @ Base loading.jl:1793 ┌ Error: Error during loading of extension SpecialFunctionsChainRulesCoreExt of SpecialFunctions, use `Base.retry_load_extensions()` to retry. │ exception = │ 1-element ExceptionStack: │ Declaring __precompile__(false) is not allowed in files that are being precompiled. │ Stacktrace: │ [1] _require(pkg::Base.PkgId, env::Nothing) │ @ Base ./loading.jl:1797 │ [2] _require_prelocked(uuidkey::Base.PkgId, env::Nothing) │ @ Base ./loading.jl:1660 │ [3] _require_prelocked(uuidkey::Base.PkgId) │ @�
Documentation: src/ArviZStats/hdi.jl#L40
doctest failure in ~/work/ArviZ.jl/ArviZ.jl/src/ArviZStats/hdi.jl:40-48 ```jldoctest hdi; setup = :(using Random; Random.seed!(78)) using ArviZ x = randn(2_000) hdi(x; prob=0.83) # output (lower = -1.3826605224220527, upper = 1.259817149822839) ``` Subexpression: using ArviZ x = randn(2_000) hdi(x; prob=0.83) Evaluated output: (lower = -1.3826605224220527, upper = 1.259817149822839,) Expected output: (lower = -1.3826605224220527, upper = 1.259817149822839) diff = Warning: Diff output requires color. (lower = -1.3826605224220527, -1.3826605224220527, upper = 1.259817149822839)1.259817149822839,)
Documentation: src/ArviZStats/r2_score.jl#L17
doctest failure in ~/work/ArviZ.jl/ArviZ.jl/src/ArviZStats/r2_score.jl:17-27 ```jldoctest using ArviZ, ArviZExampleData idata = load_example_data("regression1d") y_true = idata.observed_data.y y_pred = PermutedDimsArray(idata.posterior_predictive.y, (:draw, :chain, :y_dim_0)) r2_score(y_true, y_pred) # output (r2 = 0.683196996216511, r2_std = 0.036883777654323734) ``` Subexpression: using ArviZ, ArviZExampleData idata = load_example_data("regression1d") y_true = idata.observed_data.y y_pred = PermutedDimsArray(idata.posterior_predictive.y, (:draw, :chain, :y_dim_0)) r2_score(y_true, y_pred) Evaluated output: (r2 = 0.683196996216511, r2_std = 0.036883777654323734,) Expected output: (r2 = 0.683196996216511, r2_std = 0.036883777654323734) diff = Warning: Diff output requires color. (r2 = 0.683196996216511, 0.683196996216511, r2_std = 0.036883777654323734)0.036883777654323734,)
Documentation: src/ArviZStats/r2_score.jl#L48
doctest failure in ~/work/ArviZ.jl/ArviZ.jl/src/ArviZStats/r2_score.jl:48-56 ```jldoctest using ArviZ, ArviZExampleData idata = load_example_data("regression10d") r2_score(idata) # output (r2 = 0.998384805658226, r2_std = 0.00010062063385452256) ``` Subexpression: using ArviZ, ArviZExampleData idata = load_example_data("regression10d") r2_score(idata) Evaluated output: (r2 = 0.998384805658226, r2_std = 0.00010062063385452256,) Expected output: (r2 = 0.998384805658226, r2_std = 0.00010062063385452256) diff = Warning: Diff output requires color. (r2 = 0.998384805658226, 0.998384805658226, r2_std = 0.00010062063385452256)0.00010062063385452256,)
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L203
Unknown keywords: analytics = G-W1G68W77YV
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
invalid doctest block in ~/work/ArviZ.jl/ArviZ.jl/src/ArviZStats/model_weights.jl:35-43 Requires `julia> ` or `# output` ```jldoctest using ArviZ, ArviZExampleData models = ( centered=load_example_data("centered_eight"), non_centered=load_example_data("non_centered_eight"), ) elpd_results = map(loo, models) model_weights(elpd_results); ```
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
reference for 'hdi' could not be found in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
no doc found for reference '[`ess_is`](@ref)' in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
no doc found for reference '[`PSISPlots.paretoshapeplot`](@ref)' in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
no doc found for reference '[`PSISPlots.paretoshapeplot`](@ref)' in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
no doc found for reference '[`PSISPlots.paretoshapeplot`](@ref)' in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
no doc found for reference '[`effective_number_of_parameters`](@ref)' in src/api/stats.md.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
13 docstrings not included in the manual: PSIS.ess_is MCMCDiagnosticTools.gelmandiag :: Tuple{AbstractArray{<:Real, 3}} PSIS.PSISPlots MCMCDiagnosticTools.gewekediag :: Tuple{AbstractVector{<:Real}} MCMCDiagnosticTools.discretediag :: Tuple{AbstractArray{<:Real, 3}} MCMCDiagnosticTools.heideldiag :: Tuple{AbstractVector{<:Real}} PSIS.PSISPlots.paretoshapeplot! ArviZ.with_rc_context ArviZ.rcParams MCMCDiagnosticTools.gelmandiag_multivariate :: Tuple{AbstractArray{<:Real, 3}} PSIS.PSISPlots.paretoshapeplot ArviZ.ArviZStats.kde MCMCDiagnosticTools.rafterydiag :: Tuple{AbstractVector{<:Real}} These are docstrings in the checked modules (configured with the modules keyword) that are not included in @docs or @autodocs blocks.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
footnote 'LOOFAQ' has 2 bodies in src/api/stats.md.