README.md

Signal classifier for sounds

Installation

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")

Usage

The prediction of signal categories involves:

  1. extracting a representative subset of the total signals
  2. identifying those signals manually (sorry, we can't help you here)
  3. fitting a statistical model to this subset and use it to predict the identifications for the rest of the data

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.

Credit

Code by Jean-Olivier Irisson. Background work described in:



jiho/soundclass documentation built on June 5, 2019, 10:10 p.m.