TRR318 / scikit-psl

Probabilistic Scoring System – a probabilistic & incremental extension to Scoring Systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lookahead should respect predefined scores even if the solution is suboptimal

stheid opened this issue · comments

len_pre = min(len(set(predef_features) & remaining_features), len_)
len_rest = len_ - len_pre
if strict and predef_features:
prefixes = [
[f_ for f_ in predef_features if f_ in remaining_features][:len_pre]
]
else:
prefixes = permutations(
set(predef_features) & remaining_features, len_pre
)

lookahead should not consider any additional features for selection untill the prefix is exausted.

maybe that is already the case, and maybe we need the lookahead regardless because we might need to lookahead when selecting the score for the current feature.

just needs to be checked, as it might save runtime