Conduct performance evaluation for the model

Assignment Help Python Programming
Reference no: EM132919401

Big Data Analytics Assessment

Overview

Write Python code (especially PySpark where possible) to implement the tasks below (Please explain your code in detail in your report). Where appropriate, the output of code execution should be presented that relates to your answer to the tasks into your report, as the evidence of working program (e.g., screenshots). Output included without supporting explanation or interpretation will not receive credit.

Where the tasks involve big data analytics with machine learning, you may need to formulate technical solution step by step, e.g., choose appropriate machine learning models / algorithms, justifying appropriateness of models/algorithms/techniques used, applying them in the context of the given task, and practising data visualisation techniques where appropriate. Test your solution and conduct experiments where appropriate. Evaluate the performance of implemented solution and analyse results where appropriate. Delve into deep technical explanations of the results and suggest possible improvement, etc. Make conclusions where appropriate.

You need to present your solution to the tasks into a technical report. The report should be submitted onto Blackboard.

Assignment tasks

Part (I)

You will need to download the data file "Medical_info.csv" from the Blackboard. The dataset is about a study of factors predicting serum testosterone levels in a screened population in some country. The key to the variables in the dataset is explained in the table below. Please note there are null or missing values in some columns of the dataset.

id

Identification Number

age

Age (years)

BMI

Body Mass Index (kg/m2)

PSA

Prostate Specific Antigen (ng/mL)

TG

Serum Triglyceride (mg/dL)

Cholesterol

Serum Cholesterol (mg/dL)

LDLChole

Serum Low-Density Lipoprotein (mg/dL)

HDLChole

Serum High-Density Lipoprotein (mg/dL)

Glucose

Fasting Plasma Glucose (mg/dL)

Testosterone

Serum Testosterone (ng/mL)

BP_1

Blood pressure category, coded as 1=Low, 2=High

1. Load the data file into a Spark DataFrame (1st DataFrame). Describe the structure of the DataFrame.

2. Create a new DataFrame (2nd DataFrame) by removing all the rows with null/missing values in the 1st DataFrame and calculate the number of rows removed.

3. Calculate summary statistics of the ‘age' feature in the 2nd DataFrame, including its min value, max value, mean value, median value, variance and standard deviation. Generate a histogram for the ‘age' feature and describe the distribution of the feature.

4. Display the quartile info of the ‘BMI' feature in the 2nd DataFrame. Generate a boxplot for the ‘BMI' feature and discuss the distribution of the feature based on the boxplot.

5. Use Spark DataFrame API (i.e., expression methods) to count the number of rows where ‘age' is greater than 50 and ‘BP_1' equals 1.

6. Use the ‘BP_1' feature in the 2nd DataFrame as the target label, to build two classification models based on all other columns as predictors. Conduct performance evaluation for the two models and make conclusions.

Part (II)
You will need to download the data file "Region_info.csv" from the Blackboard. The dataset provides information such as population size, average life expectancy, GDP per capita, and so on for some regions. The key to the variables in the dataset is explained in the table below.

Population

Identification Number

fertility

Average number of children a woman in a given country gives birth to

HIV

HIV infection rate

CO2

CO2 emission (tonnes per person)

BMI_male

Body Mass Index (male)

GDP

Gross Domestic Product

BMI_female

Body Mass Index (female)

life

Average life expectancy

child_mortality

Death of children under 5 years of age per 1000 live births

region

Region

1. Load the data file into a Spark DataFrame (1st DataFrame). Describe the structure of the created data frame.

2. Create a new DataFrame (2nd DataFrame) by removing the ‘region' column.

3. Use a graph, explore and describe the relationship between ‘fertility' feature and ‘life' feature in the 2nd DataFrame.

4. Use Spark SQL query to display the ‘fertility' and ‘life' columns in the 2nd DataFrame where ‘fertility' is great than 1.0 and ‘life' is greater than 70.

5. Build a linear regression model to predict life expectancy (the ‘life' column) in the 2nd DataFrame using the ‘fertility' column as the predictor. Conduct performance evaluation for the model and make conclusions.

6. Build a Lasso regression model to predict life expectancy (the ‘life column) in the 2nd DataFrame using all other columns as the predictor. Conduct performance evaluation for the model and make conclusions.

Attachment:- Big Data Analytics Assessment.rar

Reference no: EM132919401

Questions Cloud

Estimate the percentage change in the price of the bond : Use the modified duration and modified convexity to estimate the percentage change in the price of the bond with a 55 basis point per annum increase in yield
Time between two unplanned shutdowns : The time between unplanned shutdowns of a power plant has an exponential distribution with a mean of 15 days.
What is the price value of a basis point : Question - What is the price value of a basis point for a 4% two-year Australian government bond with yield of 5.7%
How much is the fringe benefit expense for the month : Lucky Corporation paid for the monthly rental of the residential house of its branch manager amounting to P204,000. How much is the fringe benefit expense
Conduct performance evaluation for the model : Conduct performance evaluation for the model and make conclusions - Build a Lasso regression model to predict life expectancy (the ‘life column)
Post the transactions for the general ledger accounts : Issued Cheque 1013 for $164 to pay for March advertisements in the local newspaper. Post the transactions for the general ledger accounts
How much will you pay each month : How much will you pay each month assuming you receive a thirty year mortgage? Over the life of your loan, how much in total will you pay the lender
Organs to carry out absorptive process : Explain why the small intestine is better suited than the other GI tract organs to carry out the absorptive process
What are some drivers of change in corporate governance : What are some drivers of change in corporate governance? What evidence suggests that society is no longer satisfied with corporate behaviour

Reviews

Write a Review

Python Programming Questions & Answers

  Do basic trigonometry functions

Create a program that allows the user to do basic trigonometry functions. First, ask the user if he or she would like to do sine, cosine, or tangent (sin, cos, tan).

  Program to keep track its population bmi

Program to keep track its population's BMI - high BMI population and recommend appropriate diet and exercise for them

  Application that will allow user to maintain collections

Build a menu-driven application that will allow a user to maintain their collections. For example, I might have a coin collection, or a record collection, or a collection of all my valuable items.

  Write a program that keeps a dictionary in which both keys

Write a program that keeps a dictionary in which both keys and values are strings - names of students and their course grades.

  Assess the overall quality of code

Create two additional programs able to extract summarised data from the database as CSV files. Along with two support programs to allow these to be tested

  Creates a mortgage object using the entered values

Creates a Mortgage object using the entered values and Identify and use the correct syntax of a common programming language

  Create a python program which will grade a certain portion

Create a Python program which will grade a certain portion of the final. The final has 25 questions where the answer is either, A,B,C or D.

  Write a program that inputs two square matrices

Write a program that inputs two square matrices and then calls methods that you create that add, subtract, and multiply the two matrices.

  Write two versions of a factorial function

You need to write a few functions in Python. Write two versions of a factorial function.

  Create a program that will read in prices from the user

Create a program that will read in prices from the user and add them to a list. Ask the user in between each price if they want to continue (y/n).

  Build a utility app that helps customers figure out the cost

Build a utility app that helps their customers figure out the cost of items in the countries they visit on a trip. Bill thinks the app should run on any mobile phone, laptop, or desktop computer, since his customers come from all over the world.

  Calculate the sum of squared errors sse

Calculate the minimum and maximum values for k1 and k2 based on the static compression values - Calculate the sum of squared errors SSE as S(ycar(t)-yroad(t))

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd