Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOE items to complete #387

Open
4 of 6 tasks
vikram-s-narayan opened this issue Jul 26, 2022 · 1 comment
Open
4 of 6 tasks

MOE items to complete #387

vikram-s-narayan opened this issue Jul 26, 2022 · 1 comment

Comments

@vikram-s-narayan
Copy link
Contributor

vikram-s-narayan commented Jul 26, 2022

The following are the unfinished items related to #386:

  • Remove MOE from main src directory
  • Remove MOE test from main tests directory
  • Add more tests to MOE sub-package
  • Add documentation for MOE
  • Add Project compats
  • Register project
@vikram-s-narayan
Copy link
Contributor Author

vikram-s-narayan commented Aug 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant