Uploaded image for project: 'Zapped: AcousticBrainz'
  1. Zapped: AcousticBrainz
  2. AB-91

Map model classes to more meaningful labels

      On this page http://acousticbrainz.org/c92dfc48-3428-4da3-b40d-eaec5fdbdbda

      Tzanetakis' method has value of "jaz", which strongly suggests it is misspelled "jazz".

          [AB-91] Map model classes to more meaningful labels

          We've released a change for this. You can now add ?map_classes=true to a highlevel api query and it'll show human readable class names

          Alastair Porter added a comment - We've released a change for this. You can now add ?map_classes=true to a highlevel api query and it'll show human readable class names

          We have a `model` table: https://github.com/metabrainz/acousticbrainz-server/blob/629431054c6adbcfb80e74336510ef355f014f0d/admin/sql/create_tables.sql#L50-L56
          which is populated with data for our existing Essentia models: https://github.com/metabrainz/acousticbrainz-server/blob/629431054c6adbcfb80e74336510ef355f014f0d/admin/sql/create_models.sql

          This is probably only an issue for these existing models, not so much for new ones that we create (where presumably dataset creators will use more descriptive class names)

          For these existing models, we could create a new column on the `model` table: `class_mapping`, which is a jsonb field mapping

          {"shortkey": "Long name"}

          In the places where we get data from this dataset we could then apply this mapping when showing the values.

          Some ideas on implementation:

          Alastair Porter added a comment - We have a `model` table: https://github.com/metabrainz/acousticbrainz-server/blob/629431054c6adbcfb80e74336510ef355f014f0d/admin/sql/create_tables.sql#L50-L56 which is populated with data for our existing Essentia models: https://github.com/metabrainz/acousticbrainz-server/blob/629431054c6adbcfb80e74336510ef355f014f0d/admin/sql/create_models.sql This is probably only an issue for these existing models, not so much for new ones that we create (where presumably dataset creators will use more descriptive class names) For these existing models, we could create a new column on the `model` table: `class_mapping`, which is a jsonb field mapping {"shortkey": "Long name"} In the places where we get data from this dataset we could then apply this mapping when showing the values. Some ideas on implementation: For places like the recording view page ( http://acousticbrainz.org/c92dfc48-3428-4da3-b40d-eaec5fdbdbda ) we could have a helper method which takes a model name and short classname and return the full classname. We could have a version of `get_high_level` (or a parameter) ( https://github.com/metabrainz/acousticbrainz-server/blob/629431054c6adbcfb80e74336510ef355f014f0d/db/data.py#L362 ) which returns this mapped data directly If we have the modified `get_high_level` then we could also expose this parameter in the API for those who want to get this modified data.

          Yes, it is jazz, but it's not misspelled. More specifically, we return the identified class, which is one of

          blu cla cou dis hip jaz met pop reg roc

          We have the same situation in other classifiers too. Perhaps we should map classes to more meaningful identifiers

          Alastair Porter added a comment - Yes, it is jazz, but it's not misspelled. More specifically, we return the identified class, which is one of blu cla cou dis hip jaz met pop reg roc We have the same situation in other classifiers too. Perhaps we should map classes to more meaningful identifiers

            Unassigned Unassigned
            nagisa Simonas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2019-07-01.0