microsoft / microsoft/SynapseML

Categorical Features and Missing Values

Open
#874 3 comments 0 reactions 1 assignee Claimed by @imatiach-msft View on GitHub
area/documentation area/lightgbm bug
Dominant language
Scala
Stars
5.2k
Forks
868
Avg merge
22h 9m
Merged PRs (30d)
45

Description

Hi mmlspark team,

Given I have a LightGBM model trained in python with a dataset that contains categorical features and missing values. Now LightGBM deals with both under the hood which is neat.

After saving the model I want to load this in the Scala implementation of mmlspark to make predictions,, which works fine. It gives me a LightGBMBooster. However, the scala implementation requires a Vector of Double values for the predict or predictLeaf method. This leaves me wonder how to deal with categorical features and missing values.

**Categorical Features:** Is the right approach here to run the categorical features of the train set through a StringIndexer and then use that indexer to transform my input features into the correct numerical representation?

**Missing Values:** Here I am a bit puzzled what the right approach is to represent missing values.

Many thanks
Seb

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.