QBUS2820: Predictive Analytics - Gradient Ascent - Statistics Assignment Help

Download Solution Order New Solution
Assignment Task:

Task A. Regression (10 Marks) 

Instructions 

You will work on the White Wine Quality dataset “Wine_Data.csv” for Task A: 

This dataset is related to white vinho verde wine samples, from the north of Portugal. The goal is to set up a regression task to model wine quality based on physicochemical tests. Due to privacy and logistic issues, only physicochemical (the input/feature) and “Quality” (the target) variables are available (e.g. there is no data about grape types, wine brand, wine selling price, etc.). 

You can download the dataset from Canvas, and find the detailed information of this dataset as here: https://archive.ics.uci.edu/ml/datasets/Wine+Quality 

1. You decide to use this dataset for a regression task, that is to use the existing information to predict the “Quality”. But before that, you want to exam the data. 

(1) Write python script load the dataset. From the dataset, count the number of poor- quality wines (quality < 6) and report what you observed.

(2) Suppose now you want to select 2 features to build a prototype linear regression model. After further look up into the data, you think “fixed acidity”, "volatile acidity" and "alcohol" maybe useful. However, you still don’t know which 2 of these 3 are the best combination (since we have 3 combinations in here). 

Write python script to extract the “fixed acidity”, "volatile acidity" and "alcohol" columns. Then find the suitable combination (2 features) for linear regression model. Carefully explain your selection rules and criteria (No need to train a linear regression model here). 

2. After your first trail, you think the experiment is feasible. You now decide to build a linear regression model and use all the features (all the columns except the “Quality” column) to predict the “Quality” value. 

(1) Use “train_test_split” function to split 80% of the data as your training data, and the remaining 20% as your testing data. (2) With the train set, use the linear regression model LinearRegression in the sci-kit learn package to build two linear regression models to predict the “quality” value, with and without the intercept term. (3) Compare the test performance (using Mean Squared Error (MSE)) of two models and explain the importance of the intercept term. 

3. As feature engineering is important for regression, suppose for this time you want to centralize your data first and then build a linear regression again. 

(a) Take the same set of the training as in the previous question (Question 2). 

Construct the centred training dataset by conducting the following steps in your Python code:

(i) Take the mean of all the training target values (“Quality” value), then deduct this mean from each training target value. Take the resulting target values as the new training target values ynew;

(ii) In the training data, take the mean of the first feature column “fixed acidity”, then deduct the mean value from the original feature column. Take the result as the new feature xnew 1 ;

(iii) Repeat the step (ii) for the rest feature columns and take the results as new 

features xnew 2 , xnew 3 , ... , xnew 11 ; (b) Build a linear regression model to fit to the new data. Then test the model performance over the test data (the same set of the test data as in the previous question), using LinearRegression in the scikit-learn package. Note that, when you take your test data into the model to calculate predictive performance scores, you should transform the testing data and you need to decide how to do this. 

Report your new results with MSE and report the values of coefficients β and intercept β0. 

Compare and report your results/findings from Question 2 and Question 3. 

Task B. Gradient Ascent 

You will still use the White Wine Quality dataset “Wine_Data.csv” for Task B. 

Based on slides from 27 to 32 of lecture 6, write your own Gradient Ascend algorithm (you may build your solution based on the template of tutorial 6 task), to estimate the parameters of the given regression problem with the intercept. 

Use 3 features: “density”, "residual sugar" and "volatile acidity", and β = [0,...,0]T as your initialization point. You may write a python function named such as Gradient_Ascent_Algo, with various inputs, e.g. data matrix X, target y, an initial parameter vector β(0) = [0,...,0]T, learning rate, the number of GD iterations T, stopping criteria and other arguments you see appropriate. 

You task is to find the optimal learning rate and explain why this is the optimal value. You need to use 5-fold cross validation to select the optimal learning rate. You should design and justify your approach. 

Task C. Moneyball  

You will work on the NBA salary dataset. 

Note: This task does not require prior knowledge of basketball. You should not add any personal subjective assumptions about the data based on your existing knowledge. This can lead to inaccurate results. You should use the techniques that we learnt and you discovered to complete the prediction task. 

1. Problem description 

Based on the models we have learnt from QBUS2820 unit, select 2 models to predict NBA player salary from performance statistics. Note: you may try models that are not covered in the lecture, while at least one of the presented models must be the model that we have covered in the QBUS2820 unit. 

As a consultant working for a sports analytics company, the NBA league approached you to develop predictive models to predict NBA salaries based on machine learning techniques. To enable this task, you were provided with a dataset containing highly detailed performance of the NBA players. 

As part of the contract, you need to write a report according to the details below. 

2. Understanding the data 

You can download the “NBA_Train.csv” and “NBA_test.csv” data for the Canvas. The response is the SALARY($Millions) column in the dataset. 

You should use the given test set to evaluate the performance of your work. The performance/scoring metric is: Root Mean Squared Error (RMSE), for the test set. 

Your target the of the test set RMSE is: less than 4.1 ($Millions). 

3. Written report 

The purpose of the report is to describe, explain, and justify your solution to the client with polished presentation. Be concise and objective. Find ways to say more with less. When it doubts, put it in the appendix. You can refer to the file “TaskC_instructions” on more detailed instructions on how to work on Task C including writing the report.

This QBUS2820: Statistics Assignment has been solved by our Statistics Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.