Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
csinva committed Feb 12, 2021
1 parent d3d3754 commit 5ada8a9
Show file tree
Hide file tree
Showing 17 changed files with 1,968 additions and 745 deletions.
36 changes: 27 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ <h1 align="center"> Interpretable machine-learning models (imodels) 🔍</h1>
<p align="center"> Python package for concise, transparent, and accurate predictive modeling. All sklearn-compatible and easily customizable.
</p>
<p align="center">
<a href="https://github.com/csinva/imodels">Github</a>
<a href="https://csinva.github.io/imodels/">docs</a>
<a href="#imodels-overview">imodels overview</a>
<a href="#demo-notebooks">Demo notebooks</a>
<a href="#demo-notebooks">demo notebooks</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/License-MIT-orange.svg">
<img src="https://img.shields.io/badge/license-mit-blue.svg">
<img src="https://img.shields.io/badge/python-3.6--3.8-blue">
<a href="https://github.com/csinva/imodels/actions"><img src="https://github.com/csinva/imodels/workflows/tests/badge.svg"></a>
<img src="https://img.shields.io/pypi/v/imodels?color=blue">
<img src="https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue">
<img src="https://img.shields.io/github/checks-status/csinva/imodels/master">
<img src="https://img.shields.io/pypi/v/imodels?color=orange">
<img src="https://static.pepy.tech/personalized-badge/imodels?period=total&units=none&left_color=grey&right_color=orange&left_text=downloads">
</p>
<h2 id="imodels-overview">imodels overview</h2>
<p>Implementations of different popular interpretable models can be easily used and installed:</p>
Expand All @@ -46,6 +48,12 @@ <h2 id="imodels-overview">imodels overview</h2>
model.fit(X_train, y_train) # fit model
preds = model.predict(X_test) # discrete predictions: shape is (n_test, 1)
preds_proba = model.predict_proba(X_test) # predicted probabilities: shape is (n_test, n_classes)
print(model) # print the rule-based model

-----------------------------
# if X1 &gt; 5: then 80.5% risk
# else if X2 &gt; 5: then 40% risk
# else: 10% risk
</code></pre>
<p>Install with <code>pip install imodels</code> (see <a href="https://github.com/csinva/imodels/blob/master/docs/troubleshooting.md">here</a> for help). Contains the following models:</p>
<table>
Expand Down Expand Up @@ -134,10 +142,18 @@ <h2 id="imodels-overview">imodels overview</h2>
</tbody>
</table>
<p>Different models and algorithms vary not only in their final form but also in different choices made during modeling. In particular, many models differ in the 3 steps given by the table below.</p>
<ul>
<li>ex. RuleFit and SkopeRules differ only in the way they prune rules: RuleFit uses a linear model whereas SkopeRules heuristically deduplicates rules sharing overlap.</li>
<li>ex. Bayesian rule lists and greedy rule lists differ in how they select rules; bayesian rule lists perform a global optimization over possible rule lists while Greedy rule lists pick splits sequentially to maximize a given criterion.</li>
</ul>
<details>
<summary>ex. RuleFit and SkopeRules</summary>
RuleFit and SkopeRules differ only in the way they prune rules: RuleFit uses a linear model whereas SkopeRules heuristically deduplicates rules sharing overlap.
</details>
<details>
<summary>ex. Bayesian rule lists and greedy rule lists</summary>
Bayesian rule lists and greedy rule lists differ in how they select rules; bayesian rule lists perform a global optimization over possible rule lists while Greedy rule lists pick splits sequentially to maximize a given criterion.
</details>
<details>
<summary>ex. FPSkope and SkopeRules</summary>
FPSkope and SkopeRules differ only in the way they generate candidate rules: FPSkope uses FPgrowth whereas SkopeRules extracts rules from decision trees.
</details>
<p>See the docs for individual models for futher descriptions.</p>
<table>
<thead>
Expand Down Expand Up @@ -279,6 +295,8 @@ <h2 id="references">References</h2>
from .rule_list.greedy_rule_list import GreedyRuleListClassifier
from .rule_list.one_r import OneRClassifier
from .rule_set.rule_fit import RuleFitRegressor, RuleFitClassifier
from .rule_set.fplasso import FPLassoRegressor, FPLassoClassifier
from .rule_set.fpskope import FPSkopeClassifier
from .rule_set.skope_rules import SkopeRulesClassifier
from .rule_set.boosted_rules import BoostedRulesClassifier
# from .tree.iterative_random_forest.iterative_random_forest import IRFClassifier
Expand Down
Loading

0 comments on commit 5ada8a9

Please sign in to comment.