国产一区二区影院-国产一区二区视频免费-国产一区二区三区在线影院-国产一区二区三区在线视频-精品国产乱码久久久久久下载-精品国产乱码久久久久久软件大全

二維碼

民族品牌網手機版

掃一掃關注

民族品牌網微信
當前位置: 首頁 » 新聞資訊 » 品牌商機 » 正文

INFS4203/7203程序代做、代寫R編程設計程序

放大字體  縮小字體 發布日期:2019-10-10 16:16:58    來源:民族品牌網     瀏覽次數:359    評論:0
導讀

INFS4203/7203 AssignmentSemester 2/2019Marks: 100 marks (20%)Due Date: 11th October 2019, 23:59What to Submit: See deliverables partWhere to Submit: Electronic submission via blackboardThe goal o

INFS4203/7203 Assignment

Semester 2/2019

Marks: 100 marks (20%)

Due Date: 11th October 2019, 23:59

What to Submit: See deliverables part

Where to Submit: Electronic submission via blackboard

The goal of this project is to gain practical experience in applying clustering and

classification to real data. You must work on this project individually. The

standard academic honesty rules apply. You must use R for this project.

There are three main tasks: Data Preparation, Clustering, and Classification.

Please read the report carefully until the end. Since some parts of your code

require a random seed, you need to pre-set the seed for reproducible results. Your

seed value is the first 2 digits of your student ID. (For example: If your student ID

is 12345678 then the seed value will be = 12).

Dataset:

You will be using the “ILPD (Indian Liver Patient Dataset) Data Set” data1

. The

data has 583 observations (rows) and 11 attributes (columns). The attribute in the

last column is a binary class variable with value 1 for “patient” and 2 for

“non_patient”. You may find and learn more detailed information about the data in

the data description page2

.

1 Data Folder: https://archive.ics.uci.edu/ml/machine-learning-databases/00225/ .

2 Data Description:

https://archive.ics.uci.edu/ml/datasets/ILPD+(Indian+Liver+Patient+Dataset)

Task 1 - Data Preparation:

Write the necessary code to pre-process the data. That pre-processing stage

includes the following tasks:

1.1. Extract the data into an R data frame.

1.2. Assign the following names to the 11 different columns in your dataset

Column Number Column Name Meaning

1 Age Age of the patient

2 Gender Gender of the patient

3 TB Total Bilirubin

4 DB Direct Bilirubin

5 Alkphos Alkaline Phosphotase

6 Sgpt Alamine Aminotransferase

7 Sgot Aspartate Aminotransferase

8 TP Total Protiens

9 Albumin Albumin

10 AG_Ratio Albumin and Globulin Ratio

11 Class Indicator for patient and non_patient

1.3. There are some missing values in the column AG_RATIO, fill them with the

median of the column.

1.4. Replace all “2” in the “class” column with “0” to indicate “non_patient”.

1.5. Notice that R might define the Class column as integer. In that case, change

its type from integer to factor.

1.6. Save the dataframe into a file with filename ilpd_processed.Rda.

Task 2 - Clustering:

Apply K-Means and Hierarchical clustering to cluster the data as follows.

2.1. Load the preprocessed data file from Task 1 into a data frame. Please note

that in Task 2, we exclude Age, Gender, AG_Ratio, and Class attributes in this

task since they are in different units from the others.

2.2. Rescale the values of every column to the range of (0,1). Reference link3

.

2.3. Cluster the data into 2 clusters (i.e. k = 2) using K-Means clustering using

the default parameters for the function. Plot the results of the

clusters as a 2D plot where the x-axis is Alkphos and the y-axis is TP.

2.4. Plot another 2D plot with the same dimensions above, but color the points

according to the Class column.

2.5. Compare the 2 plots obtained in the previous two tasks (tasks 2.3. and 2.4.)

– do the clusters visually represent the vs classes?

2.6. Cluster the data into more than 2 clusters (i.e., k = 3, 4, 5) using K-Means

clustering and plot all the clustering results.

2.7. Compare the plots and Sum of Squared Error (SSE) obtained in the

previous task and provide your comments on the quality of clustering.

2.8. Apply hierarchical clustering to the data using the function with

default parameters and plot the corresponding dendrogram. Particularly,

cluster the dendrogram into 2, 3, 4, and 5 clusters and plot all of them.

2.9. Compare the plots obtained in the tasks 2.3., 2.4., 2.6. and 2.8. and provide

your observations on the achieved clusters - should we have a new subtype

of diseases?

2.10. Try different agglomeration methods in hierarchical clustering (i.e.,

). Plot the resulting dendrograms

and provide your comments on the quality of clustering - is the data

sensitive to the used agglomeration method? based on your results, what

do you think is the default agglomeration method used in Task 2.8.?

3 https://stackoverflow.com/a/15468888/6350054

Task 3 - Classification:

Apply binary classification using decision tree and K-NN techniques.

3.1. Load the preprocessed data file from Task 1 into data frame. Divide the

dataset into “training” and “test” subsets randomly (70% and 30%

respectively). We use all attributes in Task 3.

3.2. Learn a classification tree from the training data using the default

parameters of the function from the library. Plot that

classification tree and provide your comments on its structure (e.g., what

are the important/unimportant variables? Is there any knowledge we can

infer from the tree representation that helps in differentiating between the

classes?). Using the learned tree, predict the class labels of the test data.

Calculate the accuracy, precision, and recall.

3.3. Try building your classification tree again via the function but using

parameters that are different from the default settings. Can you achieve

better accuracy or more meaningful representation by tuning some

parameters? (Note that in the function from library, you can

modifiy parameters. Execute form RStudio Console for

the detailed documentation.)

3.4 Apply K-NN classification to predict the labels in the test subset and

calculate the accuracy, precision and recall. Particularly, try different values

of K (e.g. K = 1, 2, 3, 4, 5), and report your observations on the achieved

classification.

Deliverables: R project with your student number as the project’s name (e.g.

12345678.Rproj). The project should have the following folders and files inside the

folders:

1) Folder - Code:

● : Code to complete Task 1.

● : Code to complete Task 2.

● : Code to complete Task 3.

Provide the appropriate header in each file (your identity and file description) and

give meaningful comments in the script.

2) Folder - data:

● : orgininal dataset.

● : preprocessed data output from Task 1.

3) Folder - Plot:

● All plots in jpg format generated in Tasks 2.3., 2.4., 2.6., 2.8., 2.10.,

3.2. and 3.3.

4) Report: your report should include the following:

● Brief description for the main functions in your source code and any

assumptions or special settings of those functions.

● Plots, evaluations, and your comments on the observed results.

Please note that your preprocessed data, plots, and results should be

reproducible. That is, we can delete them and be able to generate them by running

your code. Hence, remember to set the seed before any function that requires a

random value. That seed is the first 2 digits of your student number.

Marking: Your total mark earned for this assignment is based on:

● Report: accurate statistics and clear presentation;

● Code and reproducible results.

● Demo: one-on-one demo presentation, if needed.

Submit one archive (zip) file with your student number as the file name (e.g.

12345678.zip) with all the files and folders mentioned above. The project is due

11th October 2019, 23:59. The submission is done through the BlackBoard and

no late submission is allowed.

因為專業,所以值得信賴。如有需要,請加QQ:99515681或郵箱:99515681@qq.com

微信:codehelp

 
(文/小編)
免責聲明
本文為小編原創作品,作者: 小編。歡迎轉載,轉載請注明原文出處:http://www.jqmh.cn/news/pinpaishangji/81362.html 。本文僅代表作者個人觀點,本站未對其內容進行核實,請讀者僅做參考,如若文中涉及有違公德、觸犯法律的內容,一經發現,立即刪除,作者需自行承擔相應責任。涉及到版權或其他問題,請及時聯系我們2409157061@qq.com。
0相關評論
 
主站蜘蛛池模板: 乌鲁木齐县| 浦县| 镇赉县| 峨眉山市| 汉中市| 固阳县| 友谊县| 敦煌市| 新兴县| 南城县| 和静县| 肇庆市| 天气| 安陆市| 鄂托克前旗| 三穗县| 赤峰市| 勃利县| 同心县| 砚山县| 平度市| 嘉峪关市| 资阳市| 田林县| 云阳县| 简阳市| 高雄市| 香港 | 嵊州市| 双桥区| 徐闻县| 邯郸县| 怀化市| 深圳市| 区。| 萨迦县| 多伦县| 乐安县| 顺义区| 石棉县| 岳普湖县|