CliMA / CalibrateEmulateSample.jl

Stochastic Optimization, Learning, Uncertainty and Sampling
https://clima.github.io/CalibrateEmulateSample.jl/dev
Apache License 2.0
84 stars 16 forks source link

Logical inconsistency in the use of `decorrelate` in the `Emulator` construction? #269

Open bielim opened 9 months ago

bielim commented 9 months ago

There may be a logical inconsistency in Emulator.jl: In the Emulator object constructor, when decorrelate is set to true but machine_learning_tool is a VectorRandomFeatureInterface, there is no error, even though the comment suggests that decorrelation is not performed for vector RF. Is this the intended behavior? (In the current implementation, the exception for is only thrown when decorrelate is false and the machine learning tool is not a vector RF).



    # [3.] Decorrelating the outputs, **not performed for vector RF**
    if decorrelate
        [...]
    else
        if decorrelate || !isa(machine_learning_tool, VectorRandomFeatureInterface)
            throw(ArgumentError("$machine_learning_tool is incompatible with option Emulator(...,decorrelate = false)"))
        end
        [...]
    end