代写STAT3006 Assignment 4—High-Dimensional Inference代写留学生Python语言

STAT3006 Assignment 4—High-Dimensional Inference
Due Date: 15th November 2021
Weighting: 25%
Instructions
• The assignment consists of three (3
) problems; Problems 1 and 2 are worth 10 Marks
each, and Problem 3 is worth 5 Mark. Each Mark is equally weighted and is worth 1%
of the overall course grade.
• The mathematical elements of the assignment can be completed by hand, in LaTeX (prefer-
ably), or in Word (or other typesetting software). The mathematical derivations and ma-
nipulations should be accompanied by clear explanations in English regarding necessary
information required to interpret the mathematical exposition.
• Computation problems can be answered using your programming language of choice, al-
though R is generally recommended, or Python if you are uncomfortable with R. As with
the mathematical exposition, you may choose to typeset your answers to the problems in
whatever authoring or word processing software that you wish. You should also maintain a
copy of any codes that you have produced.
• Computer generated plots and hand drawn graphs should be included together with the text
where problems are answered.
• The assignment will require four (4) files containing data, that you can can download from
the Assignment 4 section on Blackboard. These files are: zip.txt, golub_genes.csv,
golub_labels.csv, and prostate.csv.
• Submission files should include the following (which ever applies to you):
– Scans of handwritten mathematical exposition.
– Typeset mathematical exposition, outputted as a pdf file.
– Typeset answers to computational problems, outputted as a pdf file.
– Program code/scripts that you wish to submit, outputted as a txt file.
• All submission files should be labeled with your name and student number and
archived together in a zip file and submitted at the TurnItIn link on Blackboard.
We suggest naming using the convention:
FirstName_LastName_STAT3006A4_[Problem_XX/Problem_XX_Part_YY].[FileExtension].
• As per my.uq.edu.au/information-and-services/manage-my-program/student-in
tegrityand-conduct/academic-integrity-and-student-conduct, what you submit
should be your own work. Even where working from sources, you should endeavour to write
in your own words. You should use consistent notation throughout your assignment and
define whatever is required.
Problem 1 [10 Marks]
Consider the data set zip.txt, which contains n = 7291 rows of data, where each row is an
observation
Z>i =
(
Yi,X
>
i
) ∈ R1+q,
with q = 256. Here Yi ∈ {0, 1, . . . , 9} is a label indicating the digit that is represented by the
vectorized 16× 16 matrix (image) Xi ∈ Rq.
Part 1 [1 Mark]
Select one of the digits y ∈ {0, 1, . . . , 9} and plot m = 9 unique images with Yi = y, in the
same plot, as characterized by Xi .
Part 2 [2 Marks]
Using all n = 7291 observations of the sample X˜n =
(
X˜1, . . . , X˜n
)
, where X˜i = Xi−X¯n (i ∈ [n])
and X¯n = n−1
∑n
i=1Xi, obtain a solution to the optimization problem:
Fˆ, Rˆ = arg min
F∈Rs×q ,R∈Rq×s
n∑
i=1
∥∥∥X˜i −RFX˜i∥∥∥2
2
,
for s = 4 and report the minimum value:
n∑
i=1
∥∥∥X˜i − RˆFˆX˜i∥∥∥2
2
.
Part 3 [2 Marks]
Using the results from Part 2, plot the forward mappings Wˆ1, . . . , Wˆn, where Wˆi = FˆX˜i, for
each i ∈ [n], colored by the labels Yi. Discuss whether there appears to be differences in the
distributions of the forward mapped observations Wˆ1, . . . , Wˆn, corresponding to different values
of the labels Yi.
Part 4 [1 Mark]
Via a spectral decomposition of the Grammian
G˜ =
n∑
i=1
X˜iX˜
>
i
report the proportion of total variance that is explained by s = 4 eigenvectors corresponding to
the first s largest eigenvalues.
Part 5 [2 Marks]
Using all n = 7291 observations of the sample Xn = (X1, . . . ,Xn), obtain a solution θˆ =(
σˆ2, µˆ, Rˆ
)
to the optimization problem
arg max
θ
logLn (θ) ,
where
logLn (θ) =
n∑
i=1
log φ
(
Xi;µ,RR
> + σ2Iq
)
= −n
2
q log (2pi)− n
2
log
∣∣RR> + σ2Iq∣∣−−1
2
trace
([
RR> + σ2Iq
]−1
S (µ)
)
,
S (µ) = n−1
∑n
i=1 (Xi − µ) (Xi − µ)>, and θ = (σ2,µ,R), with σ2 > 0, µ ∈ Rq, and R ∈ Rq×s,
for s = 4.
Part 6 [1 Marks]
Using the results from Part 5, estimate the posterior expectations of the latent variables
Wi:
E (Wi|Xi) =
(
R>R+ σ2Is
)−1
R> (Xi − µ)
for each i ∈ [n], and plot the estimated posterior expectations, colored by the labels
Yi.
Part 7 [1 Marks]
Using all n = 7291 observations of the sample Xn = (X1, . . . ,Xn), use 3-layer autoencoder
with some activation function a : R → R (of your choice) to obtain an s-dimensional
nonlinear dimensionality reduction
Wi = F (Xi) , for each i ∈ [n]
and for s = 4, where
F : Rq → Rs, x 7→ (a (f1x+ c1) , . . . , a (fsx+ cs)) ,
for some vectors f1, . . . , fs ∈ Rq and scalars c1, . . . , cs ∈ R. Then, plot W1, . . . ,Wn, colored by
the labels Yi.
Problem 2 [10 Marks]
Consider the data set golub_genes.csv , which contains q = 3571 rows of data corresponding
observations Xi ∈ Rq (i ∈ [n]), in each of the n = 72 columns. Here, each row corresponds to
the expression levels of a gene j across the n cells, corresponding to the columns. The data set
golub_labels.csv then contains the corresponding label corresponding to the cell type of each of
the n columns of golub_genes.csv, where the cells are either labeled as “ALL” or “AML”, where
ALL stands for Acute Lymphoblastic Leukemia, and AML stands for Acute Myeloid Leukemia.
For each i ∈ [n], we will write Yi = 1 if cell i is ALL and Yi = 2 if cell i is AML.
Part 1 [2 Mark]
Let f1 (x) = f (x|Y = 1) and f2 (x) = f (x|Y = 2) be the probability density functions of the
gene expression levels for ALL and AML cells, respectively. Using an maximum mean discrepancy
statistic with kernel of the form.:
κg (x,y) = g
(‖x− y‖22) ,
where g (t) = exp {−βt} for β = 2−28, and using the data X1, . . . ,Xn and Y1, . . . , Yn, (assumed to
be independent and identically distributed), test the hypotheses
H0 : f1 = f2 versus H0 : f1 6= f2,
at the α = 0.1 significance level. That is, report the test statistic, critical value, and decision
that is made. If your decisions is to not reject the null hypothesis H0, then comment on whether
or not you believe that the test was powerful enough to reject the null hypothesis,
based on the sample size.
Part 2 [2 Mark]
Let f1j (x) = f (x1|Y = 1) and f2j (x) = f (x2|Y = 2) be the marginal probability density functions
of the gene expression levels of the jth gene for ALL and AML cells, respectively. Let
P (f) =

R
xf (x) dx
be the mean of univariate probability density function f : R → R≥0. For each j ∈ [q], compute
a p-value Pj for a test of the hypotheses
H0 :P (f1j) =P (f2j) versus H0 :P (f1j) 6=P (f2j) ,
using the data X1, . . . ,Xn and Y1, . . . , Yn. Plot the p-values Pq = (P1, . . . , Pq) using a his-
togram.
Part 3 [2 Mark]
Following from Part 2, plot the empirical cumulative distribution function (ECDF) for
the sample of p-values:
F (p;Pq) =
1
q
q∑
j=1
Jp ≤ PjK ,
along with the cumulative distribution function of the uniform. distribution on the
domain [0, 1]. Comment on whether the distribution of p-values is sub-uniform. or not,
and whether or not this observation conforms with the conclusions made in Part 1.
Part 4 [2 Mark]
Using the Benjamini–Hochberg and Benjamini–Yekutieli methods, identify sets of genes j ∈ [q]
that are significant at the false discovery rate controlled level of αFD = 0.05. Report
how many of the genes are significant under each method, and report the largest
p-value that was rejected under each method.
Part 5 [1 Mark]
Using exploratory techniques and the samples X1, . . . ,Xn and Y1, . . . , Yn, explain whether you
believe that the outcomes from either of the methods applied in Part 4 are valid by
way of a discussion of the required assumptions.
Part 6 [1 Mark]
Prove that ∞∑
j=1
δ (min {j,m})
j (j + 1)
≤ 1,
for δ (k) = (2m)−1 k (k + 1), and provide a false discovery rate step-up rejection proce-
dure based on this observation.
Problem 3 [5 Marks]
Let (X1, Y1) , . . . , (Xn, Yn) be an independent and identically distributed sample of pairs of covari-
ates and responses, where Xi ∈ Rq and Yi ∈ R, where q may be larger than n.
Suppose that
E [Yi|Xi = xi] = β>xi, (1)
for some potentially sparse β ∈ Rq (here, we take sparse to mean that many of the coordinates
βj = 0 for many j ∈ [q], where β> = (β1, . . . , βq). We wish to estimate β via the so-called elastic
net-penalized least squares estimator:
βˆ = arg min
β∈Rq
1
2n
n∑
i=1
(
Yi − β>Xi
)2
+ λ
{‖β‖1 + ‖β‖22} , (2)
for some λ ≥ 0.
Part 1 [1 Mark]
Argue that Problem (2) is equivalent to the problem:
βˆ = arg min
β∈B(γ)
1
2n
n∑
i=1
(
Yi − β>Xi
)2 , (3)
where B (γ) =
{
β ∈ Rq : ‖β‖1 + ‖β‖22 ≤ γ
}
, for some γ > 0.
Part 2 [1 Mark]
Plot the set B (γ) =
{
β ∈ Rq : ‖β‖1 + ‖β‖22 ≤ γ
}
for some value of γ and discuss whether
you believe that elastic net-penalized least squares estimator can be sparse.
Part 3 [2 Mark]
Devise an algorithm for solving either Problem 2 or Problem 3.
Part 4 [1 Mark]
The rows of the file prostate.csv contains n = 98 pairs of covariates Xi ∈ Rq (q = 8; in the first
8 columns) and response Yi (in the 9th column), for i ∈ [n]. Assuming that these data admit the
relationship (2), compute estimates of β for these data using the elastic net-penalized
least squares estimator for some increasing sequence of γ (or decreasing sequence of
λ ≥ 0). Plot the trajectory of the sequence of estimates as γ increases (or λ decreases).


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图