I am wondering, whether there might be a small bug linked to the selection of "none" for the attribute of feature_select.
In the file lime.R in the function select_features there is a select-clause that contains in line 96 the following code:
none = seq_len(nrow(x)),
It seems to me that this should read:
none = seq_len(ncol(x)),
Because the matrix that is given in (called "perm" in the code) contains in the rows the permutations and in the columns the variables.
And I guess that the code should say: take all the variables.
In the following way an error can be reproduced, because it will chose the number of permutations (which by standard is 5000) instead of the number of variables:
And here it works because n_permutations is set to 3 (so that the nrow(x) is below the number of variables in the iris dataset):
explain(iris_test, explanation, n_labels = 1,n_features=2,n_permutations=3,feature_select="none")
Hello,
I am wondering, whether there might be a small bug linked to the selection of "none" for the attribute of feature_select.
In the file lime.R in the function select_features there is a select-clause that contains in line 96 the following code:
none = seq_len(nrow(x)),
It seems to me that this should read:
none = seq_len(ncol(x)),
Because the matrix that is given in (called "perm" in the code) contains in the rows the permutations and in the columns the variables.
And I guess that the code should say: take all the variables.
In the following way an error can be reproduced, because it will chose the number of permutations (which by standard is 5000) instead of the number of variables:
And here it works because n_permutations is set to 3 (so that the nrow(x) is below the number of variables in the iris dataset):
explain(iris_test, explanation, n_labels = 1,n_features=2,n_permutations=3,feature_select="none")
Kind regards!