Closed Nitinsiwach closed 2 years ago
@Nitinsiwach those methods are on the LightGBMClassificationModel and not LightGBMClassifier. The notebook is a bit confusing because it does this re-assignment step:
model = model.fit(train_data)
It should be more like:
from synapse.ml.lightgbm import LightGBMClassifier
untrained_model = LightGBMClassifier(objective="binary", featuresCol="features", labelCol="Bankrupt?", isUnbalance=True)
model = untrained_model.fit(train_data)
or something similar. Note in spark the classes are immutable, which is a little different from the scikit-learn style API.
It looks like you are trying to call the methods on untrained_model and not model, which is why you are seeing the errors.
Yup! This solves it all. Thank you very much you good good man! :)
Things don't work out as per the official overview.ipynb
I am trying to build a model in local mode on pyspark.
Post this I am able to train the model successfully (I think!)
Issues:
saveNativeModel
attribute available with model..save
(this is the only save attribute available)Expected behavior As mentioned in the official overview.ipynb.
Info (please complete the following information):
Can you please help me understand what to do post training the model. I am looking for
save
,load
andpredict
capabilities