Hello
this is the state of the art job, one that is part of most machine learning tutorials. There may be ready made solutions available for this one.
That being said, the complexity of the algorithms depends upon your data and quality of the output.
I have worked on one such code before(apart from my class assingment for machine learning). That was manufactured data though.
so, let me know what exaclty are your requirements. Feel free to send me a message here anytime
Thanks Man