Git Product home page Git Product logo

fungi-identify's People

Contributors

nsgrantham avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fungi-identify's Issues

Nice tool and test samples to try, but more documents

In order to test, i would need to know the file format of S.csv, X.csv, and Y. csv, and which files were used for converting S.X.Y.csv from https://figshare.com/articles/1000homes/1270900.
Thanks

This fills the subdirectory data with S.csv (lon, lat coordinates of each home), X.csv (covariate info for each home), and Y.csv (presence/absence of taxa per home). A further subdirectory raw is created that holds the pre-munged txt, biom, and fa data files.

error message from running "demonstrate-model.R"

I got following error when I ran demonstrate-model.R. Also noticed when I ran plot-occurrence.R, nothing happened.

setwd("~/Documents/STD/FUNGI/fungi-identify/fungi-identify")

[1] parallel grid stats graphics grDevices utils datasets methods

[9] base

other attached packages:

[1] RColorBrewer_1.1-2 ggplot2_2.0.0 doMC_1.3.3 iterators_1.0.7

[5] foreach_1.4.2 fields_8.3-5 maps_2.3-9 spam_1.0-1

loaded via a namespace (and not attached):

[1] Rcpp_0.12.1 codetools_0.2-11 plyr_1.8.3.9000 gtable_0.1.2

[5] scales_0.3.0 tools_3.2.0 munsell_0.4.2 colorspace_1.2-6

Train model via best bw and kernel smooth

Produces matrix of estimated occurence probabilities

M <- train_model(Y = Ytrain2, S = Strain2, bw = bw, Tgrid = Tgrid)
Error in train_model(Y = Ytrain2, S = Strain2, bw = bw, Tgrid = Tgrid) :
could not find function "train_model"

Next, get log likelihood values for every sample in test and test2

llike.test <- calculate_log_likelihood(Ytest, M)
Error in calculate_log_likelihood(Ytest, M) :
could not find function "calculate_log_likelihood"
llike.test2 <- calculate_log_likelihood(Ytest2, M)
Error in calculate_log_likelihood(Ytest2, M) :
could not find function "calculate_log_likelihood"

Normalize log-likelihood values (necessary for forming prediction regions)

pmf.test <- make_pmf(llike.test)
Error in make_pmf(llike.test) : could not find function "make_pmf"
pmf.test2 <- make_pmf(llike.test2)
Error in make_pmf(llike.test2) : could not find function "make_pmf"

predict the origin that maximizes a sample's log-likelihood

Stest.hat <- Tgrid[apply(pmf.test, 2, which.max), ]
Error: object 'Tgrid' not found
Stest2.hat <- Tgrid[apply(pmf.test2, 2, which.max), ]
Error: object 'Tgrid' not found

How did we do?

pred.error <- diag(rdist.earth(Stest, Stest.hat, miles = FALSE))
Error in rdist.earth(Stest, Stest.hat, miles = FALSE) :
could not find function "rdist.earth"
summary(pred.error)
Error in summary(pred.error) : object 'pred.error' not found
hist(pred.error, breaks = 50)
Error in hist(pred.error, breaks = 50) : object 'pred.error' not found

Further investigation of prediction error:

Use cross-validation on test2 to find q for varying regions

regions <- c(0.5, 0.75, 0.9)
q <- select_q(pmf.test2, Stest2, Tgrid, regions, by = 0.005)
Error in select_q(pmf.test2, Stest2, Tgrid, regions, by = 0.005) :
could not find function "select_q"

How well do the q obtained on our test2 set retain coverage on test set?

calculate_coverage(pmf.test, q, Stest, Tgrid) # we hope for 0.5, 0.75, 0.9
Error in calculate_coverage(pmf.test, q, Stest, Tgrid) :
could not find function "calculate_coverage"

What do our predictions look like?

plot_prediction(50, pmf.test, q, Stest, Stest.hat, Tgrid)
Error in plot_prediction(50, pmf.test, q, Stest, Stest.hat, Tgrid) :
could not find function "plot_prediction"
plot_prediction(100, pmf.test, q, Stest, Stest.hat, Tgrid)
Error in plot_prediction(100, pmf.test, q, Stest, Stest.hat, Tgrid) :
could not find function "plot_prediction"
plot_prediction(200, pmf.test, q, Stest, Stest.hat, Tgrid)
Error in plot_prediction(200, pmf.test, q, Stest, Stest.hat, Tgrid) :
could not find function "plot_prediction"

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.