{ "info": { "author": "KYDronePilot", "author_email": "33381603+KYDronePilot@users.noreply.github.com", "bugtrack_url": null, "classifiers": [], "description": "Decision-Tree-Generator\n=======================\n\nProgram for generating decision tree LaTeX code for array-based\nalgorithms\n\n.. image:: https://raw.githubusercontent.com/KYDronePilot/Decision-Tree-Generator/master/example/insertion_sort.png\n :alt: Insertion Sort Decision Tree\n\nInsertion Sort Decision Tree\n\nOverview\n--------\n\nThis project began with the idea of being able to generate a pruned,\nvalid decision tree for any simple algorithm that performs operations on\na small list of data. Above is an example of such a tree for the\nInsertion Sort algorithm with the list of elements\n``['x', 'y', 'z', 'a']``.\n\nUsage\n-----\n\nWhen run on a particular algorithm, the program generates complete Latex\ncode to form a pruned, valid decision tree for that algorithm.\n\nThe main package provides a class ``TreeGenerator``, which should be\ninherited with the ``algorithm()`` method overrided. In that method, an\nalgorithm should be entered that performs operations on the\n``self.data`` list. Whenever a comparison of records is to be made in\nyour algorithm, substitute the comparison with the following method\ncall:\n\n.. code:: python\n\n self.comp(, , )\n\nThis method will return boolean values to control how the algorithm\noperates.\n\nTo generate the decision tree, follow these steps: \\* Create an instance\nof your algorithm\u2019s class. \\* Run the ``execute()`` method on this\nobject. \\* Run the ``render()`` method and save/print the outputted\nLatex code.\n\nFrom there, the Latex code can be placed into a ``.tex`` file and\ncompiled using a Latex processor.\n\nExample\n-------\n\nExample algorithms and usage can be found in ``src/example.py``.\n\nHow it Works\n------------\n\nThe main ``execute()`` method starts by initially calling the algorithm\nimplementation. Whenever a comparison is made, the program saves a\n\u201cstate\u201d of the program execution and adds a node to a tree structure for\nprinting the Latex code. It then returns ``True`` to cause the program\nto make a left branch. With each comparison made, it checks to verify\nthe last comparison is valid and prunes the node if not. If the\ncomparison is not valid, it puts the algorithm in \u201clame duck\u201d mode,\nwhich instructs the comparison method to always return ``False``,\nletting the algorithm run out its course. It continues this process\nuntil the algorithm exits.\n\nOnce the algorithm exits, the program figures out what boolean values\nthe ``comp()`` function must return in order to restore the execution\nstate to the latest left (``True``) branch in the algorithm. It then\nmakes a right branch and continues the process all over again.\n\nIn this way, it explores all possible valid paths the algorithm could\ntake, given the input data and generates a tree structure to represent\nit. From there, the ``render()`` method performs a pre-order traversal\nof that tree, generating the Latex code as it goes.\n\nContribution\n------------\n\nIf you have an addition you would like to make or find an issue, please\neither open an issue or submit a pull request and I\u2019ll try to handle it\nas soon as possible.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/KYDronePilot/Decision-Tree-Generator", "keywords": "", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "Decision-Tree-Generator", "package_url": "https://pypi.org/project/Decision-Tree-Generator/", "platform": "", "project_url": "https://pypi.org/project/Decision-Tree-Generator/", "project_urls": { "Homepage": "https://github.com/KYDronePilot/Decision-Tree-Generator" }, "release_url": "https://pypi.org/project/Decision-Tree-Generator/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Program for generating decision tree LaTeX code for array-based algorithms", "version": "0.0.4" }, "last_serial": 4696013, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "1becd81c73795ea512972b00f3db652b", "sha256": "b2f3b4d4212e7eeb2181f296fea3759e52cf3052d097d00245f1a81f342e33c0" }, "downloads": -1, "filename": "Decision-Tree-Generator-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1becd81c73795ea512972b00f3db652b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6879, "upload_time": "2019-01-13T02:10:04", "url": "https://files.pythonhosted.org/packages/ea/7d/ca0ddf228aa47645a8a9509f1c181a1de89d1fb24acb0a3994f0c2f31d47/Decision-Tree-Generator-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6895e57bfd7ede53810e91f9b7545803", "sha256": "9d1372b71244bc054b26e9739d4bb9a541788e13c27b20a101dcd329937811fe" }, "downloads": -1, "filename": "Decision-Tree-Generator-0.0.3.tar.gz", "has_sig": false, "md5_digest": "6895e57bfd7ede53810e91f9b7545803", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7367, "upload_time": "2019-01-14T21:25:53", "url": "https://files.pythonhosted.org/packages/f4/13/73ce662f3ae7e148174417f53515baf32f28b2265c108bec2a794db3cfa3/Decision-Tree-Generator-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "63be4a16d8009c47a43bae0438277cfe", "sha256": "2f693f406b7bc9eed7a8842e86d661aa4ad42bbd04b0f78d7a0d8fb70f63df5b" }, "downloads": -1, "filename": "Decision-Tree-Generator-0.0.4.tar.gz", "has_sig": false, "md5_digest": "63be4a16d8009c47a43bae0438277cfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7395, "upload_time": "2019-01-14T21:28:43", "url": "https://files.pythonhosted.org/packages/7b/05/04815cee47bc148c1d5c8e6d11983d4001953ca23574d11b9177d088031d/Decision-Tree-Generator-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63be4a16d8009c47a43bae0438277cfe", "sha256": "2f693f406b7bc9eed7a8842e86d661aa4ad42bbd04b0f78d7a0d8fb70f63df5b" }, "downloads": -1, "filename": "Decision-Tree-Generator-0.0.4.tar.gz", "has_sig": false, "md5_digest": "63be4a16d8009c47a43bae0438277cfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7395, "upload_time": "2019-01-14T21:28:43", "url": "https://files.pythonhosted.org/packages/7b/05/04815cee47bc148c1d5c8e6d11983d4001953ca23574d11b9177d088031d/Decision-Tree-Generator-0.0.4.tar.gz" } ] }