InterpretMe is Julia Package aimed at providing interpret-ability tools for Machine Learning models in Julia.
julia>]
pkg> add InterpretMe
First import the package:
Using InterpretMe
Then train a model from ScikitLearn.jl's examples. We are going to use the Iris Example
Load the packages and train the model:
import ScikitLearn
import RDatasets
ScikitLearn.@sk_import linear_model: LogisticRegression
iris = RDatasets.dataset("datasets", "iris")
X = convert(Array, iris[[:SepalLength, :SepalWidth, :PetalLength, :PetalWidth]])
y = convert(Array, iris[:Species])
model = ScikitLearn.fit!(LogisticRegression(), X, y)
Now we can calculate the partial_dependance function from InterpretMe.
pd, vals = partial_dependence(x, [1], x -> ScikitLearn.predict_proba(model,x),
100, false)