Optimize trend detection and pattern recognition with machine learning, AI, analytics and data management