An object of the class 'explainer'. It has additional field param_set when user can check parameters of scikitlearn model
Example of Python code
from pandas import DataFrame, read_csv
import pandas as pd
import pickle
import sklearn.ensemble
model = sklearn.ensemble.GradientBoostingClassifier()
model = model.fit(titanic_train_X, titanic_train_Y)
pickle.dump(model, open("gbm.pkl", "wb"), protocol = 2)
In order to export environment into .yml, activating virtual env via activate name_of_the_env
and execution of the following shell command is necessary
conda env export > environment.yml
Errors use case
Here is shortened version of solution for specific errors
There already exists environment with a name specified by given .yml file
If you provide .yml file that in its header contatins name exact to name of environment that already exists, existing will be set active without changing it.
You have two ways of solving that issue. Both connected with anaconda prompt. First is removing conda env with command:
conda env remove --name myenv
And execute function once again. Second is updating env via:
conda env create -f environment.yml
Conda cannot find specified packages at channels you have provided.
That error may be casued by a lot of things. One of those is that specified version is too old to be avaialble from offcial conda repo.
Edit Your .yml file and add link to proper repository at channels section.
Issue may be also connected with the platform. If model was created on the platform with different OS yo may need to remove specific version from .yml file.
- numpy=1.16.4=py36h19fb1c0_0
- numpy-base=1.16.4=py36hc3f5095_0
In the example above You have to remove =py36h19fb1c0_0
and =py36hc3f5095_0
If some packages are not availbe for anaconda at all, use pip statement
If .yml file seems not to work, virtual env can be created manually using anaconda promt.
conda create -n name_of_env python=3.4
conda install -n name_of_env name_of_package=0.20