scalableExplainabilities
Python package related to scaling lime plots
import scalableExplainabilities
from scalableExplainabilities import explainability
from pprint import pprint
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
import pandas as pd
if __name__ == "__main__":
DATA_PATH = r"C:\Users\gprak\Downloads\Github Repos\scalableExplainabilities\archive\HousingData.csv"
df = pd.read_csv(
DATA_PATH
)
df = explainability.automate_imputation(df)
feature_names = [
"LSTAT",
"RM",
"NOX",
"PTRATIO",
"DIS",
"AGE"
]
X = df[
feature_names
]
y = df[
"MEDV"
]
X_train, X_test, y_train, y_test = (
train_test_split(
X,
y,
test_size=0.3,
random_state=0
)
)
model = RandomForestRegressor(
max_depth=6,
random_state=0,
n_estimators=10,
n_jobs=1
)
instance_indices = [i for i in range(len(X_test))]
paths = [
f"lime_explanation_{i}.png"
for i in instance_indices
]
results = explainability.general_explainabilities(
X_train=X_train,
y_train=y_train,
X_test=X_test,
model=model,
paths=paths,
feature_names=feature_names,
instance_indices=instance_indices,
num_features=6,
progress_bar=True
)
print(results)
Metadata
Release files for scalableExplainabilities 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scalableexplainabilities-0.2.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scalableexplainabilities-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / scalableexplainabilities-0.2.0.tar.gz
| Download URL | scalableexplainabilities-0.2.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
794ad5b9b5514654dd39278e92a357fd484bd33082604580b9c0361c19d7a877
|
|
BLAKE2b-256 checksum How to use checksums |
2211cbe7cee061674fa328bbb2951a78e9196a65046feebe4a880f59648c24a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / scalableexplainabilities-0.2.0-py3-none-any.whl
| Download URL | scalableexplainabilities-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93429b43429bba6c08b860e5f52bc999e7b94cebfcc3b73af5da4c1dfe0777b7
|
|
BLAKE2b-256 checksum How to use checksums |
551cff1001b96803d3d2899ae1e07d169c1c914b40593096fee78de408d88f0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|