Using both python and R separately, to conduct. PCA (principal component analysis).The task needs to be done inbothPython (Jupiter notebook)andR-studioseparately. The submission will be...

Using both python and R separately, to conduct. PCA (principal component analysis).













The task needs to be done in

both


Python (Jupiter notebook)


and

R-studio


separately. The submission will be python file and R file.

Only coding, no MS-WORD file is needed, but please provide

kind comment-out explanation


in your coding.




1)

import


the attached/given data file. (200 rows and one head row)




2)

display


the data or data head in Jupiter notebook and R-studio




3)

calculate and show


the covariance matrix of the imported data.




4)

conduct


PCA (principal component analysis) with the given data.




5)

Display


each (all 10) eingen vector and eigen value separately.




6)

Calculate


the explanatory power when we use first big 3 principal components.




7)

Calculate


the explanatory power when we use first big 5 principal components.



























The task needs to be done in both Python (Jupiter notebook) and R-studio separately. The submission will be python file and R file. Only coding, no MS-WORD file is needed, but please provide kind comment-out explanation in your coding. 1) import the attached/given data file. (200 rows and one head row) 2) display the data or data head in Jupiter notebook and R-studio 3) calculate and show the covariance matrix of the imported data. 4) conduct PCA (principal component analysis) with the given data. 5) Display each (all 10) eingen vector and eigen value separately. 6) Calculate the explanatory power when we use first big 3 principal components. 7) Calculate the explanatory power when we use first big 5 principal components. MSFT DateA1A2A3A4A5A6A7A8A9A10 1/25/22291.519989294.98999285.170013288.48999285.81189269.743347273.166656260.799988269.956665269.956665 1/26/22307.98999308.5293.029999296.709991293.955566271.670013292.286682271.570007290.143341290.143341 1/27/22302.660004307.299988297.929993299.839996297.056549289.893341296.626678284.593323288.123322288.123322 1/28/22300.230011308.480011294.450012308.26001305.398407290.709991295.493347281.42334293.296661293.296661 1/31/22308.950012312.380005306.369995310.980011308.09314292.92334295.480011277.533325279.763336279.763336 2/1/22310.410004310.630005305.130005308.76001305.893738283.033325285.216675275.053345279.429993279.429993 2/2/22309.630005315.119995308.880005313.459991310.55011285.433319288.713318268.190002268.193329268.193329 2/3/22309.48999311.230011299.959991301.25298.45343265.176666283.329987260.723328274.799988274.799988 2/4/22300.209991308.799988299.970001305.940002303.099915279.82666286.853333277.33667286.323334286.323334 2/7/22306.170013307.839996299.899994300.950012298.15625283.816681284.816681270.119995279.433319279.433319 2/8/22301.25305.559998299.950012304.559998301.732697280.066681281.266663264.589996265.116669265.116669 2/9/22309.869995311.929993307.390015311.209991308.320984260.203339266.899994252.013336255.456665255.456665 2/10/22304.040009309.119995300.700012302.380005299.572937258.42334268.523346252.190002267.296661267.296661 2/11/22303.190002304.290009294.220001295.040009292.301086269.666656280.666656267.420013280.07666280.07666 2/14/22293.769989296.76001291.350006295292.261505276.996674291.666656275.23999290.533325290.533325 2/15/22300.01001300.799988297.019989300.470001297.680695291.496674302.616669289.130005301.796661301.796661 2/16/22298.369995300.869995293.679993299.5297.333221304.993347314.283325302.363342307.053345307.053345 2/17/22296.359985296.799988290290.730011288.626678310332.619995307.25331.32666331.32666 2/18/22293.049988293.859985286.309998287.929993285.846924326.646667346.899994325.466675333.036682333.036682 2/22/22285291.540009284.5287.720001285.638458336.57666341.496674329.600006337.973328337.973328 2/23/22290.179993291.700012280.100006280.269989278.24234336340.600006332.440002336.880005336.880005 2/24/22272.51001295.160004271.519989294.589996292.45874355.033325365.959991351.200012363.946655363.946655 2/25/22295.140015297.630005291.649994297.309998295.159058369.329987371.589996357.703339366.523346366.523346 2/28/22294.309998299.140015293298.790009296.628357363.723328371.316681361.333344364.66333364.66333 3/1/22296.399994299.970001292.149994294.950012292.816132364.856659367.713318358.880005359.200012359.200012 3/2/22295.359985301.470001293.700012300.190002298.018219360.383331364.916656355.546661361.529999361.529999 3/3/22302.890015303.130005294.049988295.920013293.779144363.126678383.303345357.51001381.816681381.816681 3/4/22294.290009295.660004287.170013289.859985287.762939378.766663384.290009362.433319363.753326363.753326 3/7/22288.529999289.690002278.529999278.910004276.892181357.823334359.666656342.566681348.58667348.58667 3/8/22277.799988283.959991270275.850006273.854309350.796661358.863342340.513336352.420013352.420013 3/9/22283.440002289.600006280.779999288.5286.412811347.736664349.480011340.813324341.829987341.829987 3/10/22283.019989286.600006280.579987285.589996283.523834326.799988336.156677324.880005325.309998325.309998 3/11/22287.959991289.51001279.429993280.070007278.043793332.546661340.396667325.533325328.983337328.983337 3/14/22280.339996285.399994275.820007276.440002274.440063327.026672342.079987324.366669340.790009340.790009 3/15/22280.350006287.820007278.730011287.149994285.072571333.09668337.570007327.396667328.333344328.333344 3/16/22289.109985294.570007283.200012294.390015292.260223329.676666338.306671324.470001334.763336334.763336 3/17/22293.290009295.609985289.369995295.220001293.084167335.019989344.980011331.776672342.716675342.716675 3/18/22295.369995301292.730011300.429993298.2565343.333344344.666656325.083344325.733337325.733337 3/21/22298.890015300.140015294.899994299.160004296.995697358.243347364.073334332.140015336.26001336.26001 3/22/22299.799988305298.769989304.059998301.860229338.303345344.950012331.333344335.016663335.016663 3/23/22300.51001303.230011297.720001299.48999297.323273326.323334336.206665325.100006332.67334332.67334 3/24/22299.140015304.200012298.320007304.100006301.899963331.809998333.333344291.666656292.140015292.140015 3/25/22305.230011305.5299.290009303.679993301.482971299.526672306292.453339293.83667293.83667 3/28/22304.329987310.799988304.329987310.700012308.452209299.993347300273.899994292.503326292.503326 3/29/22313.910004315.820007309.049988315.410004313.128113300.75311.466675290290.253326290.253326 3/30/22313.76001315.950012311.579987313.859985311.589325286.92334302.119995282.676666300.980011300.980011 3/31/22313.899994315.140015307.890015308.309998306.079468301.059998308.026672296.196655303.083344303.083344 4/1/22309.369995310.130005305.540009309.420013307.181488301.313324318.5295.093323317.540009317.540009 4/4/22310.089996315.109985309.709991314.970001312.691315313.006653315.200012285.899994291.093323291.093323 4/5/22313.269989314.869995309.869995310.880005308.63089295.666656296281.036682288.549988288.549988 4/6/22305.190002307296.709991299.5297.333221278.816681281.876678260.383331262.369995262.369995 4/7/22296.660004303.649994296.350006301.369995299.189697273.103333275.119995258.083344266.679993266.679993 4/8/22300.440002301.119995296.279999296.970001294.821503265269.92334242.399994244.666672244.666672 4/11/22291.790009292.609985285285.26001283.196259233.666672253.220001226.666672242.666672242.666672 4/12/22289.23999290.73999280.48999282.059998280.019379257.82666262.450012250.523331256.529999256.529999 4/13/22282.730011288.579987281.299988287.619995285.539154255.720001256.58667239.696671241.456665241.456665 4/14/22288.089996288.309998279.320007279.829987277.805542249.119995254.82666242.949997253.869995253.869995 4/18/22278.910004282.459991278.339996280.519989278.49054248.17334253.5233.603333236.603333236.603333 4/19/22279.380005286.170013278.410004285.299988283.235931235.666672244.666672231.369995236.473328236.473328 4/20/22289.399994289.700012285.369995286.359985284.288269237.996674240.526672211221.300003221.300003 4/21/22288.579987293.299988280.059998280.809998278.778442218.339996226.653336212.686661224.96666224.96666 4/22/22281.679993283.200012273.380005274.029999272.047485217.843338217.973328206.856674209.386673209.386673 4/25/22273.290009281.109985270.769989280.720001278.689087207.949997223.106674207.669998219.600006219.600006 4/26/22277.5278.359985270270.220001268.265076220.473328239.556671217.886673235.910004235.910004 4/27/22282.100006290.970001279.160004283.220001281.17099241.083328253.266663240.176666253.210007253.210007 4/28/22285.190002290.980011281.459991289.630005287.534607257.946655259.600006244.743332252.753326252.753326 4/29/22288.609985289.880005276.5277.519989275.512238251.720001257.32666243.639999246.789993246.789993 5/2/22277.709991284.940002276.220001284.470001282.411926244.156662264.209991242.066666258.333344258.333344 5/3/22283.959991284.130005280.149994281.779999279.741425243.226669247.796661233.416672234.516663234.516663 5/4/22282.589996290.880005276.730011289.980011287.882111244.353333244.866669234.350006238.279999238.279999 5/5/22285.540009286.350006274.339996277.350006275.343475234239.996674230.093338238.886673238.886673 5/6/22274.809998279.25271.269989274.730011272.742432240.08667249.963333239.176666241.866669241.866669 5/9/22270.059998272.359985263.320007264.579987262.665833249.339996255.546661239.32666239.706665239.706665 5/10/22271.690002273.75265.070007269.5267.550293235.156662239.5227.91333232.229996232.229996 5/11/22265.679993271.359985259.299988260.549988258.665009223.166672226.633331214.683334215.736664215.736664 5/12/22257.690002259.880005250.020004255.350006253.50264218.286667226.330002211.736664220.889999220.889999 5/13/22257.350006263.040009255.350006261.119995259.230927220.916672235.66333218.149994233233 5/16/22259.959991265.820007255.779999261.5259.608154222.736664225.166672208.693329213.100006213.100006 5/17/22266.109985268.329987262.459991266.820007264.889679213.433334220.970001213.196671216.759995216.759995 5/18/22263263.600006252.770004254.080002252.82933224.603333243.57666224.333328237.036667237.036667 5/19/22253.899994257.670013251.880005253.139999251.893951234.503326246.833328233.82666236.08667236.08667 5/20/22257.23999258.540009246.440002252.559998251.316803237.906662239.316666228.636673235.070007235.070007 5/23/22255.490005261.5253.429993260.649994259.366974237.470001246.066666236.08667245.706665245.706665 5/24/22257.890015261.329987253.5259.619995258.342041249.366669252.070007242.566666244.919998244.919998 5/25/22258.140015264.579987257.130005262.519989261.227783244.483337249.970001232.343338232.66333232.66333 5/26/22262.269989267.109985261.429993265.899994264.591125230.5231.17334222.273331228.490005228.490005 5/27/22268.480011273.339996267.559998273.23999271.894989224.509995229.456665218.863327224.473328224.473328 5/31/22272.529999274.769989268.929993271.869995270.531769227230.229996222.119995227.263336227.263336 6/1/22275.200012277.690002270.040009272.420013271.079041223233.146667216.166672233.066666233.066666 6/2/22264.450012274.649994261.600006274.579987273.228394230.779999234.563339227.186661231.733337231.733337 6/3/22270.309998273.450012268.410004270.019989268.690857233.919998245.363327232.210007244.543335244.543335 6/6/22272.059998274.179993267.220001268.75267.427094242.333328254.979996241.160004250.763336250.763336 6/7/22266.640015273.130005265.940002272.5271.158661252.103333253.063339233.626663234.343338234.343338 6/8/22271.709991273269.609985270.410004269.078949236.846664239.773331228.369995233.070007233.070007 6/9/22267.779999272.709991264.630005264.790009263.486633225.5242.059998225.03334237.039993237.039993 6/10/22260.579987260.579987252.529999252.990005251.74469234.896667238.653336229.333328238.313339238.313339 6/13/22245.110001249.020004241.529999242.259995241.067505240243.623337236.889999240.066666240.066666 6/14/22243.860001245.740005241.509995244.490005243.28653244.936661250.516663239.603333240.546661240.546661 6/15/22248.309998255.300003246.419998251.759995250.520737245247.139999236.976669245.529999245.529999 6/16/22245.979996247.419998243.020004244.970001243.76416246.78334250.66333243.483337247.5247.5 6/17/22244.699997250.5244.029999247.649994246.430969255.106674273.266663254.866669271.706665271.706665 6/21/22250.259995254.75249.509995253.740005252.490997276.220001280.786682270.713318272.243347272.243347 6/22/22251.889999257.170013250.369995253.130005251.884003272.216675274.146667267.399994268.433319268.433319 6/23/22255.570007259.369995253.630005258.859985257.585785266.513336267.309998256.263336258.859985258.859985 6/24/22261.809998267.980011261.720001267.700012266.382294263.809998275.926666261.790009274.820007274.820007 6/27/22268.209991268.299988263.279999264.890015263.586121280.066681283.299988272.799988280.899994280.899994 6/28/22263.980011266.910004256.320007256.480011255.217514280.700012298.320007279.100006297.149994297.149994 6/29/22257.589996261.970001255.759995260.26001258.978912301.276672311.876678295297.276672297.276672 6/30/22257.049988259.529999252.899994256.829987255.565781294.003326307.833344292.666656300.58667300.58667 7/1/22256.390015259.769989254.610001259.579987258.302216305309.549988301.149994307.396667307.396667 7/5/22256.160004262.980011254.740005262.850006261.556152311313.606659305308.633331308.633331 7/6/22263.75267.98999262.399994266.209991264.899597302.670013304.606659285.543335288.170013288.170013 7/7/22265.119995269.059998265.019989268.399994267.078827295305.200012289.08667290.42334290.42334 7/8/22264.790009268.100006263.290009267.660004266.342468290.293335292.396667279.353333283.333344283.333344 7/11/22265.649994266.529999262.179993264.51001263.207977297.066681297.51001283.369995294.356659294.356659 7/12/22265.880005265.940002252.039993253.669998252.421326296.513336298.236664285.833344286.630005286.630005 7/13/22250.190002253.550003248.110001252.720001251.476013289.416656300.160004285.033325300.029999300.029999 7/14/22250.570007255.139999245.940002254.080002252.82933301.786682313.133331301.230011309.320007309.320007 7/15/22255.720001260.369995254.770004256.720001255.456314311.666656314.666656302.883331306.563324306.563324 7/18/22259.75260.839996253.300003254.25252.998474303.396667309.656677300.033325303.996674303.996674 7/19/22257.579987259.720001253.679993259.529999258.252502306306.5301.853333302.869995302.869995 7/20/22259.899994264.869995258.910004262.269989260.979004299300.359985292.5296.666656296.666656 7/21/22259.790009264.890015257.029999264.839996263.536346291.91333292.399994286.296661289.91333289.91333 7/22/22265.23999265.329987259.070007260.359985259.0784291.453339298.82666287.92334296.453339296.453339 7/25/22261261.5256.809998258.829987257.555908297.563324303.646667296.5297.09668297.09668 7/26/22259.859985259.880005249.570007251.899994250.660034302.359985302.959991291.600006296.070007296.070007 7/27/22261.160004270.049988258.850006268.73999267.417145297.429993302287.470001288.089996288.089996 7/28/22269.75277.839996267.869995276.410004275.049408282.829987287.73999280.700012284.820007284.820007 7/29/22277.700012282276.630005280.73999279.358093287.869995288.480011272.649994277.700012277.700012 8/1/22277.820007281.279999275.839996278.01001276.641541280.619995281.25271.809998275.609985275.609985 8/2/22276277.890015272.380005274.820007273.467224272.579987277.579987266.149994277.160004277.160004 8/3/22276.76001283.5276.609985282.470001281.079559281.070007282.350006269.079987270.209991270.209991 8/4/22281.799988283.799988280.170013283.649994282.253754272.679993275.98999265.73999274.420013274.420013 8/5/22279.149994283.649994278.679993282.910004281.517395273.100006283.839996272.269989283.700012283.700012 8/8/22284.049988285.920013279.320007280.320007278.940155281.299988289.5279.76001289.26001289.26001 8/9/22279.640015283.079987277.609985282.299988280.9104291.670013299.850006291.25299.679993299.679993 8/10/22288.170013289.809998286.940002289.160004287.736633300.720001305.48999300.399994304.420013304.420013 8/11/22290.850006291.209991286.51001287.019989285.607147292.899994297.399994290.399994292.130005292.130005 8/12/22288.480011291.910004286.940002291.910004290.473114292.23999306291.640015302.609985302.609985 8/15/22291294.179993290.109985293.470001292.025452301.829987309.119995300.720001303.75303.75 8/16/22291.98999294.040009290.420013292.709991291.269165299.609985303.709991295.600006303.350006303.350006 8/17/22289.73999293.350006289.470001291.320007290.501343300.089996309.839996297.799988309.070007309.070007 8/18/22290.190002291.910004289.079987290.170013289.354553306.910004313.329987305.579987308.730011308.730011 8/19/22288.899994289.25285.559998286.149994285.345856308.290009313.799988300.630005300.799988300.799988 8/22/22282.079987282.459991277.220001277.75276.969452299.859985301.290009285.820007288.589996288.589996 8/23/22276.440002278.859985275.399994276.440002275.663147283.089996284.5272.820007275.329987275.329987 8/24/22275.410004277.230011275.109985275.790009275.014984271.829987284.089996270.309998276.01001276.01001 8/25/22277.329987279.019989274.519989278.850006278.066376283.839996288.670013277.51001282.940002282.940002 8/26/22279.079987280.339996267.980011268.089996267.336609283.079987289277.570007287.809998287.809998 8/29/22265.850006267.399994263.850006265.230011264.48465282.76001283.649994265.779999268.209991268.209991 8/30/22266.670013267.049988260.660004262.970001262.230988266.149994275.570007262.470001265.25265.25 8/31/22265.390015267.109985261.329987261.470001260.735199254.5255.160004241.009995242.399994242.399994 9/1/22258.869995260.890015255.410004260.399994259.668213250.520004257.5242.009995249.440002249.440002 9/2/22261.700012264.73999254.470001256.059998255.340408245.009995246.669998233.270004240.809998240.809998 9/6/22256.200012257.829987251.940002253.25252.5383239.440002244.580002235.350006238.130005238.130005 9/7/22254.699997258.829987253.220001258.089996257.364716233.940002234.570007222.020004223.070007223.070007 9/8/22257.51001260.429993254.789993258.519989257.793488223.929993226.990005218.360001222.960007222.960007 9/9/22260.5265.230011260.290009264.459991263.716797220.949997225.75215216.5216.5 9/12/22265.779999267.450012265.160004266.649994265.900635215.330002219.300003211.509995217.240005217.240005 9/13/22258.839996260.399994251.589996251.990005251.28186208.300003222.990005206.220001221.720001221.720001 9/14/22253.529999254.229996249.860001252.220001251.5112224.009995226.259995204.160004204.990005204.990005 9/15/22249.770004251.399994244.020004245.380005244.69043210.039993221.860001209.449997219.350006219.350006 9/16/22244.259995245.300003242.059998244.740005244.052231229.5229.820007217.25220.190002220.190002 9/19/22242.470001245.139999240.850006244.520004243.83284219.800003222.929993217.779999222.039993222.039993 9/20/22242.070007243.509995239.639999242.449997241.768661208.279999215.550003202207.279999207.279999 9/21/22244.270004247.660004238.899994238.949997238.278488206.419998214.660004203.800003214.440002214.440002 9/22/22237.869995243.860001237.570007240.979996240.30278205.820007213.5198.589996211.25211.25 9/23/22239.539993241.130005235.199997237.919998237.251389210.100006224.350006210222.419998222.419998 9/26/22237.050003241.449997236.899994237.449997236.7827219.399994230.600006218.199997224.639999224.639999 9/27/22239.979996241.800003234.5236.410004235.745636229.770004233.809998222.850006225.089996225.089996 9/28/22236.809998242.330002234.729996241.070007240.392548225.399994228.860001216.350006228.520004228.520004 9/29/22238.889999239.949997234.410004237.5236.832565226.190002229.850006221.940002227.539993227.539993 9/30/22238.289993240.539993232.729996232.899994232.245483234.050003237.399994227.279999227.820007227.820007 10/3/22235.410004241.610001234.660004240.740005240.063461226.039993227.869995214.820007214.979996214.979996 10/4/22245.089996250.360001244.979996248.880005248.180588211.360001221.199997210.139999215.309998215.309998 10/5/22245.990005250.580002244.100006249.199997248.49968222.600006223.800003203.080002207.470001207.470001 10/6/22247.929993250.339996246.080002246.789993246.096451208.649994208.899994196.660004197.080002197.080002 10/7/22240.899994241.320007233.169998234.240005233.581741194.020004195.199997186.75191.300003191.300003 10/10/22233.050003234.559998226.729996229.25228.605759190.779999195.889999177.119995177.589996177.589996 10/11/22227.619995229.059998224.110001225.410004224.77655189.899994191180.029999190.720001190.720001 10/12/22225.399994227.860001223.960007225.75225.115585186196.520004182.589996195.970001195.970001 10/13/22219.850006236.100006219.130005234.240005233.581741192.770004195.729996186.339996190.949997190.949997 10/14/22235.539993237.240005228.339996228.559998227.917694195.880005200.820007192.059998194.419998194.419998 10/17/22235.820007238.960007235.139999237.529999236.862488191.509995192.570007185.660004186.919998186.919998 10/18/22243.240005243.929993235.369995238.5237.829758183.960007186.160004180.899994183.169998183.169998 10/19/22237.039993239.610001234.289993236.479996235.81543185.050003185.190002176.550003180.190002180.190002 10/20/22235.770004241.309998234.869995236.149994235.486359175.850006176.770004167.539993167.869995167.869995 10/21/22234.740005243234.5242.119995241.439575168.630005170.919998166.190002169.910004169.910004 10/24/22243.759995247.839996241.300003247.25246.555176173.570007183.619995172.5183.199997183.199997 10/25/22247.259995251.039993245.830002250.660004249.955582185.059998185.199997180.630005182.860001182.860001 10/26/22231.169998238.300003230.059998231.320007230.669937179.960007188.5179182.919998182.919998 10/27/22231.039993233.690002225.779999226.75226.112778184.990005186.380005178.75180.830002180.830002 10/28/22226.240005236.600006226.050003235.869995235.207138182.429993194.759995180.630005194.699997194.699997 10/31/22233.759995234.919998231.149994232.130005231.477661197.080002198.919998191.800003194.699997194.699997 11/1/22234.600006235.740005227.330002228.169998227.528793191.779999196.25191.110001194.860001194.860001 11/2/22229.460007231.300003220.039993220.100006219.481476189.440002191.270004180.550003182.449997182.449997 11/3/22220.089996220.410004213.979996214.25213.647903181.220001183.649994175.330002179.820007179.820007 11/4/22217.550003221.589996213.429993221.389999220.767838175.029999179.380005172.220001174.039993174.039993 11/7/22221.990005228.410004221.279999227.869995227.22963172.199997175.199997169.059998173.440002173.440002 11/8/22228.699997231.649994225.839996228.869995228.226822173.839996182.5173.360001179.050003179.050003
Feb 11, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here