国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

DDA3020代做、代寫Python語言編程
DDA3020代做、代寫Python語言編程

時間:2024-10-12  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



DDA3020 Homework 1
Due date: Oct 14, 2024
Instructions
• The deadline is 23:59, Oct 14, 2024.
• The weight of this assignment in the ffnal grade is 20%.
• Electronic submission: Turn in solutions electronically via Blackboard. Be sure to submit
 your homework as one pdf ffle plus two python scripts. Please name your solution ffles as
”DDA3020HW1 studentID name.pdf”, ”HW1 yourID Q1.ipynb” and ”HW1 yourID Q2.ipynb”.
(.py ffles also acceptable)
• Note that late submissions will result in discounted scores: 0-24 hours → 80%, 24-120 hours
→ 50%, 120 or more hours → 0%.
• Answer the questions in English. Otherwise, you’ll lose half of the points.
• Collaboration policy: You need to solve all questions independently and collaboration between
students is NOT allowed.
1 Written Problems (50 points)
1.1. (Learning of Linear Regression, 25 points) Suppose we have training data:
{(x1, y1),(x2, y2), . . . ,(xN , yN )},
where xi ∈ R
d and yi ∈ R
k
, i = 1, 2, . . . , N.
i) (9 pts) Find the closed-form solution of the following problem.
min
W,b
X
N
i=1
∥yi − Wxi − b∥
2
2
,
ii) (8 pts) Show how to use gradient descent to solve the problem. (Please state at least one
possible Stopping Criterion)
1DDA3020 Machine Learning Autumn 2024, CUHKSZ
iii) (8 pts) We further suppose that x1, x2, . . . , xN are drawn from N (µ, σ
2
). Show that the
maximum likelihood estimation (MLE) of σ
2
is σˆ
2
MLE =
1
N
PN
n=1
(xn − µMLE)
2
.
1.2. (Support Vector Machine, 25 points) Given two positive samples x1 = (3, 3)
T
, x2 =
(4, 3)
T
, and one negative sample x3 = (1, 1)
T
, ffnd the maximum-margin separating hyperplane and
support vectors.
Solution steps:
i) Formulating the Optimization Problem (5 pts)
ii) Constructing the Lagrangian (5 pts)
iii) Using KKT Conditions (5 pts)
iv) Solving the Equations (5 pts)
v) Determining the Hyperplane Equation and Support Vectors (5 pts)
2 Programming (50 points)
2.1. (Linear regression, 25 points) We have a labeled dataset D = {(x1, y1),(x2, y2),
· · · ,(xn, yn)}, with xi ∈ R
d being the d-dimensional feature vector of the i-th sample, and yi ∈ R
being real valued target (label).
A linear regression model is give by
fw0,...,wd
(x) = w0 + w1x1 + w2x2 + · · · + wdxd, (1)
where w0 is often called bias and w1, w2, . . . , wd are often called coefffcients.
Now, we want to utilize the dataset D to build a linear model based on linear regression.
We provide a training set Dtrain that includes 2024 labeled samples with 11 features (See linear
 regression train.txt) to fft model, and a test set Dtest that includes 10 unlabeled samples with
11 features (see linear regression test.txt) to estimate model.
1. Using the LinearRegression class from Sklearn package to get the bias w0 and the coefffcients
w1, w2, . . . , w11, then computing the yˆ = f(x) of test set Dtest by the model trained well. (Put
the estimation of w0, w1, . . . , w11 and these yˆ in your answers.)
2. Implementing the linear regression by yourself to obtain the bias w0 and the coefffcients
w1, w2, . . . , w11, then computing the yˆ = f(x) of test set Dtest. (Put the estimation of
w0, w1, . . . , w11 and these yˆ in your answers. It is allowed to compute the inverse of a matrix
using the existing python package.)
2DDA3020 Machine Learning Autumn 2024, CUHKSZ
(Hint: Note that for linear regression train.txt, there are 2024 rows with 12 columns where the
ffrst 11 columns are features x and the last column is target y and linear regression test.txt
only contains 10 rows with 11 columns (features). Both of two tasks require the submission of
code and results. Put all the code in a “HW1 yourID Q1.ipynb” Jupyter notebook. ffle.(”.py”
ffle is also acceptable))
2.2. (SVM, 25 points)
Task Description You are asked to write a program that constructs support vector machine
models with different kernel functions and slack variables.
Datasets You are provided with the iris dataset. The data set contains 3 classes of 50 instances
each, where each class refers to a type of iris plant. There are four features: 1. sepal length in cm;
2. sepal width in cm; 3. petal length in cm; 4. petal width in cm. You need to use these features
to classify each iris plant as one of the three possible types.
What you should do You should use the SVM function from python sklearn package, which
provides various forms of SVM functions. For multiclass SVM you should use the one vs rest
strategy. You are recommended to use sklearn.svm.svc() function. You can use numpy for vector
manipulation. For technical report, you should report the results required as mentioned below (e.g.
training error, testing error, and so on).
1. (2 points) Split training set and test set. Split the data into a training set and a test set.
The training set should contain 70% of the samples, while the test set should include 30%.
The number of samples from each category in both the training and test sets should reffect
this 70-30 split; for each category, the ffrst 70% of the samples will form the training set, and
the remaining 30% will form the test set. Ensure that the split maintains the original order
of the data. You should report instance ids in the split training set and test set. The output
format is as follows:
Q2.2.1 Split training set and test set:
Training set: xx
Test set: xx
You should ffll up xx in the template. You should write ids for each set in the same line with
comma separated, e.g. Training set:[1, 4, 19].
2. (10 points) Calculation using Standard SVM Model (Linear Kernel). Employ the
standard SVM model with a linear kernel. Train your SVM on the split training dataset and
3DDA3020 Machine Learning Autumn 2024, CUHKSZ
validate it on the testing dataset. Calculate the classiffcation error for both the training and
testing datasets, output the weight vector w, the bias b, and the indices of support vectors
(start with 0). Note that the scikit-learn package does not offer a function with hard margin,
so we will simulate this using C = 1e5. You should ffrst print out the total training error
and testing error, where the error is
wrong prediction
number of data
. Then, print out the results for each class
separately (note that you should calculate errors for each class separately in this part). You
should also mention in your report which classes are linear separable with SVM without slack.
The output format is as follows:
Q2.2.2 Calculation using Standard SVM Model:
total training error: xx, total testing error: xx,
class setosa:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
class versicolor:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
class virginica:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
Linear separable classes: xx
If we view the one vs all strategy as combining the multiple different SVM, each one being
a separating hyperplane for one class and the rest of the points, then the w, b and support
vector indices for that class is the corresponding parameters for the SVM separating this class
and the rest of the points. If a variable is of vector form, say a =


1
2
3
?**4;
?**5;?**5;?**6;, then you should write
each entry in the same line with comma separated e.g. [1,2,3].
3. (6 points) Calculation using SVM with Slack Variables (Linear Kernel). For each
C = 0.25 × t, where t = 1, 2, . . . , 4, train your SVM on the training dataset, and subsequently
validate it on the testing dataset. Calculate the classiffcation error for both the training and
testing datasets, the weight vector w, the bias b, and the indices of support vectors, and the
slack variable ζ of support vectors (you may compute it as max(0, 1 − y · f(X)). The output
format is as follows:
Q2.2.3 Calculation using SVM with Slack Variables (C = 0.25 × t, where t = 1, . . . , 4):
4DDA3020 Machine Learning Autumn 2024, CUHKSZ
-------------------------------------------
C=0.25,
total training error: xx, total testing error: xx,
class setosa:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
slack variable: xx,
class versicolor:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
slack variable: xx,
class virginica:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
slack variable: xx,
-------------------------------------------
C=0.5,
<... results for (C=0.5) ...>
-------------------------------------------
C=0.75,
<... results for (C=0.75) ...>
-------------------------------------------
C=1,
<... results for (C=1) ...>
4. (7 points) Calculation using SVM with Kernel Functions. Conduct experiments with
different kernel functions for SVM without slack variable. Calculate the classiffcation error
for both the training and testing datasets, and the indices of support vectors for each kernel
type:
(a) 2nd-order Polynomial Kernel
(b) 3nd-order Polynomial Kernel
(c) Radial Basis Function Kernel with σ = 1
(d) Sigmoidal Kernel with σ = 1
The output format is as follows:
5DDA3020 Machine Learning Autumn 2024, CUHKSZ
Q2.2.4 Calculation using SVM with Kernel Functions:
-------------------------------------------
(a) 2nd-order Polynomial Kernel,
total training error: xx, total testing error: xx,
class setosa:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
class versicolor:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
class virginica:
training error: xx, testing error: xx,
w: xx, b: xx,
support vector indices: xx,
-------------------------------------------
(b) 3nd-order Polynomial Kernel,
<... results for (b) ...>
-------------------------------------------
(c) Radial Basis Function Kernel with σ = 1,
<... results for (c) ...>
-------------------------------------------
(d) Sigmoidal Kernel with σ = 1,
<... results for (d) ...>
Submission Submit your executable code in a “HW1 yourID Q2.ipynb” Jupyter notebook(”.py”
file is also acceptable). Indicate the corresponding question number in the comment for each cell,
and ensure that your code can logically produce the required results for each question in the required
format. Please note that you need to write clear comments and use appropriate function/variable
names. Excessively unreadable code may result in point deductions.

6

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:代做CS 259、Java/c++設計程序代寫
  • 下一篇:代做MSE 280、代寫Matlab程序語言
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    中文字幕日韩精品久久| 色视频www在线播放国产成人| 亚洲一区制服诱惑| 国产av国片精品| 国产精品久久久亚洲| 久久精品中文字幕一区| 国产成人精品一区二区| www.欧美免费| 国产精品久久久久久久久影视| 日韩中文字幕在线视频播放 | 国产综合动作在线观看| 欧美综合在线播放| 韩日欧美一区二区| 久久免费视频1| 欧美性受xxxx黑人猛交88| 秋霞久久久久久一区二区| 日本久久久久久久久| 欧美在线一二三区| 国产日韩一区二区在线| 99久久国产免费免费| 九九热久久66| 欧美精品久久久久| 日本a级片在线播放| 精品国产一区二区三区在线| 日本不卡免费高清视频| 欧美日韩dvd| 97伦理在线四区| 国产精品美腿一区在线看 | 国产在线精品二区| 国产精彩免费视频| 国产精品丝袜久久久久久消防器材 | 青青在线视频一区二区三区| 国产精品又粗又长| 国产精品啪视频| 欧美一区二区激情| 国产精品一区二区三区观看| 日韩亚洲第一页| 午夜精品99久久免费| 国产一区二区自拍| 久久精品国产精品亚洲精品色| 欧美激情亚洲国产| 欧美激情亚洲天堂| 色偷偷噜噜噜亚洲男人的天堂| 精品不卡一区二区三区| 青青草视频在线视频| 国产国语刺激对白av不卡| 一区一区视频| 国产精品又粗又长| 一区二区视频在线免费| 国产噜噜噜噜久久久久久久久 | 日韩专区中文字幕| 日韩一区不卡| 91成人免费观看| 岛国一区二区三区高清视频| 99在线观看| 手机在线观看国产精品| 粉嫩av四季av绯色av第一区| 久久国产精品久久久| 国产精品一色哟哟| 夜夜爽www精品| 97精品国产97久久久久久 | 国产精品福利久久久| 国模精品一区二区三区| 国产精品久久久久久搜索| 国产一区二区三区黄| 一区二区在线高清视频| 91精品国产91久久久久久不卡| 亚洲国产精品一区二区第一页| 91精品国产九九九久久久亚洲 | 99视频国产精品免费观看| 亚洲国产日韩美| 日韩在线资源网| 国产偷人视频免费| 动漫一区二区在线| 国产精品高清网站| 久久久亚洲欧洲日产国码aⅴ| 在线观看日本一区| 欧美影院久久久| 久久福利电影| 国产一级黄色录像片| 亚州av一区二区| 国产精品美女在线播放| 国产日本欧美一区| 日本精品性网站在线观看| 国产精品视频99| 久久久在线观看| 国产日韩精品综合网站| 日韩精品欧美一区二区三区| 国产99视频在线观看| 久久久成人av| 久久久久se| 国产一区二区三区四区五区在线| 日韩一区二区三区资源| 国产精品高潮呻吟久久av无限| 91福利视频网| 国产日韩欧美一二三区| 欧美连裤袜在线视频| 米奇精品一区二区三区在线观看| 国产成人久久婷婷精品流白浆| 91国内在线视频| www.九色.com| 国产伦精品一区二区三区四区视频| 欧美性在线观看| 人人妻人人做人人爽| 午夜精品一区二区三区四区| 欧美激情一级二级| 精品久久中出| 美女av一区二区三区| 国产精品久久久久77777| 国产日韩中文在线| 亚洲影视九九影院在线观看| 国产精品二区三区| 久久精品亚洲一区| 国产精品久久久久久久美男| 国产精品美乳一区二区免费| 国产精品免费在线| 精品国产乱码久久久久久蜜柚| 久久亚洲私人国产精品va| 国产精品激情av在线播放| 久久99精品视频一区97| 激情成人开心网| 国产欧美韩日| 国产精品10p综合二区| 久久超碰亚洲| 国产精品日韩精品| 中文字幕色一区二区| 午夜精品久久久久久久白皮肤 | 国产一区二区免费电影| 欧洲中文字幕国产精品| 精品一卡二卡三卡四卡日本乱码| 国产日本欧美在线观看| 91精品国产免费久久久久久| 久久久久免费视频| 欧美大胆在线视频| 日本国产在线播放| 国产欧亚日韩视频| 久久这里只有精品18| 久久激情视频免费观看| 久久亚洲综合国产精品99麻豆精品福利 | 免费看黄色a级片| 91九色偷拍| 精品不卡在线| 欧美主播一区二区三区美女 久久精品人| 国产做受69高潮| 久久久久久免费看| 亚洲午夜精品久久久中文影院av| 欧美视频在线观看网站| 国产精品96久久久久久| 欧美日韩国产成人| 日本欧美黄网站| 99精彩视频| 欧美激情视频网站| 女同一区二区| 国产精品人成电影| 日av中文字幕| 久久久免费高清电视剧观看| 欧美激情精品久久久久| 国内少妇毛片视频| 久久久国产一区二区| 日韩精品在线视频免费观看| 久久久www免费人成黑人精品 | www..com日韩| 九色91av视频| 高清不卡日本v二区在线| 欧美激情视频在线观看| 国产久一一精品| 欧美精品videofree1080p| 国产精品揄拍500视频| 亚洲精品乱码久久久久久蜜桃91| 一本久久a久久精品vr综合| 亚洲中文字幕无码av永久| 国产一区二区在线观看免费播放| 久久精品亚洲热| 韩国日本不卡在线| 欧美激情视频一区二区| 精品无人区一区二区三区| 欧美久久精品午夜青青大伊人 | 狠狠综合久久av| 国产精品高清免费在线观看| 精品少妇人欧美激情在线观看| 国产精品久久77777| 国产欧美精品一区二区| 一本一道久久久a久久久精品91| 97碰在线视频| 欧美一级电影久久| 亚洲一区二区不卡视频| 国产高清自拍99| 激情视频在线观看一区二区三区| 国产精品九九九| 久久久性生活视频| 欧美亚洲视频在线观看| 亚洲一区二区三区精品视频 | 日本精品视频在线| 久久99精品国产99久久6尤物| 国产av熟女一区二区三区| 国产婷婷一区二区三区| 日本视频一区二区不卡| 欧美xxxx18性欧美| 国产成人艳妇aa视频在线| 国产在线观看精品一区二区三区|