Giter Club home page Giter Club logo

Comments (6)

jakob-r avatar jakob-r commented on June 16, 2024

Yes the name is strange and it's not final. It's a proof of concept in a way

look at this example

th.paramset.flat.collection = ParamSetFlat$new(
  id = 'th.param.flat.collection',
  params = c(
    list(
      ParamInt$new(id = 'th.param.nat', default = 1L, lower = 1L, upper = 10L)
    ),
    createCollectionParamList(10L, ParamReal$new(id = 'th.param.real.na', default = 0, lower = -10, upper = 10, special.vals = NA))
  ),
  trafo = collectionHelper(fun = function(x, dict, tags) {
    xm = as.matrix(as.data.table(x))
    col.ind = seq_len(ncol(xm))
    ind.mat = sapply(dict$th.param.nat, function(z) col.ind <= z)
    ind.mat = t(ind.mat)
    xm[!ind.mat] = NA
    xm = xm / rowSums(xm, na.rm = TRUE)
    list(vector.param = lapply(seq_len(nrow(xm)), function(z) xm[z,]))
  }, collection.param.id = "th.param.real.na", additional.params = "th.param.nat")
)

x = th.paramset.flat.collection$sample(3)
th.paramset.flat.collection$transform(x)

from paradox.

berndbischl avatar berndbischl commented on June 16, 2024

it would be much easier
a) to make the baisc functionality of the rest of package work when so much other stuff is still very broken
b) for stuff like this to clearly write down first what you want to achieve.
the docs of collectionHelper dont say a single word about what the intended usage is.

maybe at least write down here what the idea is?

from paradox.

berndbischl avatar berndbischl commented on June 16, 2024

as i have to now guess again what things are supposed to mean:

the problem with scalar param replication is that you later need to figure what belongs together.
in terms of parameters in a set, and in terms of values in a list.
so one should give the user exactly this operation.

from paradox.

jakob-r avatar jakob-r commented on June 16, 2024

Can you read the README and tell me what you would improve?

from paradox.

berndbischl avatar berndbischl commented on June 16, 2024

this doesnt exist anymore? @jakob-r close?

from paradox.

jakob-r avatar jakob-r commented on June 16, 2024

Does not exist anymore.

from paradox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.