Code Monkey home page Code Monkey logo

cdl's Introduction

Common-Description Learning (CDL)

This is a new framework to learn simples patterns from a few number of examples and use them to learn more complex ones. the learned models are perfectly interpretable and its depth depends on the question. What is meant by depth here is that whenever needed, the model learns to break down the problem into simpler subproblems and solves them using previously learned models, CDL is written in C++ and tested on 32 small datasets

The paper can be found at https://arxiv.org/abs/1605.00241

Group_B (dataset_2): Three one-digit numbers addition

example1




Group_A (dataset_19): Reverse task

example2




Group_B (dataset_3)

example2




Group_A (dataset_24): Comparing One Digit Numbers

example2

Directories

src/ - source files

dataset/ - three groups of small datasets (Group_A: 25 datasets, Group_B: 5 datasets,Group_C: 2 datasets). The first line in Group_A.dat contains the number of the small dataset in the file (must be 0). The next line contains the number of training sequences followed by the training seqences. The next line conatins number of testing sequences followed by the testing sequences.

experiments/

  • 3 outputFiles: contain MGICDs learned in each group of datasets and some details about training
  • 32 animation files that explain how MGICD solve the test questions, they can be shown by running animate.py but you need first to change the directory of the animation file in the first line in animate.py. You can also change the animation speed by changing the value of nodeTime (Tested on Python 3).
  • Most of PCDs in the outputFiles can be displayed by visualizeCD.py, but it need first to be copied in CD.dat

Installation on Linux

$ make
$ ./runner

Usage

You can edit Driver.cpp to learn datasets in Group_A, Group_B or Group_C. For example, to learn the first dataset in Group_A write this in main() function:

    IOH.loadDatasetsAndQuestionsFromFile("dataset/Group_A.dat");
    Constants::redirectStdoutToOutputFile = true;  //redirect stdout to OutputFile.txt
    setHyperParameters(1,2,1,2,7,0,0,1);           //set hyperparamters for the 25 dataset in file Group_A.dat
    TE.learnAndTest(0);                            //learn & test the first Dataset in file Group_A.dat

The results and learned models will be saved in OutputFile.txt. To learn all the datasets in Group_A:

    IOH.loadDatasetsAndQuestionsFromFile("dataset/Group_A.dat");
    Constants::redirectStdoutToOutputFile = true;  //redirect stdout to OutputFile.txt
    setHyperParameters(1,2,1,2,7,0,0,1);           //set hyperparamters for the 25 dataset in file Group_A.dat
    TE.learnAndTest();                             //learn & test all Datasets in file Group_A.dat

You can also write a new dataset and test it but it must be formatted like other datasets

License

This project is licensed under the terms of the MIT license

cdl's People

Contributors

mllover avatar basemelbarashy avatar

Stargazers

Abdelrahman G. Abubakr avatar STEP5 avatar  avatar TENSORTALK avatar

Watchers

James Cloos avatar  avatar Abdelrahman G. Abubakr avatar  avatar paper2code - bot avatar

Forkers

longjohncoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.