Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constant-zero no matter what #8

Open
kazemia opened this issue Jul 11, 2018 · 1 comment
Open

constant-zero no matter what #8

kazemia opened this issue Jul 11, 2018 · 1 comment

Comments

@kazemia
Copy link

kazemia commented Jul 11, 2018

Hi,
I tried using this package, and in the total dictionary I only got constant vectors. I digged a bit in the code and it seems like in line 217 in orthogonal_projection.py, you pass ptb_strategy="constant-zero"to replace_column_of_matrix no matter what the user has selected as direct_input_pertubation_strategy. This means the algorithm produces the exact same number in each iteration no matter what.
So in line 217 in orthogonal_projection.py, "constant-zero" should be replaced by direct_input_pertubation_strategy.

In addition the comments are not consistent with what the algorithm actually does.
In line 132 in orthogonal_projection.py you have:
direct_input_pertubation_strategy -> This is referring to how to zero out a
single variable. One of three different options
1) replace with a random constant value
2) replace with median constant value
3) replace all values with a random permutation of
the column. options = [constant-zero,
constant-median, global-permutation]

While in reality, you should have:

direct_input_pertubation_strategy -> This is referring to how to zero out a
single variable. One of three different options
1) replace with 0 constant value
2) replace with median constant value
3) replace with one random sample from the data
options = [constant-zero, constant-median, random-sample]

Also the first option, which is the default is not very smart, given that 0 might not even be in the range of the variable.

Otherwise IOFP is a smart idea ;)

@kazemia
Copy link
Author

kazemia commented Jul 11, 2018

Also, in line 17 of perturbation_strategies.py, random_sample[random_sample] should be replaced by random_sample[column_number]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant