Skip to content

Commit 06b68e2

Browse files
Copilotrinziv
andcommitted
Update README.rst with accurate API examples and GitHub Pages documentation link
Co-authored-by: rinziv <12544167+rinziv@users.noreply.github.com>
1 parent 673027a commit 06b68e2

1 file changed

Lines changed: 25 additions & 12 deletions

File tree

README.rst

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ Image Data
5858
Text Data
5959
---------
6060

61-
* 🚧 **Work in Progress** - Coming soon!
61+
* **LIME** - Local Interpretable Model-agnostic Explanations for text classification
6262

6363
Time Series Data
6464
----------------
6565

66-
* 🚧 **Work in Progress** - Coming soon!
66+
* **LASTS** - Local Agnostic Subsequence-based Time Series explanations
6767

6868
|
6969
@@ -110,19 +110,24 @@ Here's a simple example of using LIME for tabular data explanation:
110110

111111
.. code-block:: python
112112
113-
from xailib import Explainer
113+
from xailib.explainers.lime_explainer import LimeXAITabularExplainer
114+
from xailib.models.sklearn_classifier_wrapper import sklearn_classifier_wrapper
114115
115-
# Initialize your black-box model
116-
# model = YourModel()
116+
# Wrap your scikit-learn model
117+
bb = sklearn_classifier_wrapper(your_trained_model)
117118
118-
# Create an explainer
119-
explainer = Explainer(model, method='lime')
119+
# Create and fit the LIME explainer
120+
explainer = LimeXAITabularExplainer(bb)
121+
explainer.fit(df, 'target_column', config={
122+
'discretize_continuous': True,
123+
'feature_selection': 'auto'
124+
})
120125
121-
# Generate explanation for a sample
122-
explanation = explainer.explain(sample_data)
126+
# Generate explanation for an instance
127+
explanation = explainer.explain(instance, num_samples=1000)
123128
124-
# Visualize the explanation
125-
explainer.visualize(explanation)
129+
# Visualize feature importance
130+
explanation.plot_features_importance()
126131
127132
For more examples and detailed usage, please check the `examples/ <https://github.com/kdd-lab/XAI-Lib/tree/main/examples>`_ directory.
128133

@@ -133,10 +138,18 @@ For more examples and detailed usage, please check the `examples/ <https://githu
133138

134139
For detailed documentation, tutorials, and API reference, visit:
135140

136-
* **Documentation**: `https://xai-lib.readthedocs.io/ <https://xai-lib.readthedocs.io/>`_
141+
* **GitHub Pages Documentation**: `https://kdd-lab.github.io/XAI-Lib/ <https://kdd-lab.github.io/XAI-Lib/>`_
142+
* **Read the Docs**: `https://xai-lib.readthedocs.io/ <https://xai-lib.readthedocs.io/>`_
137143
* **GitHub Repository**: `https://github.com/kdd-lab/XAI-Lib <https://github.com/kdd-lab/XAI-Lib>`_
138144
* **Issue Tracker**: `https://github.com/kdd-lab/XAI-Lib/issues <https://github.com/kdd-lab/XAI-Lib/issues>`_
139145

146+
The documentation includes:
147+
148+
* **Getting Started Guide**: Installation and quick start tutorials
149+
* **API Reference**: Complete documentation of all classes and methods
150+
* **Examples**: Practical examples for tabular, image, and text data
151+
* **Contributing Guide**: How to contribute to the project
152+
140153
|
141154
142155
🤝 Contributing

0 commit comments

Comments
 (0)