Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 6 :Project the data in the arrays X _ neg and X _ pos to the 2 - dimensional subspace spanned by u 1
Problem :Project the data in the arrays Xneg and Xpos to the dimensional subspace spanned by u and u Save the dimensional datasets as XnegD and XposD respectively.
Similarly, project the vectors Alice and Bob and save the resulting dimensional vectors as AliceD and BobD respectively.
given:
df pdreadcsvLabdata.csvheaderNone
Xnegdflocdfdropcolumnsvalues.transpose
Xposdflocdfdropcolumnsvalues.transpose
Xtotaldflocdfdropcolumnsvalues.transpose
Alicedflocdfdropcolumnsvalues:
Bobdflocdfdropcolumnsvalues:
my current code:
# Save the projected data points from Problem here.
Xnegdflocdfdropcolumnsvalues.transpose
Xposdflocdfdropcolumnsvalues.transpose
Alicedflocdfdropcolumnsvalues:
Bobdflocdfdropcolumnsvalues:
U npvstacku uT
# Projecting Xneg and Xpos to D subspace spanned by u and u
XnegD npdotXneg, U
XposD npdotXpos, U
# Project the vectors Alice and Bob and save the resulting dimensional vectors as AliceD and BobD respectively.
AliceD npdotAlice U
ValueError Traceback most recent call last
in
# Projecting Xneg and Xpos to D subspace spanned by u and u
XnegD npdotXneg, U
XposD npdotXpos, U
ValueError:Comparing the plots of XnegD and XposD with AliceD and BobD make a prediction about the likelihood of Alice or Bob developing this form of cancer.
Problem : f you think that Alice is liely to develop this form of cancer, enter a value of for the variable Aliceprediction. If you think it is likely she will not develop this form of cancer, save the value of for the variable Aliceprediction. Similarly, assign a value of or for the variable Bobprediction. shapes and not aligned: dim dim
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started