Skip to main content

INVASE: Instance-wise Variable Selection

Project description

INVASE: Instance-wise Variable Selection

Tests Downloads arXiv Test In Colab License: MIT

image

Authors: Jinsung Yoon, James Jordon, Mihaela van der Schaar

Paper: Jinsung Yoon, James Jordon, Mihaela van der Schaar, "IINVASE: Instance-wise Variable Selection using Neural Networks," International Conference on Learning Representations (ICLR), 2019. (https://openreview.net/forum?id=BJg_roAcK7)

:rocket: Installation

The library can be installed from PyPI using

$ pip install invase

or from source, using

$ pip install .

:boom: Sample Usage

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: Tests

Install the testing dependencies using

pip install .[testing]

The tests can be executed using

pytest -vsx

Citing

If you use this code, please cite the associated paper:

@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},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

invase-0.0.3-py3-none-macosx_10_14_x86_64.whl (9.7 kB view hashes)

Uploaded Python 3 macOS 10.14+ x86-64

invase-0.0.3-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page