wetliu / energy_ood

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does the code work for tabular data?

cmougan opened this issue · comments

Let's say I want to test it in something like this

from sklearn.datasets import make_blobs
from sklearn.linear_model import LogisticRegression

X, y = make_blobs(n_samples=2000, centers=2, n_features=5, random_state=0)
X_ood, _ = make_blobs(n_samples=1000, centers=1, n_features=5, random_state=0)

How will the code be?

You will need a model, compute the log-likelihood and put that into our framework.

Means no?

Your information is limited, but based on your setting (without even defining a probability distribution to model the data), I don't think it will work in our framework. Our framework is not to find a model.

Does not it work with the X, and X_ood provided in the code snippet?

If you are referring to redefine the X and X_ood with make_blobs given a model pretrained with CIFAR , I am not sure if the model will be able to distinguish them. You can play around with our code and adapt to your application.