80% Assignment Requirements Fulfilled. The program runs correctly. 20% Divided e
80% Assignment Requirements Fulfilled. The program runs correctly.
20% Divided e
80% Assignment Requirements Fulfilled. The program runs correctly.
20% Divided equally among the items in the list below:
Only zipped folders or single files should be submitted to Blackboard.
All files require the correct extensions. .py for Spyder IDE files or .ipynb
Zip multiple files in a folder to submit.
All submission folder and file names must include the student’s last name.
All individual files should have self documenting names.
All variables should have self documenting names.
Use of comments, including a comment block at the top of each file with your name and other details.
Include this sentence in the comment block at the top and type in your name:
I certify, that this computer program submitted by me is all of my own work. Signed: Your Name
All sources cited.
Correct spelling and grammar.
Neat, clearly presented code.
The class is likely to have students with different exposures to computer programming. You are not required to have any experience in Python. The important issue is how much you learn during our class.
DAT 535 Session 1 Programming Assignment Week 1 & 2
Use one Jupyter Notebook file for all parts of the assignment.
Upload your .ipynb file to MyCourses
Part 1 – 20 points Type in these commands one cell at a time and then run each cell.
import seaborn as sns
sns.get_dataset_names () – This will produce the names of the seaborn datasets.
Choose one dataset to print and load. I chose the tips dataset and used the variable name plot.
plot = sns.load_dataset(‘tips’)
print(plot)
Create a scatterplot as demonstrated in the Participation Activity Section 2.1.4
Choose your own x a -nd y values from the dataset column names.
Be sure to add some headings and comments to your code as shown at the end of Chapter 2.1
Part 2 – 20 pointsimport numpy as np
Create a one-dimensional numpy array with 9 integer elements. Use dtype ‘int16’
Print the array.
Print the second element of the array.
Use 10 other built in NumPy functions of your choice on the array and print the results.
Part 3 – 20 pointsImport the necessary modules and read in a csv file. The homes dataset contains 18 features giving the characteristics of 76 homes being sold. The modules will be used with the homes.csv file to perform a linear regression. Linear regression will be covered in a different chapter.
Import the NumPy and pandas packages with the aliases used in this material
Import the function LinearRegression from the sklearn.linear_model package
Read in the csv file homes.csv
Ex: If the csv file homes_small.csv is used instead of homes.csv, the output is:
The intercept of the regression is 249.522The slope of the regression is 36.758