# Welcome to cplint on SWISH This notebook gives an overview of example programs for learning with SLIPCOVER: - Machines ([mach.pl](example/learning/mach.pl), parameter and structure learning) The task is to decide whether a machine should be fixed, sent back or is ok. From The ACE Data Mining System User's Manual http://dtai.cs.kuleuven.be/ACE/doc/ACEuser-1.2.16.pdf Downloaded from http://dtai.cs.kuleuven.be/static/ACE/doc/ [mach_R.pl](example/learning/mach_R.pl) draws the ROC and PR curves with R - Registration ([registration.pl](example/learning/registration.pl), parameter and structure learning) The dataset contains information about participants in a recent Seminar on Data Mining. We would like to find out what type of people attend the parties at the seminar. From L. De Raedt, H. Blockeel, L. Dehaspe, and W. Van Laer. _Three companions for data mining in first order logic_. In S. Dzeroski and N. Lavrac, editors, Relational Data Mining, pages 105-139. Springer-Verlag, 2001. See also The ACE Data Mining System User's Manual http://dtai.cs.kuleuven.be/ACE/doc/ACEuser-1.2.16.pdf Downloaded from http://dtai.cs.kuleuven.be/static/ACE/doc/ - Bongard ([bongard.pl](example/learning/bongard.pl), [bongardkeys.pl](example/learning/bongardkeys.pl), [bongard_R.pl](example/learning/bongard_R.pl), parameter and structure learning) The task is to classify pictures containing geometrical objects. From L. De Raedt and W. Van Laer. _Inductive constraint logic_. In Proceedings of the Sixth International Workshop on Algorithmic Learning Theory, 1995. Both parameters and structure can be learned. The input theory for parameter learning has been manually crafted. =bongard.pl= contains the examples in the models format while =bongardkeys.pl= in the keys format. Structure learning takes about 2 seconds with =verbosity= = =1=. [bongard_ind.pl](example/learning/bongard_ind.pl) demonstrates the possibility of learning a different parameter for each rule grounding. [bongard_initial.pl](example/learning/bongard_initial.pl) shows how to set initial values for the parameters. [bongard_fixed.pl](example/learning/bongard_initial.pl) shows how to set some parameters as fixed. See http://cplint.eu/help/help-cplint.html#background-and-initial-lpadcpl-program - Shop ([shop.pl](example/learning/shop.pl), parameter learning) The task is to predict the shopping behavior of people. It is a toy problem from Meert, W., Struyf, J., and Blockeel, H. _Learning ground CP-Logic theories by leveraging Bayesian network learning techniques_. Fundamenta Informaticae 89, 131-160, 2008. The training data includes all possible worlds of the target program (which is also the input program), for each worlds its probability is indicated and is interpreted as a multiplicity. The testing data has been generated from the target program by sampling. The task is to perform parameter learning and observe how close to the original are the learned parameters or test on the testing data. Note that the target parameters are those given in the input program but before learning they are randomized. Parameter learning takes less than 1 second with =verbosity= = =1=. - HMM ([hmmlearn.pl](example/learning/hmmlearn.pl), parameter learning) Hidden Markov Model dataset genereted from a HMM with 2 states and 2 output symbol. The task is to recover the correct parameters. From Sato T, Kameya Y, Zhou NF _Generative modeling with failure in prism_. In Proceedings of the 19th International Joint Conference on Artificial Intelligence, 2005. The data has been generated from the target program by sampling. The task is to perform parameter learning and observe how close to the original are the learned parameters. Note that the target parameters are those given in the input program but before learning they are randomized. Parameter learning takes less than 1 second with =verbosity= = =1=. - Mutagenesis ([muta.pl](example/learning/muta.pl), parameter and structure learning) The famous Mutagenesis problem where the task is to predict whether a molecule is an active mutagenic agent. From Srinivasan A, Muggleton S, Sternberg MJE, King RD _Theories for mutagenicity: A study in first-order and feature-based induction_. Artificial Intelligence 85(1-2):277-299, 1996. Both parameters and structure can be learned. The input theory for parameter learning has been manually crafted. Structure learning takes about 100 seconds with =verbosity= = =1=. - University ([university.pl](example/learning/university.pl), parameter and structure learning) Toy dataset describing a university domain. The task is to predict the rating of courses. From Schulte, Oliver, and Hassan Khosravi. _Learning graphical models for relational data via lattice search_. Machine Learning 88.3, 331-368, 2012. Both parameters and structure can be learned. The input theory for parameter learning has been manually crafted. Structure learning takes about 120 seconds with =verbosity= = =1=. - Learning the probabilistic effects of actions in the Event Calculus ([learn_effect_axioms.pl](example/learning/learn_effect_axioms.pl), structure learning) - Fixing the values of some parameters in learning ([bongard_fixed.pl](example/learning/bongard_fixed.pl)), see the help http://friguzzi.github.io/cplint/_build/html/index.html#background-and-initial-lpad-cpl-program - Setting the initial values of parameters in learning ([bongard_initial.pl](example/learning/bongard_initial.pl)), see the help http://friguzzi.github.io/cplint/_build/html/index.html#background-and-initial-lpad-cpl-program - Learning different parameters for different instantiations of rules ([bongard_ind.pl](example/learning/bongard_ind.pl)), see the help http://friguzzi.github.io/cplint/_build/html/index.html#background-and-initial-lpad-cpl-program - Machines (parameter and structure learning) The task is to decide whether a machine should be fixed, sent back or is ok. From The ACE Data Mining System User's Manual http://dtai.cs.kuleuven.be/ACE/doc/ACEuser-1.2.16.pdf Downloaded from http://dtai.cs.kuleuven.be/static/ACE/doc/ Parameter learning [mach_par.pl](example/learning/mach_par.pl). [mach_par_R.pl](example/learning/mach_par_R.pl) draws the ROC and PR curves with R. In this problem there are three classes, we learn the structure for two of them separately [mach_sendback.pl](example/learning/mach_sendback.pl), [mach_fix.pl](example/learning/mach_fix.pl) and then we combine the two definitions in a third file for testing [mach_all.pl](example/learning/mach_all.pl) More examples are included in the standalone version of =cplint= at https://github.com/friguzzi/cplint The standalone version of =cplint= can be installed as a SWI-Prolog pack http://www.swi-prolog.org/pack/list The other datasets include Carcinogenesis, Cora, Hepatitis, HIV, IMDB, Mondial, UWCSE and WebKB. They have not been included here because of their computational cost. An example of just the computation of the areas under the ROC and PR curves is [exauc.pl](example/exauc.pl).