Comments (5)
Hi,
- If I remember correctly the dimension of the input layer of the VAE is a hyperparameter. For example when testing REVISE there is the following:
vae_params = {
"layers": [sum(model.get_mutable_mask()), 512, 256, 8],
"epochs": 1,
}
but I'm not sure if that's the problem that you mean.
- The reason the code doesn't really work for GPU is just mainly because my laptop doesn't have a GPU, so I never really tested that. Plus the automated testing on GitHub also uses the CPU. It should be easy to fix though I think. A pull request fixing that would be great!
from carla.
Is what is described for 1. a good solution for this issue?
And 2. is being fixed in PR 187.
from carla.
Hi,
Yes for 1. that solutions works.
-
It might be nice to update
experimental_setup.yaml
to reflect this. -
I also noticed that the Quickstart in the README no longer works. I think it should be changed to something like
from carla.data.catalog.online_catalog import OnlineCatalog
from carla.models.catalog import MLModelCatalog
from carla.models.negative_instances import predict_negative_instances
from carla.recourse_methods.catalog import GrowingSpheres
# load a catalog dataset
data_name = "adult"
dataset = OnlineCatalog(data_name)
# load artificial neural network from catalog
model = MLModelCatalog(dataset, "ann", "tensorflow")
# get factuals from the data to generate counterfactual examples
factuals = predict_negative_instances(model, dataset.df)
test_factual = factuals.iloc[:5]
# load a recourse model and pass black box model
gs = GrowingSpheres(model)
# generate counterfactual examples
counterfactuals = gs.get_counterfactuals(test_factual)
- In the
feature/tutorial-notebook
branch, innotebooks/how_to_use_carla.ipynb
, under CCHVAE,
hyperparams = {
"data_name": dataset.name,
"n_search_samples": 100,
"p_norm": 1,
"step": 0.1,
"max_iter": 1000,
"clamp": True,
"binary_cat_features": False,
"vae_params": {
"layers": [len(ml_model.feature_input_order), 512, 256, 8],
"train": True,
"lambda_reg": 1e-6,
"epochs": 5,
"lr": 1e-3,
"batch_size": 32,
},
}
should be changed to
hyperparams = {
"data_name": dataset.name,
"n_search_samples": 100,
"p_norm": 1,
"step": 0.1,
"max_iter": 1000,
"clamp": True,
"binary_cat_features": False,
"vae_params": {
"layers": [sum(model.get_mutable_mask()), 512, 256, 8],
"train": True,
"lambda_reg": 1e-6,
"epochs": 5,
"lr": 1e-3,
"batch_size": 32,
},
}
- Finally, in the main branch, carla/recourse_methods/catalog/focus/tree_model.py is currently empty.
from carla.
- I'll take a look at that.
- Thanks, I'll also update that.
- That branch is outdated, I deleted it now. Should use this instead: https://carla-counterfactual-and-recourse-library.readthedocs.io/en/latest/notebooks/how_to_use_carla.html
- The tree models are moved, but I don't know why the file is still there. I'll update that as well.
from carla.
Great! Looking forward to see all the changes :)
from carla.
Related Issues (20)
- Discrepancy in counterfactual indexing for CLUE generator HOT 12
- Wachter et al. Couterfactuals HOT 6
- Update pip install carla-recourse HOT 1
- Give error message when a recourse method used with wrong backend.
- CCHVAE's support for categorical features HOT 5
- Import fails with `protobuf>3.20.x` HOT 8
- `test_cfmodel.py` cause segmentation fault on MacOS HOT 1
- max_iter in growing_spheres_search HOT 3
- immutable features for adult dataset HOT 2
- Add encoding_method functionality HOT 4
- Update experimental_setup.yaml
- Update Quickstart in the README HOT 1
- Delete carla/recourse_methods/catalog/focus/tree_model.py
- Update CCHVAE hyperpamaters in notebooks/how_to_use_carla
- Update benchmarking example HOT 1
- Custom loss function
- How to Provide Constraints on Counterfactual Generation
- Running FACE with no immutable features
- Negative `lambda` in Wachter method?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carla.