scikit-learn-contrib / skope-rules

machine learning with logical rules in Python
http://skope-rules.readthedocs.io
Other
599 stars 96 forks source link

what is nb? #35

Open Sandy4321 opened 4 years ago

Sandy4321 commented 4 years ago

what is nb? https://skope-rules.readthedocs.io/en/latest/skope_rules.html

For example

skope_rulesclf.rules

[('Pclass <= 2.5 and isFemale > 0.5', (0.9527320854603895, 0.5283115637180831, 6))]

rules_(dict of tuples (rule, precision, recall, nb).) The collection of n_estimators rules used in the predict method.

The rules are generated by fitted sub-estimators (decision trees).

Each rule satisfies recall_min and precision_min conditions.

The selection is done according to OOB precisions.estimators_(list of DecisionTreeClassifier)

The collection of fitted sub-estimators used to generate candidate rules.estimatorssamples(list of arrays)

The subset of drawn samples (i.e., the in-bag samples) for each base estimator.estimatorsfeatures(list of arrays)

The subset of drawn features for each base estimator.maxsamples(integer)

The actual number of samplesnfeatures(integer)

The number of features when fit is performed.classes_(array, shape (n_classes,))

The classes labels.

kabil1001 commented 3 years ago

Nb represents the number of trees had this rule.

ngoix commented 3 years ago

nb is the number of times the rule appears (as a tree) in the underlying bagging estimator. the doc is not clear on this, PR welcome to update it.

zhuji423 commented 2 years ago

thanks,the problem is solved