I am new in this field and I read some articles on Feature Selection. What does "consistency" function do in R's FSelector package? For instance,

consistency(Species ~ ., iris) 

results in "Petal.Width"

Can you explain me what this feature says in terms of consistency? Based on a paper I read,

"A feature set {F1,..., Fn} is said to be consistent, when Pr(C = c | F1 = f1,..., Fn = fn)=0 or 1 holds for all c, f1,...,fn. When a feature subset is consistent, the inconsistency value is 0, and as an inconsistent feature subset approaches the consistent state, the measure decreasingly approaches 0."

If we take Species as class, how is Petal.Width the result of consistency function on iris dataset? For instance, Petal.Width =1.4 is found both in virginica and versicosis species. I think I'm missing something here.


When you perform feature selection with consistency in FSelector, values are discretized. This is rather common approach when using consistency.

After discretization, search through feature combination space is performed with best.first.search function. Search objective function is consistency measure (can be also calculated as 1-inconsistency). How to calculate inconsistency measure is ilustrated in image below (Liu's measure). I added link to original paper and believe that is enough information to get a grasp on the subject.

Hope this helps.

enter image description here

Package documentation:

Github repo:

Used paper:
Arauzo-Azofra, A., Benitez, J.M. & Castro, J.L. J Intell Inf Syst (2008) 30: 273. https://doi.org/10.1007/s10844-007-0037-0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.