Giter VIP home page Giter VIP logo

Comments (10)

MansMeg avatar MansMeg commented on July 30, 2024

Have you a status here @paul-buerkner ?

from posteriordb.

paul-buerkner avatar paul-buerkner commented on July 30, 2024

Oh, for some reasons, I overlooked I was assigned for it. Sorry, I didn't take any further look at this.
Do you have a proposal for how to do it already? Otherwise, I will think about it a little bit more today.

from posteriordb.

MansMeg avatar MansMeg commented on July 30, 2024

Not really. I think this defines a little how we would access/filter in the databases so maybe have ashort discussion on it. I could also do the work, but the API need some thinking.

from posteriordb.

paul-buerkner avatar paul-buerkner commented on July 30, 2024

I agree. Let's think of this a little bit more and then have a discussion to make some decisions about this, maybe thursday or friday?

from posteriordb.

MansMeg avatar MansMeg commented on July 30, 2024

from posteriordb.

paul-buerkner avatar paul-buerkner commented on July 30, 2024

Sounds good.

from posteriordb.

MansMeg avatar MansMeg commented on July 30, 2024

Summary of discussion:
We implement the filter function based on the dplyr filter function, essentially using the same framework. The API will be:

pos <- pdb_filter_posterior(.pdb, ...)
ms <- pdb_filter_models(.pdb, ...)
ds <- pdb_filter_data(.pdb, ...)

Here ... is filtering syntax according to the dplyr filter function:
https://dplyr.tidyverse.org/reference/filter.html

This would mean that we would implement this as three steps:

  1. create a pdb_posteriors_df() function to create a posterior/model/data tibble for all elements in the posterior database. Here we expand all keyterms.
  2. Use dplyr::filter() to select from the tibble.
  3. Return posteriors as read posterior objects.

from posteriordb.

paul-buerkner avatar paul-buerkner commented on July 30, 2024

Lovely, I am very happy with this interface. One minor comment. You use posterior in singular and models in plural. Does your plan to have singular/plural aliases still apply or shall we settle for just one of them?

from posteriordb.

MansMeg avatar MansMeg commented on July 30, 2024

Good point. I think using both would be reasonable (using alias).

from posteriordb.

eerolinna avatar eerolinna commented on July 30, 2024

I'm not familiar with dplyr syntax, can you show me how these queries should be written?

  1. Find all posteriors where the model was added by Måns.

    My attempt

    ms <- pdb_filter_models(.pdb, added_by == "Mans Magnusson")
    posteriors <- ??
  2. Find all posteriors where the model has keyword bda3_example.

  3. Same as 2. but only find posteriors that have a gold standard.

from posteriordb.

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.