CSE 5120 in March of 2021 wit Dr. Voigt
Programming Assignment
Total Points: 25
This is a programming assignment that is aligned with the lecture Modules 6.1 and 6.2 on
Inductive Rule Learning.
In particular, this assignment wants you to complete the Inductive Rule Learning program in
the Module 6.2 video. The driving function ‘learn_rules()’ and several functions it calls are
already provided. You will see calls to other functions without their implementations shown in
the Module 6.2 video. To find these, consult the annotation is the Module 6.2 slides that are
given along with the video. A bit more code is given in the annotations with just few functions
left for you to implement on your own. You will see which …
STEP 1: The top-level function ‘learn_rules()’ assumes that a learning problem has been
provided in the form of 3 global variables (every once in a while – here for the sake of
convenience to us, the programmers – using globals is fine …). The globals variables that the
program assumes are already provided with their initializations: DATATABLE (the set of training
instances), ATTRIBS (the list of attributes that describe the concept to be learned), and DEC (the
attribute that indicates the binary classification associated with each training instance.). In
order to save some typing, you may download file
cse5120_decrule_learn.py
with the globals for the lecture training set. Continue your program by adding on to this file.
STEP 2: Start programming based on the code provided in the video and on the slides.
Whenever you come across one of those functions that are to you to program on your own,
step back, make sure that you understand the functions purpose, decide on how to accomplish
it (none of it is very complicated), then code.
Make the last lines of your program the following:
STEP 3: Attempt to run your program, debug as needed. Your program should reproduce the
rule learning outcomes you have seen in the video.
STEP 4: Rerun your program for another set of training instances. In order to have your
program load another set of training instances, simply comment out the block of the original
DATATABLE, ATTRIBS and DEC lines and in their place cut-and-paste the content of file
cse5120_great_pizza.py
You will find out, on the basis of 42 instances of rated pizzas (choices: red/non-red sauce,
meat/no-meat, seafood/no-seafood/, extra-crust/no-extra-crust, ‘anchovies/no-anchovies’),
which pizzas are the best
Python 2 to Python 3: It turns out that part of this assignment will be your converting the
lecture code, which is written in Python 2, to Python 3 (which, to my knowledge, Dr. Khan has
you use). The conversion is not difficult and just a few statement will need your attention:
1. Convert Python 2 print statements into Python 3 statements; since you have no doubt
already been using Python 3 print statements, just by looking at the Python 2 code, you
may already know what to do. If not, there are many online sites on this that you can
Google. If this becomes a “huge” problem, ask by email either me, our student assistant
Benjamin Alexander for pointers.
2. Python 2 ‘raw_input’ becomes Python 3 ‘input’.
3. The Python 2 ‘map’ statement is no longer supported in the same manner by Python 3;
but you can still use it by wrapping a list(…) around the entire ‘map(…)’
CREDIT FOR THIS ASSIGNMENT: Submit via Blackboard Submission Portal under the “CSE 5120
in March’ content area (1) your file decrule_learn.py; make sure that add your name and
student id to the top of the file; (2) A screenshot of your running program and output from STEP
3; the screenshot need only show the bottom portion of the output which shows the learned
rules, (3) a screenshot showing the rules that your program learned for the run in STEP 4.
Submit partially programs (even those that may not work) for partial credit.
The assignment is due on Tuesday, 3/16, at 11:59pm.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more