Python Assignment
In this assignment, you will use Pandas library to perform analysis on the dataset stored in the following csv file: breast-cancer-wisconsin.csv.
Please write script(s) to do the following:
1. Read the csv file and covert the dataset into a DataFrame object.
2. Persist the dataset into a SQL table and a JASON file. • Write the content of the DataFrame object into an SQLite database table. This will convert the dataset into a SQL table format. You can define your own database and table name. • Write the content of the DataFrame object into a JASON file. This will convert the dataset into a JASON format. You can decide which JASON format (column, record or split) you like to convert.
3. Calculate the mean and standard deviation for every (numerical) column using DataFrame methods.
4. Use DataFrame Data Visualization methods to draw either the Boxplot or Kernel Density (KDE) diagram to display the distribution function for each column of the DataFrame object. Please compare the curves generated and determined which columns have distribution functions of similar shape.
5. Use the DataFrame method to calculate the correlation coefficient between any two columns. Also draw the Scatter Plots to demonstrate how any two columns are correlated. Use the coefficient coefficients and Scatter Plots to determine if any two columns are positively correlated, negatively correlated or not correlated.
6. Use the class column to group the records in the dataset and repeat step 3 and 4 for all groups.
import pandas as pd
data = pd.read_csv("breast-cancer-wisconsin.csv")
data.head()
import pandas
import scipy
import numpy
from sklearn.preprocessing import MinMaxScaler
url =
"https://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data"
names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi',
'age', 'class']
dataframe = pandas.read_csv(url, names=names)
array = dataframe.values
X = array[:,0:8]
Y = array[:,8]
scaler = MinMaxScaler(feature_range=(0, 1))
rescaledX = scaler.fit_transform(X)
numpy.set_printoptions(precision=3)
print(rescaledX[0:5,:])
Python Assignment In this assignment, you will use Pandas library to perform analysis on the dataset stored in the following csv file: breast-cancer-wisconsin.csv. Please write script(s) to do the fol...
Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data Files We provide three comma-separated-value file, scores.csv , college_scorecard.csv, and mpg.csv. The first file is list of a few students and their exam grades. The second file includes data from 1996 through 2016 for all undergraduate degree-granting institutions of higher education. The data about the institution will help the students to make decision about the institution for their higher education such as student completion,...
Classification in Python: Classification In this assignment, you will practice using the kNN (k-Nearest Neighbors) algorithm to solve a classification problem. The kNN is a simple and robust classifier, which is used in different applications. The goal is to train kNN algorithm to distinguish the species from one another. The dataset can be downloaded from UCI Machine Learning Repository: https://archive.ics.uci.edu/ml/machine-learning-databases/iris/ (Links to an external site.)Links to an external site.. Download `iris.data` file from the Data Folder. The Data Set description...
Answer the following and explain so I can double check my answers If you use the Management Studio to create a database, the Studio will automatically create a database file plus a ______________________ file. 10 points QUESTION 2 When you use the Management Studio to create a check constraint, you can specify whether you want the constraint enforced for insert or __________________ operations. 10 points QUESTION 3 When you use the Management Studio to create a database, including its tables...
Use the csv file on spotify from any date Code from lab2 import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class SongsReport { public static void main(String[] args) { //loading name of file File file = new File("songs.csv"); //reading data from this file //scanner to read java file Scanner reader; //line to get current line from the file String line=""; ...
Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...
Please try to write the code with Project 1,2 and 3 in mind. And use java language, thank you very much. Create an Edit Menu in your GUI Add a second menu to the GUI called Edit which will have one menu item called Search. Clicking on search should prompt the user using a JOptionPane input dialog to enter a car make. The GUI should then display only cars of that make. You will need to write a second menu...