Not OP, but you may find Inductive Logic Programming (ILP) interesting, ie. ML with a logic programming flavor for learning logic theories from data. While [1] focusses on porting the well-known Aleph ILP package to ISO Prolog and getting it to speed via parallelization, it might give you enough of an idea and a couple pointers where to go from there.
Working with CSV or JSON data and performing relational ad hoc queries or employing Prolog for combinatoric test/coverage data generation is also very convenient.