[python package]: suggestion: lgb.Booster.predict() should check that the input X data makes sense #812
Closed
Description
In particular, I'm thinking about these things:
- if the input is an np.array, check that the columns is the same as the number of features the lgb.Booster object uses. if not, throw a warning.
- if the input is a pd.Dataframe object, should check that the feature_names of the lgb.Booster object is a superset of the columns of the pd.Dataframe
- if feature names in the booster object are repeated, or if column names in the pd.Dataframe are repeated, fall back to 0.
if these things sound reasonable I'd be happy to add these checks to the lgb.Booster.predict() function prior to calling the lgb._InnerPredictor.predict()