code and report
<Your name(s) here> 4
CSC <535/635> Data Mining
Assignment <#> Report
Submitted to:
Dr. Jamil Saquer
Author(s):
<Your full names here>
Report Title
Introduction
In this section of the report, introduce the problem and the data set(s). If you used dataset(s) other than what is provided for you as part of the assignment, explain what they represent and the different attributes in the dataset(s). Make sure to provide references to the dataset(s). Write about your approach for solving the problem. Write about why you chose the dataset(s) and if there is anything interesting about it/them. Delete all of these prompts in your final version. Plan on writing around 1-2 paragraphs for each section. Reports should typically be around 2-3 pages in length. Fonts should be in Times New Roman, 12pt, with double spacing.
Background
In this section of the report talk, about what you know about the algorithm (method) you are using. If you made some executive choices in what measuring methods you use talk about them here. For instance in KNN there are many ways to calculate the distance between two neighbors, if you select a particular measure then talk about that here.
Implementation
Talk about your implementation of the algorithm here. If there is anything nifty that you tried, talk about it here too. If you had problems then talk about that here as well.
You can use Notepad++ to copy in code snippets into your document if you want. Just highlight some code, right click and select Plugin Commands -> Copy text with Syntax Highlights.
Figure 1: Some Algorithm implementation
def someAlgorithmFunction(obj1, obj2):
#some descriptive comment
A = obj1.getArg() + obj2.getArg()
B = obj1.getArg() - obj2.getArg()
#some comment about the formula
result = (A+B)/((A-B)*(A+B))
return result
Experimental Setup and Results
Talk about how you setup your experiment. Give any performance results using standard performance metrics here. If you have graphs to illustrate your performance then put them here as well. Show output from the console or from your application here if necessary (as a picture or a table).
Conclusion
Give any concluding remarks here. If you learned anything talk about that here as well. If you discovered anything interesting (extra credit) then talk about it here too.
References
List your references here. Use proper format such as MLA or APA format.
Code
You can use Notepad++ to copy your code right into your word document. Just Ctrl-A, right-click and select Plugin Commands -> Copy text with Syntax Highlights. Then in the word document: right-click and select paste -> Keep Source Formatting. Otherwise just print out your code and staple it here (if asked to turn in a hard copy, which is not the case when the course is taught online).
Please follow common programming conventions in your code: use descriptive variable names, don’t overwrite built-ins or keywords, write your code in a modular format (use classes and functions), etc.
In the doc string at the top include your name, course code and name, and brief description of the assignment. If in a group: only one person should upload the report and code. Make sure to include the names of all group members.
When appropriate, please specify how we should test your code. Should it be run from IDLE, anaconda python prompt, as a notebook, …etc.
"""
Program: HW1_Sample.py
Programmed By: Jared Hall and John Doe
Description: A sample homework file containing some programming styles.
Trace Folder: Jared007
"""
#---------------------------------Imports--------------------------------------
#imports go here
import numpy as np
import math
#------------------------------------------------------------------------------
#---------------------------------Variables------------------------------------
#global variables go here; avoid if possible
global globalVar
moduleVar = "SomeValue"
#------------------------------------------------------------------------------
#---------------------------------Classes/Functions----------------------------
class SomeClass():
"""A descriptive statement about the class"""
def __init__(self, arg1):
#some descriptive comment about the method
self.arg = arg1
def __str__(self):
return str(self.arg)
def setArg(self, newArg):
self.arg = newArg
def getArg(self):
return self.arg
def someAlgorithmFunction(obj1, obj2):
#some descriptive comment
A = obj1.getArg() + obj2.getArg()
B = obj1.getArg() - obj2.getArg()
#some comment about the formula
result = (A+B)/((A-B)*(A+B))
return result
#------------------------------------------------------------------------------
#---------------------------------Program Main---------------------------------
def main():
if(__name__ == "__main__"):
#some subsection
object1 = SomeClass(2)
object2 = SomeClass(10)
#some processing comment
algorithmResult = someAlgorithmFunction(object1, object2)
object1.setArg(algorithmResult) #some descriptive comment
object2.setArg(someAlgorithmFunction(object1, object2))
print("Object 1 content: ", object1)
print("Object 2 content: ", object2)
main()
#---------------------------------End of Program-------------------------------