nsgrantham / fungi-identify Goto Github PK
View Code? Open in Web Editor NEWFungi Identify the Geographic Origin of Dust Samples (Grantham et al., 2015)
Fungi Identify the Geographic Origin of Dust Samples (Grantham et al., 2015)
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.
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 foundHow 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 foundFurther 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"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.