add pattern predict module, not complete yet.