留学生作业代写 PS5841 Data Science in Finance & Insurance – Spring 2022 (Y. Wang) Assig

ACTU PS5841 Data Science in Finance & Insurance – Spring 2022 (Y. Wang) Assignment – 7
Assigned 3/10/22, Due 3/10/22 (Thur)
Problem 1. KNN
X1 + sinX2 − 5 = 0, where X1 ∈ [0,10] and X2 ∈ [0,10] defines a boundary in the feature space. In addition, the true class probabilities are

Copyright By PowCoder代写 加微信 powcoder

Pr(Y =1|xisonthegoodsideoftheboundary)=0.8+(x1+x2)∗0.01
Pr(Y =2|xisnotonthegoodsideoftheboundary)=0.8+(x1+x2)∗0.01 Feel free to define which side of the boundary is the good side.
[1] Produce a chart which shows, on the feature space {(X1, X2)}, the decision regions of the Bayes Classifier.
[2] Code to estimate the overall Bayes error rate
[3] Generate a sample, consitent with the true class probabilities, on the grid where X1 ∈ {0, 0.2, 0.4, 0.6, …, 10} and X2 ∈ {0, 0.2, 0.4, 0.6, …, 10}.
Produce a chart which shows, on the feature space {(X1,X2)}, the decision regions of a KNN
Classifier with K = 5.
[4] Code to estimate the test error rate of the KNN Classifier with K = 5, using the 5-fold cross validation approach. Report the following
Validation Set
Estimated KNN(5) Error Rate
Estimated Test Error Rate for this Validation Set
You may find the following resources useful.
https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier. html https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.
Page 1 is the last page. 1

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com