Generate a Latin Hypercube of parameters for a given FUSE model

In the previous post I showed how to get information regarding model building options and used parameters for a given FUSE model. In this post I’ll show how to sample (for the given model) a set of 100 parameters uniformly using the Latin Hypercube Sampling method.

Each FUSE model uses different parameters therefore, in order to sample uniformly, we need to remove the unused parameters and then sample. Here is how I achieve this.

Install/load the fuse package:

    install.packages("fuse", repos="")

Now load devtools and source the gist below (it contains a function called GenerateFUSEParameters)


Choose one of FUSE’s models and get model/parameters info using the FUSEinfo function described in the previous post:

    mid <- 60 # This is TOPMODEL
    x <- FUSEinfo(mid)

Now a Latin Hypercube of 100 samples for the above model (mid=60) is defined as follows:

    parameters <- GenerateFUSEParameters(NumberOfRuns = 100, 
                                         params2remove = names(x)[which(x==FALSE)])

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s