Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hey dear i have codes on matlap and when i run the codes the result show below, i donot know the reason hope help me

hey dear
i have codes on matlap and when i run the codes the result show below, i donot know the reason
hope help me with this
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
T_Y train=vec 2 mat (featuresTest (:,(1:1:4096)),2); [x,y]= size (TZY _train); 8. converts vector to matrix with matcol columns. The function creates the matrix one row at a - Mifor i=1:1:x - testenergy (i)= sum ( abs (T_Y_train (i,:)) ) 2 ) : - end xTest = Yyec2mat (testenergy, 2048); A 'vec2mat' is not recommended. With appropriate code changes, use 'reshape' instead. figure; svmMd = fitcecoc (xTrain, YTrain); svmpredicate = predict (svmMd, xTest); plotconfusion (YTest, svmPredicate) Ecitor - Friubnancode in Codere A. 7.Ytrain-yecfmat(featurestent:(:,(11:4096)),2):{x,y]=size(f,train): converts vector to matix with matcol columa. The fanction creates the mattix ane roes at a for 1=1+1:x testenergy (i)=5 an (abs(Z,ttan(i,t)),,2) : end Xtest = Yec2inat (testenerqy, 2048); a 'vec2mat' is not recomenended. With appropiate code changer, use reshape' instead. figurez avmMd = titceecoc (xTran,Train)/ svepredicat. = predict. (svmYd, x'Fest. ) ? plotconfusion (YFegt, gvmPredicate) 0=0 enpty table Frror using patlab. io.datastore. Tinagepatartore/spliteachtabed. (Aine. 21.1) splitbachtabel requiree hon-eapty labels property Command Window 00emptytable outputsize =[2227227]; net = alexnet: net.Layeta: auimdstrain = augnentedinagebatastore foutputsize, indstrain) : auindstest = augnentedimagebatastore (outputgize, imds7est); I extracted the features of the x-ray inagen from layer 7 which ift i presented high level and sensicive features as 2+4096 vector. layer = ' fe7 featurest Kain = activations (net, auindstrain, layer, 'oucpuths', 'rons') ; 64 YTrain = imdsTrain. Labelsi YTest, = indsTest, Labels ; reaturestrain = numel. (Traincategories): Testnunclasses = numel (Testcategories) At hamand Window 0*0 empty table featurestrain = numel (Traincategories) Testnumclasses = numel (Testcategories) : 78 applied the power of signal function to extracted features from 1*4096 vector I the power of signal calculates for each two elements and the each 2 8 elements produce 1 result which mean reduce the size of vector from 4096 4 to 2048 2. Xtrain-vec2mati(featurestrain (:, (1:1:4096)),2) : A 'veczmat' is not recommended. With appropriate code changes, use 'reshape' instead. 1 converts vector to matrix with matcol columng. The function creates the matrix one rou at for 1=1:1:m Energy (1)=sum(abs(8train(1,:)). A 2); 00 empty table Error using mat1ab.1o, dataatore.TmageDatastore/splitzachlabe1 (Line. 211) spliteachlabel requires non-enpty Labels property. Brror in Code (1ine 23) [imdsTrain, indsTest. = apl it EachLabel (imds, 0.90, 'randomized ' )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

7. List behaviors to improve effective leadership in meetings

Answered: 1 week ago

Question

6. Explain the six-step group decision process

Answered: 1 week ago