0% found this document useful (0 votes)
21 views5 pages

ENG1003 Midterm Assignment Guide

Uploaded by

Shalom E
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views5 pages

ENG1003 Midterm Assignment Guide

Uploaded by

Shalom E
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mid-Term Assignment

Total Marks = 100

The provided zip file contains the data file [[Link]] and the R code [AggWaFit718.R]
to use with the following tasks, so include these in your R working directory. You can use
the R script [template.R] to organise your code.

Your final submission must include the following TWO files:


1. The slides with audio (a link to YouTube/Dropbox is acceptable).
2. “name-code.R”: The R code file (that you have written to produce your results),
named "name code.R" (where “name” is replaced with your surname or first name).

Your assignment will not be assessed if the code is missing, or the outputs of the
code are inconsistent with the slides.

Please note, these documents are mandatory and your assessment will not be evaluated if
partial submission is made. Your assignment will not be assessed if we cannot reproduce
your results with your R code.

Reference style: Harvard


Red wine quality Dataset
The given dataset, "[Link]", is used to model wine quality based on physicochemical
tests. The dataset provides the 1,599 red wine samples from the north of Portugal. It is a
modified version of the data used in the study [1].
This dataset includes 5 variables, denoted as X1, X2, X3, X4, X5, and Y, described as
follows:
X1 - citric acid
X2 - chlorides
X3 - total sulphur dioxide
X4 - pH
X5 - alcohol
Y - quality (score between 0 and 10)

Please note, the file "[Link]" has no column names. This is by design. The columns
follow the above order. Please add a header to the table after importing the data in your
script.

[1] P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis. Modeling wine preferences by data mining

from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 200

1
Assignment Tasks
1. Understand the data
(i) Import the txt file ([Link]) and save it to your R working directory.
(ii) Assign the data to a matrix, e.g. using
[Link] <- [Link]([Link]("[Link] "))
(iii) The variable of interest is quality (Y). To investigate Y, generate a subset of 500 data,
e.g. using:
[Link] <- [Link][sample(1:1599,400),c(1:6)]
[The following tasks are based on the 400 sample data]
(iv) Using scatter plots and histograms to understand the relationship between each of the
variables X1, X2, X3, X4, X5 and the variable of interest Y.

2. Transform the data


Choose any four from the five variables (X1, X2, ..., X5). Make appropriate
transformations to the chosen four variables and the variable of interest Y individually, so
that the values can be aggregated in order to predict the variable of interest.
Assign your transformed data along with your transformed variable of interest to an array.
[All the following tasks are based on the saved transformed data]

3. Build models and investigate the importance of each variable


(i) Import AggWaFit718.R file to your working directory and load into the R workspace
using, source("AggWaFit718.R")
(ii) Evaluating the following fitting functions on the transformed data:
• A weighted arithmetic mean (WAM)
• Weighted power means (WPM) with P=0.5 and P=2
• An ordered weighted averaging function (OWA)

4. Use your model for prediction


Using your best fitting model based on Q3, predict the wine quality for the input: X1=1;
X2= 0.75; X3=40; X4=3.53; X5=8.3.
[Apply the same pre-process as Q2 for the new input]

2
5. Summarising your data analysis procedures in up to 20 slides for a 5-minutes
presentation. The slides should include the following contents:
- What kinds of the data distribution you have identified in the raw data.
- Explain the transformations applied for the selected four variables and the variable of
interest.
- Include two tables - one with the error measures and correlation coefficients, and one
summarising the weights/parameters and any other useful information learned for your data.
- Explain the importance of each of the variables (the four variables that you have selected).
- Which fitting function is the best fitting model on your selected data. - Give your
prediction result and comment on whether you think it is reasonable.

- Discuss the best conditions (in terms of your chosen four variables) under which a higher
quality wine will occur.
- Comment the implications and the limitations of the fitting model you used for prediction.

The 5-minutes presentation can be using a simple and accessible platform such as YouTube
or PowerPoint Audio.

3
Submission details

Following Harvard style for code citation and reference in your R script with comments:
Deakin referencing guide.

You must cite all the datasets and packages you used for this assessment. You will lose
some scores for inappropriate citations/references.

Deakin University has a strict standard on plagiarism as a part of Academic Integrity.

Referencing
You must correctly use the Harvard style in this assessment. See the Deakin referencing
guide.

Academic integrity, plagiarism and collusion


Plagiarism and collusion constitute extremely serious breaches of academic integrity. They
are forms of cheating, and severe penalties are associated with them, including cancellation
of marks for a specific assignment, for a specific unit or even exclusion from the course. If
you are ever in doubt about how to properly use and cite a source of information refer to the
referencing site above.

Plagiarism occurs when a student passes off as the student’s own work, or copies without
acknowledgement as to its authorship, the work of any other person or resubmits their own
work from a previous assessment task.

Collusion occurs when a student obtains the agreement of another person for a fraudulent
purpose, with the intent of obtaining an advantage in submitting an assignment or other
work.

Work submitted may be reproduced and/or communicated by the university for the purpose
of assuring academic integrity of submissions:
[Link]

Common questions

Powered by AI

The implications of using predictive modeling techniques on the wine quality dataset include the potential for improving quality control and streamlining the quality assessment process through automation. However, limitations include the reliance on the dataset’s representativeness of broader wine varieties, as models may overfit to specific data not indicative of general trends. Additionally, physicochemical measures might not capture all sensory elements determining wine quality, leading to models that lack holistic accuracy. Furthermore, modeling assumptions may simplify genuine chemical interactions, potentially skewing results .

Scatter plots are used to visualize potential correlations or patterns between two quantitative variables, while histograms portray the frequency distribution of individual variables. In a wine quality dataset, scatter plots can elucidate how individual physicochemical components, such as citric acid or alcohol, are related to the quality score, aiding in pattern recognition within the data. Histograms help in assessing the distribution characteristics of each variable, such as skewness or kurtosis, which might inform necessary data transformations or modeling approaches .

The weighted arithmetic mean (WAM) is simple to compute and intuitively understandable, making it a straightforward approach for combining variables to produce an aggregate measure. However, it may not capture the complex interactions between variables effectively if these interactions are not linear. Weighted power means (WPM), on the other hand, offer more flexibility by allowing different power parameters (P) to adjust the impact of individual data points, which can provide a better fit for nonlinear relationships. The disadvantage is that WPM is computationally more intensive and may be harder to interpret. Choosing between them depends on the specific distribution of the dataset and the interaction of variables .

Correct referencing according to Harvard style is crucial for maintaining academic integrity as it acknowledges the original sources of information, thereby avoiding plagiarism. In data analysis tasks, proper citation gives credit to data sources and methodologies, supporting transparency and accountability in research. It provides a foundation for others to replicate the study or assess its validity, thus fostering an environment of trust and scholarly respect. Inadequate referencing can lead to academic penalties and undermines the credibility of a student’s work .

Ensuring consistency between the outputs of the code and the presentation slides is important as it verifies that the slides accurately depict the analysis process and results, maintaining integrity and coherence in the assignment. This alignment is essential for the evaluators to trust the findings and conclusions presented, as discrepancies could indicate errors or misrepresentations in the analysis or its communication. Consistent outputs enable reproducibility and validation of the results presented .

The choice of transformation significantly influences data distribution, which can enhance model performance by aligning variable scales and making patterns more discernible for analysis. Similarly, model fitting choices impact how well the model captures underlying data dynamics. A fitting technique that aligns well with data patterns will generally yield more accurate predictions. Misaligned transformations or inappropriate model fits may lead to inaccurate predictions due to misrepresented relationships or ignored interactions within the data .

Data transformations can enhance the prediction of wine quality by normalizing, scaling, or altering distributions of variables to improve their linear correlation with the target variable, wine quality in this case. This process can make the data more amenable to certain analytical methods and models, potentially increasing predictive accuracy and reducing noise. Considerations in transformation include ensuring that transformations are consistent, preserve essential characteristics of the data, and that they are interpretable within the context of the study. Care must be taken not to overfit the model to transformed data, which may lead to less generalizable predictions .

To build and validate a predictive model for wine quality using transformed data, begin by splitting the data into training and validation sets to prevent overfitting. Next, apply fitting functions such as WAM, WPM, and OWA as described. Use cross-validation to assess model performance across multiple datasets, ensuring generalizability. Compare models based on error measures like RMSE or MAE and correlation coefficients to select the best performing model. Finally, make predictions on the validation set, refine models based on results, and possibly iterate the process to enhance accuracy .

Modeling wine quality based on physicochemical tests is significant because it allows for an objective assessment of quality using measurable parameters. This approach provides a data-driven basis for evaluating wine, which can supplement traditional sensory evaluations by experts. By using elements such as citric acid, chlorides, total sulphur dioxide, pH, and alcohol, the methodology opens pathways for automated quality prediction and consistent quality control in winemaking. This advances the field by integrating data science with traditional enological practices, offering potential improvements in efficiency and accuracy .

To preprocess new input data for predicting wine quality consistently with previously transformed data, the same transformations applied to the training data should be employed on new inputs. This involves applying any scaling, normalization, or transformations, such as logarithmic or square root transformations, that were originally utilized. Consistency ensures the model can interpret the new data in the same context as it learned from the training data, facilitating an accurate prediction .

You might also like