Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ReadMe. Fixed typo in partial_dependence.
And added more docstring
- Loading branch information
Showing
5 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,52 @@ | ||
# InterpretMe | ||
|
||
[![Build Status](https://travis-ci.com/mmahrouss/InterpretMe.jl.svg?branch=master)](https://travis-ci.com/mmahrouss/InterpretMe.jl) | ||
[![Build Status](https://ci.appveyor.com/api/projects/status/github/mmahrouss/InterpretMe.jl?svg=true)](https://ci.appveyor.com/project/mmahrouss/InterpretMe-jl) | ||
[![Codecov](https://codecov.io/gh/mmahrouss/InterpretMe.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/mmahrouss/InterpretMe.jl) | ||
[![Coveralls](https://coveralls.io/repos/github/mmahrouss/InterpretMe.jl/badge.svg?branch=master)](https://coveralls.io/github/mmahrouss/InterpretMe.jl?branch=master) | ||
[![Build Status](https://travis-ci.com/mmahrouss/InterpretMe.jl.svg?branch=master)](https://travis-ci.com/mmahrouss/InterpretMe.jl) [![Build Status](https://ci.appveyor.com/api/projects/status/github/mmahrouss/InterpretMe.jl?svg=true)](https://ci.appveyor.com/project/mmahrouss/InterpretMe-jl) [![Codecov](https://codecov.io/gh/mmahrouss/InterpretMe.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/mmahrouss/InterpretMe.jl) [![Coveralls](https://coveralls.io/repos/github/mmahrouss/InterpretMe.jl/badge.svg?branch=master)](https://coveralls.io/github/mmahrouss/InterpretMe.jl?branch=master) | ||
|
||
InterpretMe is Julia Package aimed at providing interpret-ability tools for Machine Learning models in Julia. | ||
|
||
## Installation | ||
|
||
```julia | ||
julia>] | ||
pkg> add InterpretMe | ||
``` | ||
|
||
Please note that the package is still a Work In Progress and has not been registered yet. Thus, for now you should install it as follows: | ||
|
||
```julia | ||
julia>] | ||
pkg> add https://github.com/mmahrouss/InterpretMe.jl | ||
``` | ||
|
||
## Example | ||
|
||
First import the package: | ||
|
||
```julia | ||
Using InterpretMe | ||
``` | ||
|
||
Then train a model from [ScikitLearn.jl](https://github.com/cstjean/ScikitLearn.jl)'s examples. We are going to use the [Iris Example](https://github.com/cstjean/ScikitLearn.jl/blob/master/notebooks/Iris.ipynb) | ||
|
||
Load the packages and train the model: | ||
|
||
```julia | ||
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. | ||
|
||
```julia | ||
pd, vals = partial_dependence(x, [1], x -> ScikitLearn.predict_proba(model,x), | ||
100, false) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
module InterpretMe | ||
|
||
# greet() = print("Hello World!") | ||
include("pdp.jl") | ||
export partial_dependance | ||
export partial_dependence | ||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters