RumbleDB / RumbleDB/rumble

RumbleML IndexToString does not work

Open
#552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug RumbleML
Dominant language
Java
Stars
246
Forks
85
Avg merge
6d 1h
Merged PRs (30d)
22

Description

Fix the problem with indexToString. The following example adapted from the docs does not work properly

let $raw-data := parallelize((
    {"id": 0, "category": "a", "categoryIndex": 1},
    {"id": 1, "category": "b", "categoryIndex": 2},
    {"id": 2, "category": "c", "categoryIndex": 3},
    {"id": 3, "category": "a", "categoryIndex": 1},
    {"id": 4, "category": "a", "categoryIndex": 1},
    {"id": 5, "category": "c", "categoryIndex": 3}
))

let $data := annotate(
    $raw-data
    { "id": "integer", "category": "string", "categoryIndex": "integer" }
)

let $transformer := get-transformer("IndexToString")
for $result in $transformer(
    $data,
    { "inputCol": "categoryIndex", "outputCol": "originalCategory"}
)
return {
    "label": $result.label,
    "category": $result.category,
    "categoryIndex": $result.categoryIndex,
    "originalCategory": $result.originalCategory
}

An error has occurred: org.apache.spark.ml.attribute.UnresolvedAttribute$ cannot be cast to org.apache.spark.ml.attribute.NominalAttribute
We should investigate this 🙈. Please contact us or file an issue on GitHub with your query.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied RumbleML query and comparing its IndexToString call with the linked Spark ML example. Trace the get-transformer("IndexToString") entry point and the metadata used for categoryIndex; done means the query completes and originalCategory contains the expected category values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spark
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.