This is an R package. Please install R (version >= 3.1) from http://cran.rstudio.com/.
It is not (yet) in the official R packages repositories. But you can easily install it by typing the following commands in the R console:
install.packages("devtools")
devtools::install_github("jiho/soundclass")
The prediction of signal categories involves:
With soundclass
, this means
# load the package
library("soundclass")
# step 1:
# Subsample 10% of the data
subsample_file(file="/path/to/data.txt", p=0.1)
# step 2:
# Open the file "/path/to/data-picked.txt" created above and
# add identifications in a new column at the end.
# Identification labels can be letters, numbers, full words, etc.
# are case sensitive, and should probably not contain special characters.
# The labels will be converted in an R factor (see factor() for details)
# step 3:
# Classify the data (see ?fit.gbdt and ?gbm for more details on settings)
classify_file(data="/path/to/data-rest.txt", train="/path/to/data-picked.txt")
# Look at the new /path/to/data-rest-classified.txt file just created
Instead of working with files, you can also work in a more usual manner in R (i.e. with data.frames) with the functions subsample
and classify
. The various steps (fitting the model, predicting from the model, looking at the results, etc.) can also be decomposed. Look at
help(package="soundclass")
for a complete list of functions available.
Code by Jean-Olivier Irisson. Background work described in:
Sukhovich A, Irisson J-O, Simons F, Ogé A, Hello Y, Deschamps A, and Nolet G. Automatic discrimination of underwater acoustic signals generated by teleseismic p-waves: a probabilistic approach. Geophysical Research Letters, 38(L18605)2011.
Sukhovich A, Irisson J-O, Perrot J, and Nolet G. Automatic recognition of T and teleseismic P waves by statistical analysis of their spectra: an application to continuous records of moored hydrophones. Submitted to Journal of Geophysical Research.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.