3 ms·
I actively use Prolog for data analysis. There is an initial phase in which you have to force yourself to do everything you can in Prolog mostly to understand h
by usgroup 3y ago
I actively use Prolog for data analysis. There is an initial phase in which you have to force yourself to do everything you can in Prolog mostly to understand how to convert a question into a symbolic problem because Prolog has terrible support for scientific computing and string manipulation. Thereafter Prolog solutions are often more elegant than the next best thing.
It is also a logical paradigm and it is worth spending the time understanding how [proof by negation] + [unification] = [logical programming]. For me it is without doubt the most mind expanding programming language I've ever learned.
- NotMichaelBay 3y agointeresting, can you give an example of how you would use it for data analysis?
- tannhaeuser 3y agoNot 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. [1]: https://quantumprolog.sgml.io/bioinformatics-demo/part1.html https://quantumprolog.sgml.io/bioinformatics-demo/part1.html
- usgroup 3y agoSure: https://emiruz.com/post/2023-04-30-prolog-for-data-science/ https://emiruz.com/post/2023-04-30-prolog-for-data-science/ https://emiruz.com/post/2023-05-12-semi-supervised-clustering/ https://emiruz.com/post/2023-05-12-semi-supervised-clusterin...
- crabbone 3y agoProlog has very decent support for string manipulation... there are hardly any modern popular languages that offer anything like DCGs out of the box. Even though standard Prolog doesn't have regular expressions out of the box, popular implementations usually have libraries to do that. If I had to do a lot of work with strings, and I had to choose between, say, C and Prolog, I'd definitely go with Prolog. If it was Python vs Prolog, it would depend on a task...