A data mining approach to incremental adaptive functional diagnosis