Skip to content

ENH: Feature module + API #91

@NickleDave

Description

@NickleDave

This is a meta issue to track thoughts about the API of the feature extraction module and related issues.

Thoughts:

  • make it functional to the extent possible -- avoid classes, standard scientific Python
  • provide named feature sets; we can provide these through functions, e.g. vocalpy.features.sat.similarity_features or vocalpy.features.warbleR.spectro_analysis
  • but at some point we're going to have re-duplication of features
  • which is where it might make sense to use classes to represent named sets of features; we'd have a "functional" module that's the implementation of the features, then
  • we might need to find a way to distinguish between frame-level features and segment-level features
    • SAT-style analyses basically extract each acoustic parameter per-frame
    • but I think warbleR takes a Raven selection table and then extracts scalar parameters per segment?
    • Or looking at it more, maybe warbleR is just taking whatever seewave gives them. More generally, I think it might be useful to have the ability to do both frame-level and segment-level feature extraction, with some way to specify how you do the reduction--I'm thinking of the pytorch reduction argument, but it could also be a callable so you say reduction=my_reduce_func and get e.g. the pitch at 20 ms or whatever you want
  • nice to have: follow logic of librosa API: accept either audio (y, in our case Audio) or spectral representation (S, in our case a Spectrogram), and if audio then apply appropriate spectral transforms to get whatever representation we need to extract the features

Related issues, to fix for closing this one

Metadata

Metadata

Assignees

No one assigned

    Labels

    Acoustic featureIssues related to the feature module, acoustic features and feature extractionENH: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions