Bunda biz hosil bo’lgan nuqtalar rangini ko’k rangdan qizil rangga o’zgartirib olishimiz mumkin.
Buning uchun plot3(x1,x2,y,'bo','linewidth',4); dan “bo” ni “ro” o’zgartirish kifoya
a=[1 8 3.4 2 11 2.4
13 5.6
15 6.2
21 5.3
28 7.2
33 6.8
39 8.5
45 8.23 10 56 9.123]; y=a(:,1)'; x1=a(:,2)'; x2=a(:,3)'; plot3(x1,x2,y,'ro','linewidth',4); hold on; n=length(x1); a=[ones(n,1) x1' x2']; c=pinv(a)*y'; x1=linspace(1,100,100); x2=linspace(1,100,100); [x1,x2]=meshgrid(x1,x2); y=c(1)+c(2)*x1+c(3)*x2; mesh(x1,x2,y) xlabel('Abdimuratov Do’stbek 715-18'); ylabel('Teacher:Elnur Islomovich'); zlabel('Machine learning'); title('Mashinali oqitish 3-kurs ') grid on;
yuqoridagi dasturda x o’qini biz “Abdimuratov Do’stbek 715-18” y o’qini 'Teacher:Elnur Islomovich' z o’qini 'Machine learning'
hamda title qismini 'Mashinali oqitish 3-kurs” deb nomlab oldik va “run and advance” buyrug’i berilsa quyidagi natijani olamiz.
Xulosa
Men bu amaliy ishni bajarish davomida ko’p o’zgaruvchili chiziqli regressiya ustida amallar bajarib o’tdim. Buning uchun o’qituvchi tomonidan o’rgatilgan amallar ustida ish olib bordim hamda video darslardan foydalandim.
Do'stlaringiz bilan baham: |