Surrogates.jl icon indicating copy to clipboard operation
Surrogates.jl copied to clipboard

MOE items to complete

Open vikram-s-narayan opened this issue 2 years ago • 1 comments

The following are the unfinished items related to #386:

  • [ ] Remove MOE from main src directory
  • [ ] Remove MOE test from main tests directory
  • [x] Add more tests to MOE sub-package
  • [x] Add documentation for MOE
  • [x] Add Project compats
  • [x] Register project

vikram-s-narayan avatar Jul 26 '22 13:07 vikram-s-narayan

It appears that MOE does not perform as well as the constituent surrogates. For example:


###comparison tests between MOE and individual surrogates ###

function rmse(a,b)
    #to calculate root mean squared error
    a = vec(a)
    b = vec(b)
    if(size(a)!=size(b))
        println("error in inputs")
        return
    end
    n = size(a,1)
    return sqrt(sum((a - b).^2)/n)
end

function discont(x)
    if x > 1.0
        return 5.0
    else
        return x^2
    end
end
n = 100
lb = 0.0
ub = 3.0
x = Surrogates.sample(n, lb, ub, UniformSample())
y = discont.(x)
test_points = Surrogates.sample(100, lb, ub, GoldenSample())

my_local_kind = [InverseDistanceStructure(p = 1.0),
    KrigingStructure(p = 1.0, theta = 1.0)]
my_moe = MOE(x, y, lb, ub, k = 2, local_kind = my_local_kind)
moe_pred = my_moe.(test_points)

my_krig = Kriging(x, y, lb, ub, p = 1.0, theta = 1.0)
krig_pred = my_krig.(test_points)

my_inv_dist = InverseDistanceSurrogate(x, y, lb, ub, p = 1.0)
inv_dist_pred = my_inv_dist.(test_points)

true_preds = discont.(test_points)

println("moe rmse: ", rmse(moe_pred, true_preds)) #3.09
println("kriging rmse: ", rmse(krig_pred, true_preds)) #0.10
println("inv. dist rmse: ", rmse(inv_dist_pred, true_preds)) #0.65

I reviewed the history of commits for MOE in order to verify the algorithm implementation. However, I'm not able to see a reference to a source paper based on which the code was written.

Hence, I'm now planning to rewrite this algorithm based on the SMT code and this paper.

vikram-s-narayan avatar Aug 01 '22 04:08 vikram-s-narayan