INVASE:实例变量选择
项目描述
INVASE:实例变量选择
作者:Jinsung Yoon, James Jordon, Mihaela van der Schaar
论文:Jinsung Yoon, James Jordon, Mihaela van der Schaar, "IINVASE: Instance-wise Variable Selection using Neural Networks," 国际学习表示会议 (ICLR), 2019. (https://openreview.net/forum?id=BJg_roAcK7)
:rocket: 安装
可以使用以下方式从PyPI安装库
$ pip install invase
或者从源码安装,使用
$ pip install .
:boom: 示例用法
import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from invase import INVASE
X, y = load_iris(return_X_y=True, as_frame = True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
## Load the model
model = LogisticRegression()
model.fit(X_train, y_train)
## Load INVASE
explainer = INVASE(
model,
X_train,
y_train,
n_epoch=1000,
prefit = True, # the model is already trained
)
## Explain
explainer.explain(X_test.head(5))
:hammer: 测试
使用以下命令安装测试依赖项
pip install .[testing]
可以使用以下命令执行测试
pytest -vsx
引用
如果您使用此代码,请引用相关论文
@inproceedings{
yoon2018invase,
title={{INVASE}: Instance-wise Variable Selection using Neural Networks},
author={Jinsung Yoon and James Jordon and Mihaela van der Schaar},
booktitle={International Conference on Learning Representations},
year={2019},
url={https://openreview.net/forum?id=BJg_roAcK7},
}
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。
源代码分发
本版本没有提供源分发文件。请参阅有关生成分发归档的教程。
构建的分发
invase-0.0.3-py3-none-any.whl (9.7 kB 查看哈希值)
关闭
哈希值 for invase-0.0.3-py3-none-macosx_10_14_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 725d68a7a59e5dc76ac05e131da45b88f5839ebd40341d8995e8199b613c1fd1 |
|
MD5 | c71cfd0f90dc8cd34679c94c3336c4d0 |
|
BLAKE2b-256 | 6dc834442f64e90148a81fecb3e7e408f8e3f7bbbef579b2c1cc429b200d83ba |