Artificial Intelligence Based Techniques For Rare Patterns Detection in the Industrial Field