Question: I want to follow up on this question: [What is the difference between a definition and a declaration?](https://stackoverflow.com/questions/1410563/what-is-the-difference-between-a-definition-and-a-declaration), there is answer about definition and a declaration, but nothing about implementation.

I want also know what is the difference between implementation and definition.

Answer: 
Perhaps you are looking for stacked classifiers.

In this approach, the predictions of earlier models are available as features for later models.

Look into [StackingClassifiers](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.StackingClassifier.html).

Adapted from the documentation:

```
from sklearn.ensemble import StackingClassifier

estimators = [
     ('dtc_model', DecisionTreeClassifier()),
 ]

clf = StackingClassifier(
                estimators=estimators, 
                final_estimator=LGBMClassifier()
      )

```
Unfortunately this is not possible at present. According to the doc at <https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMClassifier.html?highlight=init_model>, you can continue training the model if the model is from lightgbm.

I did try this setup with:

```
# dtc
dtc_model = DecisionTreeClassifier()
dtc_model = dtc_model.fit(X_train, y_train)

# save
dtc_fn = 'dtc.pickle.db'
pickle.dump(dtc_model, open(dtc_fn, 'wb'))

# lgbm
lgbm_model = LGBMClassifier()
lgbm_model.fit(X_train_2, y_train_2, init_model=dtc_fn)

```

And I get:

```
LightGBMError: Unknown model format or submodel type in model file dtc.pickle.db

```