Coder Social home page Coder Social logo

ericarcher / banter Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 0.0 129.67 MB

banter is a package for creating hierarchical acoustic event classifiers out of multiple call type detectors.

R 1.13% HTML 98.87%
acoustics bioacoustics cetaceans classification cran dolphins machine-learning noaa r r-package random-forest species-identification supervised-learning supervised-machine-learning whales

banter's People

Contributors

ericarcher avatar olivroy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

banter's Issues

Blank output when using predict()

Hi Eric,

Moving my question over on BA Stack Exchange here because I made some progress but am stuck again now...

My first issue was that I was not loading the rfPermute package but when I did that I am now able to successfully run:

score <- predict(bant.mdl, dets_banter)

but score ends up blank.

I am working with a model that was made from acoustic features extracted with an older version of PAMpal, to predict acoustic features extracted with the latest version of PAMpal. That led to one issue with feature column names not matching perfectly, but I was able to manually fix that. From what I can tell to-be-predicted events (exported for banter by PAMpal) are in the right format.

In trying to examine my bant.mdl to make sure it looks ok, I wasn't able to use the banter::summary function. That throws the below error. I suspect this is from ths update but maybe you can confirm.

Error in FUN(X[[i]], ...) : 
  no slot of name "timestamp" for this object of class "banter_detector"

Thank you!
Selene

addBanterDetector suggested modification in cases with insufficient data in detector

Problem:
When adding multiple detectors to a banter modeling using addBanterDetector, if one or more of the detectors has insufficient data to build a detector model, Banter gives an error such as:
Error in .getSampsize(df$species, sampsize, paste0("Detector model (", :
Detector model (Click_Detector_1) has 1 species (need at least 2 for model)

This error results in a full-stop of the processing (no data is added to the model).

There will be cases where this happens, but a model can be built using the detectors with sufficient data.

Suggested modification:
Print a warning (instead of an error) identify the detector(s) with insufficient data
and
Populate the model with the detectors it CAN use

** There is a workaround by specifying the exact detectors to use; but since this will be a thing that happens not infrequently, the modification may make it more user friendly**

plotImportance n argument error

plotImportance function allows an argument โ€˜nโ€™ which plots the first n values.

There is an error in this plot in that it actually plots the LAST n values rather than the FIRST n values.

ConfusionMatrix Threshold results don't match text in Banter Guide

Hi @EricArcher,

I was working through the Banter Guide (accessed via the package that directed me here: https://taikisan21.github.io/PAMpal/banterGuide.html#242_Random_Forest_Summaries) and noticed a possible issue (or an error in interpretation on my part!)

In section 2.4.2 > Confusion Matrix, where it has the example with the 0.8 threshold, the numbers in the last column (Pr.gt_0.8) don't match what is written in the text below that.

In running my own model through this same snippet of code I also get extremely small numbers for one species (1.2e-119), then near 1 (9.9e-1) and exactly 1 for the Overall value.

# Confusion Matrix with medium threshold
confusionMatrix(bant.rf, threshold = 0.8)
        X33 X577 pct.correct LCI_0.95  UCI_0.95     Pr.gt_0.8
X33      20    0   100.00000 83.15665 100.00000 1.220165e-119
X577      4  204    98.07692 95.14962  99.47360  9.999580e-01
Overall  NA   NA    98.24561 95.56924  99.51997  1.000000e+00

I was going to interpret this as a very low probability that a X33 event will be predicted as X33 with a score >0.8, but a very high probability that an X577 event will be predicted as X577 with a score >0.8. Is that correct?

Thank you!
Selene

To-Dos

  • Function argument checking
  • Unit tests
  • Vignettes, expand tutorial with demos of diagnostics

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.