You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It says: pair.id <- which(!is.na(all.exp))
pair.id is normally supposed to correspond to the rowname and therefore the instances used, but it returns something else. The latter returns the index of non-empty cells if the dataframe is transformed into a huge column-by-column vector. So in the pdf, the mechanism returns instances but not the ones used.
To fix this, write :
pair.id <- which(!is.na(all.exp), arr.ind=TRUE)[, "row"]
There will be no conversion to vector.
I tested on irace 3.5 and with an all.exp of 32x1492
The text was updated successfully, but these errors were encountered:
The example there is designed to work when all.exp is a vector, so is.na() and which() return vectors.
If you select two configurations or more, then all.exp is a matrix and, you would need to choose of these two options:
# You want instances where all configurations have been evaluated:pair.id<- which(apply(!is.na(all.exp), 1, all))
# You want instances where at least one configuration has been evaluated:pair.id<- which(apply(!is.na(all.exp), 1, any))
For the next version of irace, I am going to change this example to make the above clearer.
Hello,
to this line :
irace/vignettes/irace-package.Rnw
Line 2024 in 35d09d9
It says: pair.id <- which(!is.na(all.exp))
pair.id is normally supposed to correspond to the rowname and therefore the instances used, but it returns something else. The latter returns the index of non-empty cells if the dataframe is transformed into a huge column-by-column vector. So in the pdf, the mechanism returns instances but not the ones used.
To fix this, write :
pair.id <- which(!is.na(all.exp), arr.ind=TRUE)[, "row"]
There will be no conversion to vector.
I tested on irace 3.5 and with an all.exp of 32x1492
The text was updated successfully, but these errors were encountered: