Coder Social home page Coder Social logo

evam-tools's People

Contributors

erios12 avatar mariasantamera00 avatar pablohnieto avatar pavillos avatar rdiaz02 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

evam-tools's Issues

return error estimates for CBN, HESBCN, etc

Those are needed to get the likelihood and compute cross-validated likelihoods, etc. Right now, the predicted genotypes are those for models without noise.

  • H-ESBCN returns the best epsilon (see function markov.h)
  • CBN: see line 286 in h-cbn.c : write the epsilon and lik. to a file.

There should be an exported function that plots the true model

This works for DAGs

plot_model <- function(x, main = "") {
    method_info <- igraph::graph_from_data_frame(x[, c("From", "To")])
    parent_set <- evamtools:::parent_set_from_edges(x)
    evamtools:::plot_method(method_info = method_info,
                            parent_set = parent_set,
                            edges = x, 
                            method = main)
  }

where is the usual data frame with From, To, etc.

Improve and do something similar for MHN.

The above is simplified from plot_evam in file evam_plotting.R

cpm2tm can fail with strange error when using inappropriate input

A user might try this

d1 <- data.frame(From = c("Root", "Root", rep(c("A", "B"), 3)),
                              To = c("A", "B", rep(c("C", "D", "E"), c(2, 2, 2))),
                              Relation = rep(c("Single", "AND", "OR", "XOR"), rep(2, 4)),
                              Lambdas = c(0.7, 0.8, rep(c(0.9, 0.4, 0.5), c(2, 2, 2))))

evamtools:::cpm2tm(d1)

which fails as

Error in as.environment(where) : using 'as.environment(NULL)' is defunct
> traceback()
2: exists("Relation", x$edges)
1: evamtools:::cpm2tm(ex_XOR_AND_OR)

So we probably want to:

  1. Check for the existance of the edges component and error early and with a clear message (like "No edges component in input. You are calling this function in an unintended way and/or with the wrong input").
  2. Use "Relation" %in% colnames(x$edges) instead of exists("Relation", x$edges): the second fails when x$edges does not exist.

BUG_Create_Rename_Click_other

  • Create input data interactively
  • Add WT, E, D genotypes
  • Rename data
  • Move to "Empty" (from which it was derived): CRASH

Many variations on this. In general, moving between data sets when some have genes that are not consecutive.

sample_evam should accept a data frame as input

This currently does not work

d1 <- data.frame(From = c("Root", "Root", rep(c("A", "B"), 3)),
                              To = c("A", "B", rep(c("C", "D", "E"), c(2, 2, 2))),
                              Relation = rep(c("Single", "AND", "OR", "XOR"), rep(2, 4)),
                              Lambdas = c(0.7, 0.8, rep(c(0.9, 0.4, 0.5), c(2, 2, 2))))

sample_evam(d1)

And yet, the web app is doing something that seems to be just that.

So:

  1. We should allow for that type of use in the R package
  2. We should document it in the help of sample_evam
  3. HESBCN_model_2_output should accept an empty parent_set argument, and generate it on the fly from the dag (we already have function parent_set_from_edges).

In the web app we are using function generate_sample_from_dag. (Called on click on "resample_dag")

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.