Iris Flower Categorization Project

Lecture 01 - Treating Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach

Authors: Ms. Saman Khan Ms. Nimra Latif Ms. Hafiza Huzafa Adnan Dr. Rao Muhammad Adeel Nawab

س ن ْ ْ مِب ْاهللْ ا َّلر م ٰ ْ ْحا َّلر ي ممح

Human Engineering

ی یحصتح حن

ن رضحت دمحم ملصماہلل میلعم موملس ےن فرمميی

ِ امَّنَا ااْلَعماُل ِِبلنِِّـیما ِت ا َ تر ممج :م

اامعلح کح دارودمارح وتینںح پح ہح

ی • اگح دینح یمح سکح نح وکئح کمح یکح ہح تح آپح ھبح کح حکس یہح ی ی • یمح دلح سح معح کح حن کحت وہںح کح

• ریمیح زدنگح کح صقمح ہح وخشح رنہح اورح وخشح رنھکح

• ریمیح زدنگح کح صقمح اللح وکح ت حت ہح

• ریمیح زدنگح کح صقمح رضحتح محمح لصح اللح یلعح ولسح سح کمح شعح اورح آپح لصح اللح یلعح ولسح کح کمح اابتعح ہح

• ریمیح زدنگح کح صقمح انپح بعشح یمح وپریح دینح یمح لہپح بمنح پح آحت ہح ی • ریمیح زدنگح کح صقمح ولخمقح دخحا کح بح ولثح خد حم ہح

زدنگم کم صقمم

ن • امہریم زدنگم کم صقمم ۔م اہللم کم ی می ن ن • اہللم کم ی مےن کم صتخمم تر می اوریتم تر می راتسم – ولخمقم خدما کم بم ولثم خدم

اشمدہہمم سمم یقیمم م ت کمم فسم

سج صخش ےن یھب اہلل ک یم ي ی ےہ اس ےن اشمدہہ سم یقیم تم ک فس ےط ایک ےہم وج صخش اشمدہہ سمم یقی ک فس ےط رک اتیل ےہاُ سم ک اہلل یك م ک راض بیصن وہ اجیتےہ

اشمدہہ سم یقی تم ک فس ےسیک ےط وہ ؟م ن 1. اْ س راےتس کاسم فر اشمدہہ ںیم آےن وایلم ہرم ولخمق ) لکش ( ک ااکنررک ی الچاجےئ

2. اْ س صخش ک احل )رکدار (ماْ س سی ت ک وگایہدے م اگ ہک ہی صخش اشمدہہ س یقیم تمےک فس ک ن اسم فرےہ

3. اْ س صخش ک احل )رکدار( یہ یر خی ےہم ن رضحتا سترا میہ یلع االسلمم ہر ولخمق )لکش (ک ااکنرفرم مت ےلچ ےئگ اور اہلل کم می ےئگم ) اشمدہہ سمم یقی تم کم فس ےط وہایگ( ن فرآ ن ںیم اہلل ی كفرم مت یہم

آ ي می ابمرہکم

َو ِا ذ قَا َل ِاب ٰر ِہ ُۡی ِ َِلِب یہِ ٰا َزَر َاتَتَّ ِخ ُذ َا صنَا ًما ٰاِلہَ ًۃ ۚ ِا ِ ی ن َاٰرى َک َو قَ و َم َک ِ ِف َض ٰل ٍل ُّم ِب ٍ ی کَ ٰذِل َک نُ ِر ی ی ِاب ٰر ِہ َۡی َملَ ُک و َت ال َّس ٰم ٰو ِت َو ا َِل ر ِ ض َو ِل َی ُک و َن ِم َن ا ل ُم وِق ِن َ ی فَلَ َّما َج َّن عَل َ یہِ ال َّ ی ُل َرٰا کَ وکَبًا ۚ قَا َل ہٰ َذا َرِ ب ۚ فَلَ َّمیا َافَ َل قَا َل َ یِل ُا ِح ُّب ا ِٰلِف ِل َی فَلَ َّما َرَا ا ل َق َم َر ََب ِزغًا قَا َل ہٰ َذا َرِ ب ۚ فَلَ َّمیا َافَ َل قَا َل لَِ ئ لَّ م ی َہ ِدِ ن َرِ ب َ َِل ُک ونَ َّن ِم َن ا ل َق و ِم ال َّضآِل َ ی فَلَ َّما َرَا ال َّش م َس ََب ِزغ َ ًۃ قَا َل ہٰ َذا َرِ ب ہٰ َذیا َا ک َ ُب ۚ فَلَ َّمیا َافَلَ ت قَا َل ی ٰ َق و ِم ِاِ ن بَ ِر ی ء ِ م َّما تُ ِۡش ُک و َن ِا ِ ن َو َّجہ ُت َو جہِیَ ِل َّ ِ ّل ی فَ َط َر ال َّس ٰم ٰو ِت َو ا َِل ر َض َح ِن ی ًفا َّو َمیا َاَن ِم َن ا ل ُم ِۡش ِک َ ی َو َحا َّجہٗ قَ وُمہٗ ؕ قَا َل َا ُ َُتا ُّج وِ ن ِِف ا ٰ ِلل َو قَ د ہَ ٰدى ِن ؕ َو َ یِل َا َخا ُف َما تُ ِۡش ُک و َن بِہ ی ِا َّ ی ِل َا ن ی َّ َشا َء َرِ ب َش ی ئًا ؕ َو ِس َع َرِ ب ُ َّک َ ش ٍء ِع ل ًما ؕ َافَ َل تَتَ َذکَُّر و َن َو ک َ یفَ َا َخا ُف َمیا َا َۡش ک ُ ت َو َِل َ ََتا ُف و َن َانَّ ُ ک َا َۡش ک ُ ت َِب ٰ ِلل َما لَ م ی ُ َ ِن ل بِہ عَل َ ی ُ ک ُس ل ٰطنًا ؕ فَ َا ُّی ا ل َف ِری َق ِ ی َا َح ُّق َِب َِل م ِن ۚ ِا ن ُک ن ُ ت تَ علَ ُم و َن

َا َّ ِّل ی َن ٰا َمنُ وا َو لَ م ی َ لِب ُس ی وا ِا ی َمانَہُ م ِب ُظ ٍ ل ُاوٰل ِئ َک لَہُ ُم ا َِل م ُن َو ُہ م ُّمہ تَ ُد و َ ن

تر ممج ن ماورم م) ماسم و مق مکم مذرکم منسم م( س سجم ا سترا ممیہ مےنم ماےنپ ی س م پ مآزرم مسم مہکم مھتم ہکم :مم م مایکم مآپم موتبںم مکم خدما مانبےئم م مےھٹیب یہم م؟م مںیم دم مکیم مرہم وہںم مہکم مآپم ماورم مآپم مکم موقمم میلھک مرمگایہم مںیم ملتبمم یہم ۔م اورم ماسم مرطحم ہم ا سترا ممیہ مک مآامسونںم ماورم مزنیم مکم منطلسم کم ماظنرہم مرکاتم مھتم ،م ماورم صقمم مہیم مھتم مہک موہم ملمکم م

میقی مرنھکم مواولںم مںیم ش م وہںم مانچہچن س سمج مان مپم مراتم ماھچئم متم ماوہنںم مےنم ا ي مت ماتسرام دم مھکیم م۔ منہکم گلم م:م مہی یمم م ام مربم ےہم

مھپم س سجم موہم مڈوب مایگم متم ماوہنں مےنم ہکم :مم مںیمم مڈوےنب مواولںم مک نسپم میہنم رکم ی ۔م مھپم س سجم ماوہنںم مےنم ماچدنم مک متکمچم دم مھکیم متم ہکم مہکم :مم ہیم یمم م ام مربم مےہم ۔مم کیلم س سمج موہم میھبم مڈوبم مایگم متم م

منہکم گلم :مم ماگم یمم م ام مربم مھجمم دہا ي می منم دم متیم متم مںیم منیقیم رمگاہم مولوگںم ںیمم ش م موہاجؤںم ۔م

مھپم س سجم ماوہنںم مےنم موسرجم کم متکمچم دم مھکیم متم ہکم :مم مہیم یمم ما مربم ےہم م۔ ہیم زمميی مدہم سترما مےہم ۔مم مھپم س سجم موہم م ن مرغوبم موہام متم ماوہنںم مےنم مہکم :مماےم یمم میم موقم م! مجم جم یچم موںم مکم تم ماہللم مکم خدا مئ مںیمم رش ي مت فرامر م دم متیم موہم م، ںیمم مانم سمس مسم یبم مارم وہںم مںیم مےنم متم وپرم میم مرطحم مسکیم موہم رکم مانپم مرخم ماسم مذاتم مک مرطفم مرکیلم ےہم مسجم مےنم مآامسونںم ماورم م مزنیمم مکم دیپ م ام مایکم مےہم م،م ماورم مںیمم مرشكم مرکےنم مواولں مںیمم مسم میہن وہںم ۔م ماورم )م مھپم مہی موہام ہکم م( مانم مک موقمم مےنم مانم مسم مجحم مرشوعم رکدم یم م۔ ا سترا ممیہ مےنم )م مانم سم م ( ہکم :مم مایکم متم مجمم مسم م

ماہلل مےکم ی سر مے مںیمم مجحم مرکتم موہم کبجم ماسم مےنم ھجمم دہام ي می مدےم دم میم مےہم م؟ ماورم جم یچم موںم مکم تم ماہللم م

مےکم ماستم رش ي مت ممتنم موہم م، ںیمم مانم سم میہنم ڈرمی م) مہکم موہم مھجمم مکئم ماصقنن مچنہپم دم میم مگم م( مالم ہیم مہکم یمم م ام م ن مپورداگرم م) مھجمم م( مچکم م) اصقننم چنہپمی ( ماچےہم م) متم وہم مہر ماحلم مںیم مچنہپم ماگ ( یمم مےم مپورداگرم کم ملعم مہر میچ م کم مااحطم میکم موہےئم مےہم م۔ مایک متم مھپم میھبم مکئم حیصنم میہنم متن؟م ماورم مج یچم موںم مک متم ےنم ماہللم مکم رشم يتم مانبم مرھکم مےہم ،م مںیمم مانم مسم مےسیکم مڈرم متکسم موہںم مکبجم تم مانم یچ موںم م ن مکم ماہللم مکم رشم يتم ممننم سم میہنم مڈرتم مجم مےکم ی سر م ے مںیمم ماسم مےنم متم مپم مکئم مدیلم ی ز مل میہن مکم مےہ؟م م ن ابم ماگم ماہمترےم ی مس مکئم ملعم مےہم تم ماتبؤم مہک مہم مدوم مفر قیم مں مںیمم مسم مکنم مبم موخفم مرنہم مکم زمميی مدہم م محتسمم مےہم ؟م

)م مقیقحم متم مہیم مےہم ہکم ( موجم مولگ ام میم منم ملم مآےئم میہم ماورم ماوہنںم مےنم ماےنپ ام میم منم مےکم ماستم مسکم ملظم کم ش مبئ م میھبم آےنم میہنم دمم يی م،م مامم ماورم میچم متم مسب ماہنم مک محم مےہم م، ماورم مویہم یہم موجم میحصم مراےتسم مپم منہپم مکچم میہم ۔م Surah Al-Anaam Ayat# 74-82

آم ي می ابمرہکم

َالَ م تَ َر ِا َل ا َّ ِّل ی َحا َّج ِاب ٰر ہ َم ِ ِف َرِب ہ ی َا ن ٰاٰتىہُ ا ٰ ُلل ا ل ُم ل َک ۘ ِا ذ قَا َل ِاب ٰر ہ ُم َرِ َب ا َّ ِّل ی ُ ی َو ی ُ ِم ی ُت ۙ قَا َل َا َن ُا ح َو ُا ِم ی ُت ؕ قَا َل ِاب ٰر ہ ُم فَ ِا َّن ا ٰ َلل َ ی ِ ت َِبل َّش م ِس ِم َن ا ل َم ِۡش ِق فَ ا ِت بِہَا ِم َن ا ل َم غ ِر ِب فَ ُبہِ َت ا َّ ِّل ی کَ َف َر ؕ َو ا ٰ ُلل َِل ی َہ ِد ی ا ل َق و َم ال ٰ ظ ِل ِم َ ی

تر ممج مایکم متم مےنم ماسم مصخشم م) مےکم ماحل م ( مپ موغرم ایکم مسجم مکم ماہللم مےنم نطلسم مایکم مدےم دم میم مھتم ہکم موہم ماےنپم م مپورداگرم م) مےکم ووجدم میہم م( مےکم ی سر م ے مںیم ا سترا ممیہ مسم محبم مرکےنم ماگل؟م س سمج ا سترا ممیہ مےنم مہکم ہکمم یمم م ام مپورداگرم موہم م مےہم وجم مزدنگم میھبم دم متیم ےہم ماورم مومتم یھبمم م متم موہ منہکم ماگلم مہک :مم م مںیمم میھبم مزدنگ دم متیم موہںم اورم مومتم دم متیم موہںم م ۔مم ما سترا ممیہ مےنم ہکم :م مم مااھچم ! ماہللم متم موسرجم کم مرشمقم مسم ماکنتلم مےہم م،م متم مذرام اسم مرغمبم مسم متم ماکنلم مرکم ملؤم م ن ۔مم م ماسم مپم موہم ک مفر موہبمتم موہم مرکم مرہم ایگم م۔ ماورم ماہلل ام مسیم ماظوملںم کم دہام ي م ی میہنم دمميی رکمی ۔م Surah Al-Baqarah Ayat# 258

رضح تا سترا میہ یلع االسلمم کاحلم

1. رضحتا سترا میہ یلع االسلمم ک آگ ںیمم اکنیھپ اج رہ ےہ اور س سم سم ستر ی ونراینولخمق م

) رضحتم ربجلیئ یلع االسلم ( آپم سمدروخا سم رک رےہ یہ ہکاْ س آگ ک ہ اھجب دم ی ن ن ؟ آپ یلع االسلم ےناُ س احل ںیمم س سم سم ستر یونر ی ولخمق ک ااکنرفر مد ي ی . اورفرم ي ی َح س ِ َِب ا ٰ لل ) اہلل ی كمیم ے ےیل کیفےہ( ن فرآ ن ںیم اہلل ی كفرم مت یہم

آم ي می ابمرہکم

فَ َا قبَلُی وا ِال َ یہِ ی َ ِزفُّ و َ ن قَا َل َاتَ ع ُب ُد و َن َما تَ ن ِح ُت ون َو ا ٰ ُلل َخلَ َق ُ ک َو َما تَ ع َملُ و َ ن قَالُوا اب نُ وا لَہٗ بُن ی َانً فَ َا ل ُق و ُہ ِ ِف ا ل َج ِح ِ ۡی َو قَا َل ِا ِ ن َذا ِہ ب ِا ٰل َرِ ب َس َی ہ ِد ی ِ ن

تر ممج ماسم مپم مان مکم موقمم مےکم مولگم مانم مےکم ی مس مدوڑےم موہےئم آےئم

ا سترا ممیہ مےنم مہکم :مم م مایکم متم مانم م) موتبںم م( مکم موپتجم موہم میہنجم موخدم ترا متش وہ؟م ماحلکنم ماہلل ےنم میہمتم میھبم دیپم ما مایکم مےہم م،م اورم موجم مچکم تم مانبتم موہم م، ماسم مکم میھبم ۔م انم مولوگںم مےنم مہکم :مما سترا ممیہ مےکم مےیلم ام ي مت مامعرتم مانبؤم ،م ماورم ماسم مدتکہم موہئم مآگ ںیمم منیھپم دوم ن اورم ا سترا ممیہ مےنم ہکم :م مم مںیم ماےنپم مربم مےکم ی م س ماجرہم موہںم م،م مویہم یمم میم مرامنہئم فرم م ےئ ماگم ۔م Surah Al- Saaffaat Ayat# 94-111

آ ي می ابمرہکم

ی ُق لنَا یٰنَا ُر ُک وِ ن بَ ر ًدا َّو َس ٰل ًما عَ ٰٰل ِاب ٰرِہ َۡی

تر ممج ) مانچہچنم ماوہنں ےنم ا سترا ممیہ مک مآگم ںیمم مڈال دمميی م،م ماورم مہم مےنم ہکم ( ماےم آگم نھٹم میم وہاجم م،م ماورم ا سترا ممیہ م مےکم مےیلم الستمم مبم اجم Surah Al-Anbiya Ayat #69

ن 2. رضحتا سترا میہ یلع االسلمم ک اہللم ی ك ےنم مکحفرم ي ی ہک اےنپم ےٹیب رضحت اامسلیع

یلع االسلمک م اہلل ےک راےتس ںیمفر سی ن رکد ی ) ہی ہبم یہم لکشم احلم ےہ( . آپم یلع االسلممم ن ےن ہر احل ںیمم اہلل کماچ مہ ) مکح ( ک وپرافرم ي ی اور اےنپمےٹیب ک ذحب رکےن ےک ےیل لچڑپے ن فرآ ن ںیم اہلل ی كفرم م ت یہم

آ ي می ابمرہکم

فَلَ َّما بَلَ َغ َم َعہُ ال َّس ع َ قَا َل یٰبُ َ َّ ن ِا ِ ی ن َاٰری ِِف ا ل َمنَا ِم َا ِ ی ن َا ذ َ َُب َک فَان ُظ ر َما َذا تَٰری ؕ قَا َل ٰی َیبَ ِت ا ف َع ل َما تُ و َم ُر ۫ َس تَ ِج ُد ِ ی ن ِا ن َشا َء ا ٰ ُلل ِم َن ال ٰ صِ ِبی َ ن

تر ممج مھپم س سجم موہم ڑلکم ا سترا ممیہ مےکم ماست منلچم مھپےنم مےکم اق س مب موہایگم متم ماوہنں مےنم ہکم م: ےٹیبم م! ںیمم موخابم م مںیم دم متھکیم موہںم مہکم میہمت مذحبم مرکم مرہم موہںم ،م مابم موسچم مرکم ماتبؤم م،م اہمترم یم مایکم مراےئم مےہ؟م مےٹیب مےنم ہکم امی س ن اجنم م! مآپم مویہم مےیجیک مسجم مک مآپم مک ممکحم دمميی ماجرہم مےہم م،م ا نءا مہلل مآپم مھجمم مبصم رکےنم واولںم مںیمم م مسم ی م یئ گم Surah Al- Saaffaat Ayat# 102

ن 3. رضحتا سترا میہ یلع االسلمم ک اہللم ی ك ےنم مکحفرم ي ی ہک اےنپمےٹیب اورمویب ی ک ہکم وھچڑ آؤ ) اہجںم

زدنگ ےک کئ اابسب ن ھت( . رضحتما سترا میہم یلع االسلم ےن ہرم احلم ںیم اہلل کماچ مہ ) ن مکح ( ک وپرافرم ي ی اور اےنپ ےٹیبم اورویب ی ہکم ک وھچڑآےئ ن فرآ ن ںیم اہلل ی كفرم مت یہم

آ ي می ابمرہکم

ربَّنَیا ِا ِ ی ن َا س َکن ُت ِم ن ُذ ِریَِّ ِت ِب َوا ٍد غَ ِۡی ِذ ی َز رعٍ ِع ن َد بَی ِت َک ا ل ُم َح َّر ِم ۙ َربَّنَا ِل ُیـ ِ ق ی ُموا ال َّص ٰلو َۃ فَا ج َع ل َا ف ِئ َد ًۃ ِ م َن النَّا ِس تَہ ِو ی ی ِالَ یہِ م َوا ر ُز قہُ م ِ م َن الثَّ َمٰر ِت لَ َعلَّہُ م یَ ش ُک ُر و َ ن

تر ممج

ماےم مامہرےم مپورداگرم ! مںیمم مےنم مانپم مچک ماولدم مک مآپم مےکم رحم موالم مھگم مےکم ی م سا ي مت ام مسیم وادم میم م

مںیم لم سبمميی ےہم مسجم مںیمم مکئ متیھکم میہنم موہیت م۔ مامہرےم مپورداگرم ! م) مہی مںیمم مےنم ماسم مےیلم مایکم م( ی مہک م ن ہیم مامنزم ماقمئ رکم میم م، لدم ا مولوگںم مےکم مدولںم ںیمم مانم مےکم مےیلم مشکم دیپم م ام رکدم میجیم ،م ماورم مانم مکم مولھپںم مک مرزقم مطعم م ن فرم یم م،م ی مہک موہم مکشم مذگارم ینبم Surah Al- Abraham Ayat# 37

رضحتا سترا میہ یلع االسلمم ک احلم ) رکدار ( اور یر خیم

رضحتا سترا میہ یلعاالسلمم ک احل ) رکدار (وپرم یا م ہملسم ےک ےیل )ایق م تم ( ومننےہ ن فرآ ن ںیم اہلل ی كفرم مت یہم

آم ي می ابمرہکم

َو َم ن َا ح َس ُن ِدی نًا ِ م َّم ن َا س ََل َو جہَہٗ ِ ٰ ِلل َو ُہ َو ُم ح ِس ن َّو اتَّ َب َع ِملَّ َۃ ِاب ٰرِہ َۡی َح ِن ی ًفا ؕ َو ا َّ ََت َذ ا ٰ ُلل ِاب ٰرِہ َۡی َخ ِل ی ًل

تر ممج اورم ماسم مسم متہبم مکم مکم دم میم وہاگم مسجم مےنم ماےنپم مرہچےم م) میمسم اسرےم مووجدم م( مکم ماہللم مےکم مآگم مکھجم م دمميی موہم م،م مکبجم موہم مکینم کم موخگم میھبم موہم ،م ماورم مسجم مےنم یسم مھم چسم ا سترا ممیہ مےکم دم میم مکم یپم وم میم مکم موہم ۔ ماورم م) مہیم مولعممم م

میہ ےہم مہکم م( ماہللم مےنم ا سترا ممیہ مکم مانپم ماخصم دو م س مانبم میلم مھتم ۔م Surah un-Nissa Ayat# 125

آم ي می ابمرہکم

قَ د ََکنَ ت لَ ُ ک ُا س َوۃ َح َس نَ ۃ ِ ی ِف ِاب ٰر ِہ َۡی َو ا َّ ِّلی َن َم َعہٗ ۚ ُ

تر ممج ماہمترےم ےیلم ا سترا م میہ ماورم مانم مےکم اسیھتم مںم مںیمم تہبم میم مومننم ےہم Surah Al- Mumtahina Ayat# 4

آم ي می ابمرہکم

قَ د ََکنَ ت لَ ُ ک ُا س َوۃ َح َس نَ ۃ ِ ی ِف ِاب ٰر ِہ َۡی َو ا َّ ِّلی َن َم َعہٗ ۚ ُ

تر ممج ماہمترےم ےیلم ا سترا ممیہ ماورم مانم مےکم اسیھتم مںم مںیمم تہبم میم مومننم مےہم موہےئم یہم Surah Al- Mumtahina Ayat# 4

آ ي می ابمرہکم

ُق ل َص َد َق ا ٰ ُلل ۟ فَاتَِّب ُع وا ِمل َّ َۃ ِاب ٰر ِہ َۡی َح ِن ی ًفا ؕ َو َما ََک َن ِم َن ا ل ُم ِۡش ِک َی

تر ممج ن مآپم میہکم ہکم ماہللم مےنم مسم مہکم مےہم ،م لدما متم ا سترا ممیہ مےکم دم میم مکم ماابتعم رکوم موجم وپرم میم مرطحم یسم مھم مراےتسم مپم مھتم م،م م ن اورم مانم ولوگںم مںیمم مسم میہنم ھتم موجم ماہللم مک خدا مئ مںیم مسکم مکم رشم ي مت ممتنم یہم Surah Al- Imran Ayat# 95

امہرا کمم

اہلل ی مكمےن اےنپمما يت ممکحمساستں آامسن اور استں زنیم انب دیم

اس وق وج داین ےہ است ںآامسن او رزنیم س افدئ ہااھٹ ےنںیم انپ وق تک اض عئرک ریہ مےہ سج اہلل ی ك ےن انب يی ےہ اس ی ك ذات مس افدئہااھٹےن ںیم یہن یگل وہئم ن اہلل ی ك ک ذات س افدئہ ااھٹی ایک مےہ

سج وق وہ اہلل ی ك وج اچاتہ ےہ اس ک ہ ےن رضح تدمحم لص اہلل یلع وملس مےک ن رط ےقیس وپرا رکی مےہ سس سےلہپ تنحم اس ی س تپ رکین ڑپے مگ اہلل ےہم اور اس ےک ہت ںیم سس چک مےہ

(سک س میہن وہ ی اہلل س وہ ی مےہ) ن اس ا يت مےہ زی سن سانہک او را يت مےہمدل ںیم ای رمی امہرا کم ہی ےہم ن مہر مآنم ہر ڑھگ ی ہر وق امہری ہی وسچ وہ ہک اسری د اینےک ان ن اس ی س تک انپ رکف انب میئ اہللےہ وہ ہ س ایک اچاتہ ےہم ن اہلل ک اچ ہک ہ ےنرضحت دمحم لص اہلل یلع وملس مےک ابمرك رط ےقیس وپرا رکی مےہ ن ن ام وم مرم اسری د اینےک ان ونں ک ا سےک وپرا رکےن پ ایتر رک ی مےہ

ی سںیت مک لمع ز يی دمہ

رحم رضحتم وصیفم ستر مک لعم اص سمج

ام ےم ونوجانم

نم ہکم نم کلم ،م نم ہکم نم کلم ،م نم ہکم نم کلم ہبم ہکم اجم کچم ہبم ھکلم اجم کچم ،ہبم ہکم اجم کچم ہبم ھکلم اجم کچم ،ہبم ہکم

اجم کچم ہبم ھکلم اجم کچم

رکم ےکم دھکم ،م رکم ےکم دھکم ،م رکم ےکم دھکم داینم تم یتم ےم ئکم کم دنھکیم اچتہم ےہم

می س مادبم می س مبیصنم م، مبم مادبم بم بیصنم

فم م • موہم مولعممتم موج میغبم ام مدبم مےکم مآیتم میہم م. مانم مکم مونفنم متہکم یہم • مونفنم اجسسمسا ممم مپ متنحمم مرکتم یہم ن • مسجم میٹم سم مانبم مےہم م،م اْ مس مےنم م اجمی ےہم م ملع • موہم مولعممتم موج مادبم مےکم مراےتس مسم مآیت ي مہ م. مانم مک علو م متہکم ي مہ ر ر • علو م مارواحم مپ متنحمم مرکتم ي مہ ر • مروحم ماعلم مامم مسم مےہ،م اْ مس مےیلم مھبکم میھبم نفم میہنم موہم گم م لع ک قیقحم • ملع مکم مقیقحم ْصر مف ام ي مت مراےتس سم ماحلص موہم میتکس ےہم م،م ماورم موہم ےہم o مادبم ن • مسکم میھبم مآدمم مسم مچکم مےنھکیس مےکم ےیلم م،م آپم مکم سمس مسم مےلہپم مدل سم اُ م س مک مادبم رکمی ر تر مے اگم o یغبم مادبم مےکم مآپم مولعممتم متم ماحلص مرکم میلم گم مکیلم ملع مکم قیقحم م) مااتسدم م مکم میفم م( یہنم ملمم اگم

• مسج مصخشم مکم لعم مکم جقمیيیميق مت مبیصنم موہم ماجیتم مےہم م، موہم ماہللم مک می اجمی ےہم

موجم مکمم رکم میم مدلم مسم رکم یم

ن • کمم رکمی . ن • وخشم وخشم کمم رکمی . ن • اهللم کم استم لم رکوخشم وخشم کمم رکمی .

• آ ي می : إِمَّيَك نـَعب ُد وإِمَّيَك نَستعِ ي اُ اَ ُ تر ممج :ميی اهللم ہم یتیم یہم ابعدتم رکتم یہم .اورم جتم یہم سم مم دم متگنم یہم

ماتنئم مسم مب مپوام موہم مرکم مشیمہم ی میک مگم مکم مراتسم ایتخم مرم رکم یم

ہیم داعم روزانم ڑپیھم

ِ ِ ِ ِ ِ داع :ٱاهدَن ٱلصَٰر َط ٱلامستَقیم صَٰر َط ٱلمذين أَناـعم َت عَلَیِهم َِّ ُ ا َ َ َ َ ا ا ترمج : یمہم یسھم راهم دھکم انم ولوگںم کم راهم جم پم تم ےنم ااعنمم ایکم. ميی ماہللم ہم مچکم میہنم ماچتہم مہم موہم ماچتہم میہم موجم مت ماچاتہم ےہم ( مرضحتم ماحجم مدبعاولہبم اص سم جرحم)

مداع ام مسیم موہم موجم ماہلل مسم ملصیفم مرکوام دےم

• م ِ اللُهم خار ِ اِل َوا اخَاَت ِِل • ِ ِم م ۖ ُسبا َحانَ َك َْل علاَم لَنَا إْل َما عَل امتَـنَا ِ ِ ِ إنم َك أَنا َت الاعَلیُم ا اْلَكیُ م • ِ ِ ِ ِ َر ِّب ا اشَراح ِِل َص ادري َويَ ِّسار ِِل اَامري ِ ِ ِ َوا احلُ ال عُاق َدةً م ان ل َساِن يـَافَقُهوا قَـاوِِل • ِ ِ ِ ِ ۖ مر ِّ ب أَعُوذ ُ بِ َك م ان ََهََزات ال مشیَاط ِي ِ ِ ِ َواَعُاوذُب َك َر ِّب اَا ن مَّيا ُضُراون

Commando is a Man of Character

SLIDE Five Types of Training • Police • Elite • Rangers • Army • Commando

SLIDE Main Goal of a Course - Commando Training • Commando o Commando is a Man of Character and (s)he should Safeguard his Character

SLIDE Main Qualities of a Commando

• Live a Balanced and Scheduled Life

• تنحمم ھبکم یہنم ہریتم. • 100% Effort with Sincerity

• داعیئم وہںم تم وھکٹم کسم یھبم لچم اجتم یہم . ن • وادلیم اورم اُاتس مد کم خدم + ادبم • Respect and Serve your Parents and Teachers

SLIDE Main Qualities of a Commando Cont.… (between 9pm – 10pm) امنزم اشعء Go to bed immediately after • (on daily basis (at least 30 minutes ماہللم مکم ذرک Do •

• فرآ من ی ك ک م التوتم م مشیمہ وجت يمید م ےکم م استم م رکیم • Do brisk walk / running on daily basis (at least 30 minutes) • Drink 1-liter milk, eat at least 10 dates and take at least 10 spoons of honey on daily basis

SLIDE Main Qualities of a Commando Cont.…

• Commando Passes in Three Big Exams of Life:

• سیپم

• ہعم ہم

• وعرتم ےہمت ممد /مدم ےہم تم وعرتم

SLIDE Summary of Qualities in a Commando

ن اع س رج می

Course Focus

• To Master the Art of Living, mainly get Excellence in two things o Become a Balanced and Characterful Personality o Become an Authority in Machine Learning in the Whole World

Little Efforts Daily Will Make You the Greatest

SLIDE Little Efforts Daily Will Make You the Greatest • To systematically learn and get excellence in any concept / subject

• روزم کم کمم روزم رکیم ن • اكم نیہمم کم ھکمی ا ي مت دنم ںیمم یہنم ھکميی اجم تکس،م اسیم یہم ا ي مت نیہمم کم کمم

ا ي مت دنم ںیمم یہنم وہم تکسم • Importance of Completing Tasks on Daily Basis o Main Reasons of Failure in Life

• ہیم کمم کم رکیم گم

• وجم کمم ھبکم یھبم وہم تکسم ےہم وہم ھبکم یہنم وہمی ن • زدنگم ا ي مت دنم ےہم اورم وہم ےہم آجم زدنگم ںیمم کم ی م کم کئم یچم یہنم ےہم

• وجم دنم آپم کم زدنگم سم الچم ایگم ابم واپم یہنم آےئم اگم

• آجم کم کمم آجم یہم وہتکسم ےہم ن • وجم گم رم ایگم وہ آمی یہنم ،م آےنم والم دنم کم تپم یہنم ،م آجم دیمانم مجم ےہم ت اےنپم

وج مہر دھکؤم

Machine Learning – Summary

SLIDE

Lecture Outline

• Best Teaching and Learning Methodology of the World • Using a Template-based Approach to Systematically Perform a Real- world Task • Lecture Aim • Iris Flower Categorization System • Steps – Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach • Stop Complaining! Stop Criticizing! Let’s Start Contributing • Lecture Summary

Best Teaching and Learning Methodology of the World

SLIDE Best Teaching and Learning Methodology of the World • Question o What is the best Teaching and Learning Methodology of the world? • Answer o The best Teaching and Learning Methodology of the world is the one, which taught us in The Holy Quran and Hazrat (اہللم) Allah ▪ used (رضحتدمحم لص اہلل یلع وملسم) .Muhammad S.A.W.W to teach His Students i.e. Sahaba Karam R.A. احصہب رکام مریض ) ن عنھ (اہلل م ا میعمج • Reason o The Teaching and Learning Methodology of Hazrat Muhammad S.A.W.W. is the best (till the Day of Judgment) because ▪ It produced the best Human Beings of the world till the Day of Judgement o Hazrat Muhammad S.A.W.W. said:

دح يی ابمر مہک

ِ َح َّدثَ نَا آ َدمُ ، َح َّدثَ نَا ُشْعبَةُ ، َح َّدثَ نَا أَبُو ََجَْرةَ ، قَا َل : ََسْع ُت َزْه َدَم بْ َن ُم َض ِر ٍب ِ ِ ٍ ِ َّ ، قَا َل : ََسْع ُت ع ْمَرا َن بْ َن ُح َصْْي َرض َي ا ََّّللُ عَْن ُه َما ، قَا َل : قَا َل النَِّ ُِّب َصلى ِ َّ َِّ َِّ ا ََّّللُ عَلَْيه َو َسل َم : َخْْيُُك ْم قَ ْرِِن ، ُُثَّ الذي َن يَ لُوََنُْم ، ُُثَّ الذي َن يَ لُوَ َنُْم . قَا َل ِ َّ ِ َّ ع ْمَرا ُن : ََل أَْدِري ، أَذََكَر النَِّ ُِّب َصلى ا ََّّللُ عَلَْيه َو َسل َم بَ ْع ُد قَ ْرنَِْْي أَْو ثَََلثَةً ، َّ ِ َّ ِ قَا َل النَِّ ُِّب َصلى ا ََّّللُ عَلَْيه َو َسل َم : إ َّن بَ ْع َدُك ْم قَ ْوًما ََيُونُو َن َوََل ي ُْؤََتَنُو َن ، ِ وي ْشَه ُدو َن وََل يستَ ْشَه ُدو َن ، وي ْن ِذرو َن وََل ي ُفو َن ، ويظَْهر فِيِهم السم ن ََ َ ُ ْ ََ ُ َ َ ََ ُ ُ َ ُ تر ممج ن روسل اہلل لص اہلل یلع وملس ےن فرم يی ت ںیم سس س تہب یمے زمن م ےک

ولگ ) احصہب ( یہ۔ ھپ وہ ولگ وج ان ےک دعب آ یئگ ) ی نیعب (ھپ وہ ولگ موج

اس ےک یھب دعب آ یئگ ) عبت ی نیعب ( رمعان ےن ایبن ایک ہک ںیم یہن اج م اتن ن آپلص اہلل یلع وملس ےن دو زمونں ک )اےنپ دعب (ذرک فرم يی يی نیت ک ھپ آپ ملص ن اہلل یلع وملس ےن فرم يی ہک اہمترے دعب اسی ولگ دیپا وہں گ وج وچر وہں گ، مج ن ن ںیم د يی یک ی م ن وہاگ۔ ان سوگایہ دےنی ےک ےیل یہن ہک اجےئ اگ۔ کیل وہ وگاایہں د متی ن ن ھپی گ۔ دیر یمںین گ کیل وپر ییہن مرک یگ۔ اٹمی ان ںیم اعم وہ اگ۔م یحص ماخبری 2651

SLIDE Best Teaching Methodology and Learning Methodology of the World Cont.… • Question o In what areas Sahaba Karam R.A. mainly achieved Excellence? • Answer o Sahaba Karam R.A. mainly achieved Excellence in three areas

of (ااط مع) and Obedience (قلعت) Excellence in Friendship .1 Allah

of Hazrat (ااط مع) and Obedience (قشع) Excellence in Love .2 Muhammad S.A.W.W. 3. Excellence in their Field of Work

SLIDE اہلل س قلعتم

ن • رضحت فرم ت مھت ن o اہلل ی ك سمک س مک اْ مت ت مقلعتوہہکآدم داعےک ےیل ہت ااھٹےئ اور کموہ اجےئم ن ن o آج ہ تہک یہ ےک یما الفں س اْ مت قلعت ےہ ےک یما ی م یلت کم وہ اجےئ ماگ ن ▪ ایکہ ےن ھبک ہی ہک ےک ماہلل ی ك س اْ مت قلعت ےہ ہک داع ک ےیل ہ مت ااھٹےئ ت مک وہ اجےئم اجم ؟م ن • ان ن س سج ایقم ےک دن اہلل ی ك ک دےھکی اگ ت اس ی ست ک رسحت اور انمت رکے م اگ ےک ماےنت ایپرے ماہللک ںیم مےن مداینم ںیم ویکں یہن ی میل

ن ُج ح • ایم سم ررو )ر متمہ اہللم یلع(م ک رعش ےہم

از ذلت د يیدا راس رسخو ںیچ تاں متفگ رس دادن اجں داد نن د يید ارخ يی ر مے

ے o ولوگں ےن اہلل ک د ھکییہن ےہ اور اہلل ک تبحم ںیم رسر وٹکا د يی ) اجن د م ے دی ( . س سج اہلل ک د ںیھکیگ ت ایک وہاگ )اہلل ک دےنھکی ک وخش وظفلں ںیم ایب م ن یہن وہ یتکسم) م ن o اہلل سس ک ےہ . وہ ُج سھ ےسیج گ ہ گوں ک یھب ےہ . اہلل ک رتمح اور لضف س ھبک میھب ن ن ی مادیم یہن وہی اچ مےہ ن o وج مچس دلم مس اہلل ی ك ک م لطم مرکے اگ . ا ن اہلل ، اہلل ی ك اےنپ لضف م س ن اس انپ قشع اور قلعت رضور بیصن رفمیئ مگ

SLIDE رضحتدمحملص اہلل یلع وملس س قشع • Hazrat Muhammad S.A.W.W. said

دح يی ابمر مہک

ِ ٍ ِ ِ ِ َح مدثـَنَا قـُتَـایـبَةُ با ُن َسعید َح مدثـَنَا يـَاعُقو ُب يـَاعِِن ابا َن عَباد المراْحَ ِن عَ ان ُسَهیاٍل عَ ان أَبیه ِ م ِ م ِ ِ عَ ان أَِِب ُهَرياـَرةَ أَمن َرُسوَل ا مَّلل َصلى ا مَّللُ عَلَیاه َو َسلَم قَاَل م ان أَ َش ِّد أُمِِت ِِل ُحبًّا ِ ِ ِ ِِ ِِ َن ٌس يَ ُكونُوَن بـَاعدي يـََوُّد أَ َح ُدُهام لَاو َرآِن ِبَاهله َوَمال ه

تر ممج

رضحت اوب ہر يترہ ریض اہلل اعتیلٰ ہنع س روا يی ےہ ہک روسل اہلل لص اہلل یلع وملس مےن ن فرم يی یمی ام ںیم یمے است سس سز يی د ہتبحم رک ےنواولں ںیم وہ ولگ ) یھب ( میہ وج یمے دعب وہ ںگ ، ان ںیم س) ہر ( ا يت ہی اچاتہ وہاگ ہک مکش! اےنپ الہ وایعل اور مل مک م

فری س یندے رک ھجمدکی ل م۔ ملسم میحص 7145

ن • مرضحتم فرم م ت ھتم o مآجم میھبم ام سیم مولگم ُد ماین ںیمم موموجدم میہم اورم ایقمم تم مریہم گم ▪ جم م کم موضحرم م لصم ماہللم م یلعم موملسم م سم م ام سیم م قشعم م ےہم م ہکم موہم م ام ي مت می سمر م مآپم م

لصم ماہللم م یلعم موملسم م کم م دم ےنھکیم م ےکم م ےیلم مانپم م س سم چکم مفری س نمرکےنم م کم م ایتم مرم م یہم ▪ مکیل موسالم مہیم مےہم ہکم ▪ ایکم مںیمم انم موخشم بیصنم مںم مںیمم مسم موہںم ميی میہنم ؟م • اسرم یم مداینم م کم ممؤںم م سم م زمميی دہم مرضحتم م دمحمم لصم ماہللم م یلعم موملسم م کم ماےنپم م ام ي تم ام ي تم ماتمم م مسم متبحمم ےہم • ماہلل ی مك یمہم o مرضحتم مدمحمم ملصم اہللم میلعم موملسم مسم مکمم قشعم o مآپم ملصم اہللم میلعم موملسم مک مکمم اابتم عم o اور آپم لصم اہللم م یلعم وملس پم رثکت سم درودم رشم یم ڑپنھم ک متیفم م ن مطعم فرم میئ آنیمم

SLIDE Example 01 – Excellence Achieved by Sahaba Karam R.A. • Name of Sahabi R.A. o Hazrat Umar R.A.

of Allah (ااط مع) and Obedience ( قلعتم) Trait 01 - Excellence in Friendship • and ( قلعتم) o Hazrat Umar R.A. achieved Excellence in the Friendship

of Allah and Allah made him Khalifa.tur.Rasool (ااط مع) Obedience ( مفیلخم مالوسلم ملصم ماہلل میلعم وملسم) S.A.W.W o Allah ordered the world to obey the commands of Hazrat Umar مس نَّ ( ماہللم ی مك مےنم مداینم مکم مرضحتم مرمعم مریضم ماہللم ماعتیل مہنعم مےکم مےیلم ُ رجر مر مرکم دمميی ) .R.A .Obeying Hazrat Umar R.A (زنیم) o Earth

ن مم نیم مںیمم مززللم آمميی م. مرضحتم مرمعم مریضم ماہللم ماعتیل مہنعم ےنم مزنیمم مپم مکڑام مرام ماورم فرمم يی مہکم مایکم مرمعم م

مریضم ماہللم ماعتیل مہنعم متم مپم ااصنفم میہنم رکم ی م. متم ویکم مںم متلہم مےہم م. مززلل مركم ایگم

.Obeying Hazrat Umar R.A (وہا) o Air

ن ن مرضحتم رسم مہیم مریضم ماہللم ماعتیل مہنعم مم منیم مسم رہارو مں میمم مدورم س مج مڑل مرےہم میہم . ماہپڑم مکم مرطف مسم م مدمشم مآم مرہم مےہم ماورم مرضحتم رسم مہیم مریضم ماہلل ماعتیلم مہنعم مک اُ مس مکم متپم میہنم مےہم م. مرضحتم مرمعم مریضم م ن ماہلل ماعتیلم مہنعم مم منیم مسم مبطخم دم تیم ُ ہ مےئ فرم مت میہم م،م ماے رسم مہیم م) ریضم ماہللم ماعتیلم ہنعم م( ماہپڑم مکم م مرطفم دم مھکیم م . موہام مرضحتم مرمعم مریضم ماہللم ماعتیلم مہنعم مک غیپمم مرضحتم رسم مہی ریضم ماہللم ماعتیلم م

مہنعم تم مچنہپیت ےہم ماورم مرضحتم رسم ہیم مریضم ماہللم ماعتیل مہنعم مکم مدمشم مک متپم ملچم اجمی ےہم

.Obeying Hazrat Umar R.A (ی مین) o Water

ن درمميی مۓ مینم ُ مخ وہم مایگم م. موہشمرم مہیم ھتم ہک مسکم مونوجانم مڑلکم مک مدہلم مانب مرکم درمم يی مںیمم مڈالم ماجےئم متم ْ مپر درمميی متلچم مےہم م. مہیم ی س مت م

مرضحتم مرمعم ریضم ماہللم ماعتیلم ہنعم مت مچنہپم م. مآپم مریضم ماہللم ماعتیلم مہنعم مےنم درمميی ۓ مینم مکم مطخ مھکلم م مسج مکم موہفممم مےہم ہکم ماہللم ی مك مےکم ممکحم مسم متلچم مےہم متم ملچم م، مورنم میمہم یتم میم مرضورتم میہنم ےہم مرضحتم مرمعم ریضم ماہللم ماعتیلم مہنعم کم مطخم درمميی ینم مںیمم مڈالم مایگ ماورم درمميی مۓ مینم ملچ ڑپام

.Obeying Hazrat Omar R.A (آگ) o Fire

ن ن ن مم منیم مےکم مفر ي سمی ملوام نکلیمے ماگلم م. مرضحتم مرمعم مریضم ماہللم ماعتیل مہنعم ےنم ماےنپم ماسھتم مکم فرمميی م،م اج مؤم ماورم ملوا منبم م

مرکم آ مؤم م. موہم ماسھتم مےئگم ماورم ماےنپم مہتم ےکم اش ر مے مسم ملوام مکم دوی سمہ مزنیمم مںیمم منب مرکم دمميی

of Hazrat (ااط مع) and Obedience ( قشعم) Trait 02 - Excellence in Love • Muhammad S.A.W.W.

• رضحتم م رمعم مریضم ماہللم ماعتیلم م ہنعم م کم مکانئتم مںیم م ہرم یچم م سم م زمميی دہم مرضحتم م دمحمم ملصم م ماہلل میلعم موملسم سم متبحمم ھتم

ن • ا ي م تمبتم رضحتم رمعم ریضم اہللم اعتیلم ہنعم ےکم رکمی ابمركم کم آ م ْ ي مس بملم وہم مئگم . سکم مےنم چنیقم دم میم م ن ےکم افتلم ڑپکام کٹم یلم . مرضحتم رمعم ریضم اہللم اعتیلم ہنعم ےنم فرمميی ہکم ام ي م تمبتم وضحرم ملصم م

ن اہلل م یلعم موملسم م ےکم مرکمی مابمركم م کم مآ م ْ ي مس م بملم م وہم م ئگم م ھتم مآپم م لصم ماہللم م یلعم موملسم م ےنم ماےنپم م

ن ن رکتابمرك مک آ م ْ ي م س کم ھچم میم مسم کمی مھتم م. مںیم میھبم ماےنپم مرکتم مکم آ م ْ ي مس مکم ھچم میم مسم مکوٹںم اگ ۔م ن ن ن • احصہبم رکام مریضم ماہلل ماعتیل مہنعم مداینم ماور آجر مت مںیم کیمم مبم مھتم ویکم مکن موہ مس مک مس مجمسم مرکم م ایتخم مرم مرکتم ھتم ن ن o مآجم مہم ماملسمنم مداینم مںیم پم شیم منم میہم ویکم ںم مہکم مہم مس مکم مس مجمسم رکم موھچڑم دم متیم ي مہ ر

• Trait 03 - Excellence in their Field of Work o Hazrat Umar R.A. achieved Excellence in his Field of Work ▪ i.e. Establishing and Running a Very Big State

• رضحتم م رمعم مریضم ماہلل ماعتیلم م ہنعم مک مدورم مالخفم مرصف م10 ماسلم م ےہم م. ماْ مس مصتخم م سم م رو م ق

مںیم ماملسمونںم کم وکحم م22.5 لکم ممبم میمم تم میھپم ئگم

• رضحتم م رمعم مریضم ماہللم ماعتیلم م ہنعم م. م ےنم ماےنتم موھتڑےم م رو مق م ںیمم م ام سیم ماثمیلم موکح م ماقمئم م رکم م دم یم م م . م ن مکسجم ماثملم ی مر مخیم ان م ین مںیمم یہنم تلمم o رضحتم م رمعم مریض ماہلل ماعتیلم مہنع م ےکم مدورم مںیم مانتم موخاحشیل م ھتم م ہکم مولگ مزکمۃ م ےکم م مسیپم م ن ملم مرکم مرضورتم مدنم ڈوھ دی م ت مھتم مکیلم کئم زکم مۃم نیلم موالم میہنم متلمم ھتم o رضحتم م رمعم مریضم ماہلل ماعتیلم م ہنعم م ےکم مدورم مںیم مانتم مامم مھت م ہکم م ام ي تموعرتم م مرعاقم م مسم مم منیم ہنتم مفسم مرکیتم مےہم اورم ماسم مکئم مظنم مااھٹم مرکم یھبم میہنم دم تھکیم

• Conclusion o The Teaching and Learning Methodology of Hazrat Muhammad S.A.W.W. produced best Human Beings (i.e. Sahaba Karam R.A.) who performed miracles in every field of life o If we use the Teaching and Learning Methodology of Hazrat Muhammad S.A.W.W ▪ We can also produce great Human Beings in very short time

SLIDE Example 02 – Excellence Achieved by Sahaba Karam R.A. • Name of Sahabi R.A. o Hazrat Abdur Rehman Bin Auf R.A

of Allah (ااط مع) and Obedience ( قلعتم) Trait 01 - Excellence in Friendship • o Hazrat Abdur Rehman Bin Auf R.A. is in Ashra Mubashra Sahaba (رشعہ رشبمہم احصہبریض اہلل اعتیل ہنعم) R.A • Question ?.Sahaba Karam R.A (رشعہ رشبمہم) o Who are Ashra Mubashra • Answer

• رشعہم مرشبمہ مریضم ماہلل ماعتیلم ہنعم موہم م10 احصہبم رکام مریضم ماہللم ماعتیلم ہنعم ي مہ مجم مک ماہللم م ر ن ی مك مےنم داینم مںیمم میہ س مج کم سن ر م تدےدم میم ھتم ن • رشعہم مرشبمہم احصہبم رکام مےکم ی م مہیم ي مہ ر o Hazrat Abu Bakar Siddiq (R.A.)

( مرضحتم مأوب مكبم ادصل ييم ریضم ماہللم ماعتیلم ہنعم) o Hazrat Umar Farooq (R.A.) ن ( مرضحتم مرمعم مب الجطا مب مریضم ماہللم ماعتیلم ہنعم) o Hazrat Usman Ghani (R.A.) (رضحتم مامثعنم مبم مافعن ریضم ماہللم ماعتیلم ہنعم) o Hazrat Ali (R.A.) ( مرضحتم يعم مبم ماوبم اط سمل مریضم ماہللم ماعتیلم ہنعم) o Hazrat Talha (R.A.)

( مرضحتم طلحة مب عیستي دا مهلل ریضم ماہللم ماعتیلم ہنعم) o Hazrat Zubair ibn-e-Awam (R.A.) (رضحتم ازل س يمرب بم ماوعلامم مب وخ ي ميد مریضم ماہللم ماعتیل ہنعم) o Hazrat Abu Obaidaibn-al-Jarah (R.A.) ( رضحت اوبیبعم ہم ب سجراح ریض اہلل اعتیل مہنع) o Hazrat Abdul Rehman Ibn-e-Auf (R.A.) ( رضحتم مدبعم المحم مبم موعفم مریضم ماہللم ماعتیل ہنعم) o Hazrat Saad Ibn-e-Abi Waqas (R.A.) (رضحتم معسم مبم أ س يمب مواقصم مریضم ماہلل ماعتیلم ہنعم) o Hazrat Saeed Ibn-e-Zaid (R.A.) )مرضحتم يمسد بم ز يم یدریضم ماہللم ماعتیلم ہنعم (م

of Hazrat (ااط مع) and Obedience ( قشعم) Trait 02 - Excellence in Love • Muhammad S.A.W.W.

o رضحت دبع الامحن ب وعف ریض اہلل اعتیل ہنع ک کانئت ںیم ہر میچ س ز يی د ہرضحت دمحم لص اہلل یلع وملس س تبحم مھت o رضحتدبعالامحنبوعف ریض اہلل اعتیل ہنع ےن انپ م اجترت م (business( م100 صیفم رضحتدمحملص اہلل یلع وملس ےک م ابمرك م رطرےقی ےک اطم قب يمک ْ

• Trait 03 - Excellence in the Field of Work o Hazrat Abdur Rehman Bin Auf R.A achieved Excellence in his Field of Work ▪ i.e. Business

o رضحتدبع الامحن ب وعف ریض اہلل اعتیل ہنع کم س سمج م ااقتنلم م وہام م تم م م3 مارب م س ز يی دم ہارشیفم ںم وھچڑیم

م • Conclusion o The Teaching and Learning Methodology of Hazrat Muhammad S.A.W.W. produced best Human Beings (i.e. Sahaba Karam R.A.) who performed miracles in every field of life o If we use the Teaching and Learning Methodology of Hazrat Muhammad S.A.W.W ▪ We can also produce great Human Beings in very short time

دح يی ابمر مہک

ِ ِ ِ َحمدثـَنَا آَدمُ با ُن أَِِب إََّي ٍس , َحمدثـَنَا ُشاعبَةُ ، عَ ان ااْلَ اعَم ِش ، قَاَل : ََساع ُت ذَاكَوا َن َُّيَِّد ُث ، عَ ان أ َِِب ِ ٍ ِ ِ ِ ِ م ِ م ِ م َسعید ا اْلُادر ِّي َرض َي ا مَّللُ عَناهُ , قَاَل : قَاَل النم ُِّب َصلى ا مَّللُ عَلَیاه َو َسلَم : َْل تَ ُسبُّوا أَ اص َحاِب فَـلَاو أَن ِ ٍ ِ ِ ِ ِ ِ أَ َحَدُكام أَناـَف َق مثا َل أُ ُحد ذََهبًا َما بـَلَ َغ ُممد أَ َحدهام َوَْل نَصیَفه ُ . ََتبـَعَهُ َجريٌر , َوعَبا ُد ا مَّلل با ُن َداُوَد , ِ وأَبو معاِويةَ , وُُمَاضر ، عَن ااْلَ اعم ِش َ ُ َُ َ َ ٌ ا َ تر ممج ن یبن رکمی لصاہلل یلع وملس ےن فرمم يی یمے ااحصب ک سترا الھبم وہک۔ اگ کئ صخشادح اہپڑ مےک ن ن سترا ستر یھب وسی )اہلل ک راہ ںیم ( جرچ رک ڈال تان ےک ا يت م ہلغ ےک سترا ستر یھب یہن وہ تکس اور ن ان ےک آدھم م

ےک سترا ستر م۔ ہبعش ےکاست اس دح يی ک سجر يتر، دبعا مہلل بداود،اوباعموہی اور احمرض ےن یھب اشمع مس م

روا يی ایک ےہم۔ 3673 یحص ماخبریم

SLIDE Example – Teaching and Learning Methodology of The Holy Quran • Order of Allah is Haram (رشابم) that Drinking of Wine ( مکحم) o Allah Gave Order (رحامم) • Allah systematically gave this Order i.e. o A Simple to Complex (Step by Step) Approach was used • Step 1: Drinking of Wine is Bad

آ يی ابمر مہک ا ۡ ۡ ۡ ۡ ہ مِ ۡ اۡ ِم ۡ ۡ ِ ۡ ۡ ِ ۡ ِ ۡ ََّٰيَ ُّی ََا الذي َن اََٰمنُـوا اَّنَا اْلَمُر َو الَمیسُر َو اْلَن َصا ُب َو اْلَزَْلمُ رج ٌس ِّمن عََمِل ۡ ۡ ۡ ۡ ۡ ِ ۡ ال مشی َٰط ِن فَاجتَنِبـو ہَ لَعلم ُکم تـُفلحوَن ُ ُ َ ُ تر ممج ن اےامین واول ! رشاب ، وجا ، وتبں ےک ھتن اور وجےئ ےک یت ، ) ٦٢م (ہی سس ی ی م ك ن اطیشین کم یہ ، لدا ان س وچب ، ی ہک یہمت الفح احلص موہ

ُس رر ُة ااملدئہ آ ي م ی90

• Step 2: You should not Drunk Wine at the Time of Namaz

آ يی ابمر مہک

ا ہ مِ ۡ ۡ ۡ َٰ ۃ ۡ ۡ َٰ َٰ ۡ ۡ ۡ ۡ ََّٰيَ ُّی ََا الذي َن اََٰمنُـوا َْل تَـقَربُوا ال مصلو ََ َو اَنـتُم ُسکَٰری َحتِّی تَـعلَُموا َما تَـُقولُوَن َو ِ ۡ ۡ ۡ ۡ َْل جنُـبا امْل عابِِری سبِیٍل حَٰتِّی تَـغتَ ِسلُوا ؕ ؕ ُ ً َ َ َ تر ممج ن اے امین واول ! س سج ت ےشن ک احل ںیم وہت اس وق ت امنز ےکفر ي سی یھب ن اج ی س سمج

ت ت وج چک ہک ر ےہوہ اس ےنھجمس ن وگل ، ) ٣٢م (م

ُس رر ُة ااسنل آ ي م ی43

• Step 3: Drinking of Wine is Haram

آ يی ابمر مہک

ۡ ۡ ۡ ۡ ۡ ۡ ۡ ۡ ِ ؕ ۡ ِ ۡ ہ ِ ا ِ ِۡ ِ ِ ِ ہ ا يَسئَـلُونَ َک عَ ِن اْلَمِر َو الَمیسِر قُل فی ََما اۡثٌ َکبۡیٌ مو َمنَاف ُع للنما ِس ۫ َو اۡث ُ ََُما ۡ ۡ اَکَب ِم ۡن نـمفِ عہ َِما ؕؕ َُ َ تر ممج ولگ آپ سرشاب اور وجےئ ےک ی سر ےںیم وپےتھچ یہ ۔ آ پہک دیجی ہک ا من ن ن دوونں ںیم سترا گ ہ یھب ےہ ، اور ولوگں ےک ےیل چک افدئے یھب یہ ، اور ان دوونں ک گ ہ ان مےک

افدئے س ز يی د ہ ستراھ وہا مےہ

ُس رر ُة ارقبلہ آ ي م ی219

SLIDE Example – Teaching and Learning Methodology of The Holy Quran Cont.… • Outcome of Template-based Approach used in The Holy Quran for Teaching and Learning o When Sahaba Karam (R.A.) heard the Third Order of Allah about Wine (i.e. Drinking of Wine Is Haram) ▪ All the Sahaba Karam (R.A.) immediately obeyed the Order of Allah and stopped drinking Wine

• Conclusion o Following The Holy Quran, if we use a Template-based Approach to systematically learn / perform any Real-world Task as Allah has taught us ▪ We can make Impossible into Possible In Sha Allah

SLIDE Template-based Approach Learned from the Holy Quran • From the example given (from The Holy Quran) in previous Slides, we may extract the following o Teaching and Learning Methodology • To systematically learn / perform any Real-world Task o Use a Template-based Approach • To Make a Template, use the o Divide and Conquer Approach • How Divide and Conquer Approach Works? o Systematically break a Real-world Task into ▪ Steps / Sub-steps / Sub-sub-steps o For each Step / Sub-step / Sub-sub-step, see the ▪ Order and Flow i.e. • Use a Simple to Complex Approach ▪ Connectivity and Independence i.e. 1. Each Step / Sub-step / Sub-sub-step must be connected to the previous and next Step / Sub-step / Sub-sub-step 2. Each Step / Sub-step / Sub-sub-step must be independent of every other Step / Sub-step / Sub- sub-step

SLIDE Note • In Sha Allah, in the next Slides, I will plan, design, and write my Lecture using the o Template-based Approach which we learned from The Holy Quran

Using a Template-based Approach to Systematically Perform a Real-world Task

SLIDE Steps – Using a Template-based Approach to Systematically Perform a Real- world Task • To systematically perform any Real-world Task, follow the following steps o Step 1: Completely and correctly understand the Real-world Task ▪ Write down two main things • Given • Task o Step 2: Understand the Input and Output of the Real-world Task ▪ Write down two main things • Input • Output o Step 3: Plan and Design a Template-based Approach to perform the Real-world Task ▪ Step 3.1: Use Divide and Conquer Approach to break the Real-world Task into • Steps / Sub-steps / Sub-sub-steps ▪ Step 3.2: For each Step / Sub-step / Sub-sub-step • Check the Order and Flow between Steps / Sub-steps / Sub-sub-steps • Check the Connectivity and Independence between Steps / Sub-steps / Sub-sub-steps o Step 4: Use a Five Step Process to perform the Real-world Task ▪ Step 4.1: Plan – in Mind ▪ Step 4.2: Design – on Paper ▪ Step 4.3: Execute – at Prototype level ▪ Step 4.4: Execute – at Full Scale ▪ Step 4.5: Take Feedback from Users / Audience and Domain Experts to further improve the solution of Real-world Task o Step 5: Document each Step, when performing a Real-world Task

SLIDE Importance of Documentation • At university, mainly three types of degree programs are offered o Undergraduate o MPhil o PhD • Let’s see the main outcome of these degree programs o Outcome of an Undergraduate Degree Programs ▪ Final Year Project Report • i.e. A Written Document o Outcome of a MPhil Degree Programs ▪ MPhil Thesis • i.e. A Written Document o Outcome of a PhD Degree Programs ▪ PhD Thesis • i.e. A Written Document • Conclusion o As can be noted from above discussion, that ▪ A Written Document is the main outcome of all the major degree programs offered at university level o This clearly highlights the ▪ Importance of Documentation

SLIDE Importance of Documentation Cont.… • The best book of the world i.e. the Holy Quran, is also o A Written Document • Question o How to recite The Holy Quran? • Answer (قشع) o Recite with Love • Situation 01 - Recitation of the Holy Quran and he recites the complete ( ْس مِبْ اہللْم) o A person is reciting Bismillah in one go and then starts reciting another Ayat ( ْس مِبْ اہللْم) Bismillah of the Holy Quran (آ يی مت)

س ن ْ ْ مِب ْاهللْ ا َّلر م ٰ ْ ْحا َّلر ي ممح

( قشعم) Situation 02 - Recitation of The Holy Quran with Love • and he stops at the second ( ْس مِبْ اہللْم) o A person is reciting Bismillah (اہللم) i.e. Allah ( ْس مِبْ اہللْم) word of Bismillah and starts crying, saying that (اہللم) o He kisses the word Allah (اہللم) of my beloved Allah الكم It is the ▪ again and again with Love (اہللم) o He repeats the word Allah he asks himself a ,( ْس مِبْ اہللْم) o After reading the complete Bismillah question o ماہلل لمم مہکم میہن لم؟م ن o اْ مس مالتوتم مکم مصقمم ھتم ماہللم مکم ی می م، تم مایکم مھجمم ماہللم لمم مہکم میہنم ملمم ؟م • Conclusion o Every night When you go to bed for sleep, ask yourself a question o مںیم اْ مس داینم مںیمم ماہللم مک ی م ےن آمميی ھتم o ماہلل لمم مہکم میہن لم؟م ن o موج ماہللم کم ماہللم مسم ممگنم ماگم ،م ا م ن ماہللم موہم ماہلل مکم می ماجےئم اگم ن o ميی ماہللم م، مہم مآپم مسم مآپم مکم متگنم ي مہ ،م میمہم مانپ مقشع ماورم مچسم مقلعت مطعم فرم آنیمم! ر

SLIDE Example - Steps (Systematically Performing a Real-world Task) • Consider the following Real-world Task • Real-world Task o Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach

SLIDE Example - Steps (Systematically Performing a Real-world Task) Cont.… • Step 1: Completely and correctly understand the Real-world Task o Given (اہلل ک لضف) Fazal of Allah ▪ (اک ستر) of Akabir (تجم) and Tawajju (داع) Dua ▪ ▪ Learning Material related to Iris Flower Categorization Problem, K-Fold Cross-Validation Approach and Machine Learning o Task ▪ Design and develop a self-explanatory and detailed Lecture on • Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross- Validation Approach

SLIDE Example – Steps (Systematically Performing a Real-world Task) Cont.… • Step 2: Understand the Input and Output of the Real-world Task o Input (اہلل ک لضف) Fazal of Allah ▪ (اک ستر) of Akabir (تجم) and Tawajju (داع) Dua ▪ ▪ Learning Material related to Iris Flower Categorization Problem, K-Fold Cross-Validation Approach and Machine Learning o Output ▪ Lecture - Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach

SLIDE Example - Steps (Systematically Performing a Real-world Task) Cont.… • Step 3: Plan and Design a Template-based Approach to perform the Real-world Task o Step 3.1: Use Divide and Conquer Approach to break the Real- world Task into ▪ Steps / Sub-steps / Sub-sub-steps • Using a Template-based Approach, I have divided the Real-world Task into two main Steps o Step 1: Iris Flower Categorization Problem o Step 2: Steps – Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach • Each main Step is further divided into Sub-steps / Sub-sub-steps o In Sha Allah, I will show you the Sub-steps / Sub-sub-steps in the next Sections of the Lecture

SLIDE Example - Steps (Systematically Performing a Real-world Task) Cont.… • Step 4: Use a Five Step Process to perform the Real-world Task o Step 4.1: Plan – in Mind o Step 4.2: Design – on Paper o Step 4.3: Execute – at Prototype level o Step 4.4: Execute – at Full Scale o Step 4.5: Take Feedback from Users / Audience and Domain Experts to further improve the solution of Real-world Task I have performed the ,( ماہللم مےکم ملضفم سم) Alhamdulillah, with Fazal of Allah • Real-world Task (i.e. Treating Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross-Validation Approach) using the above Five Step Process • Note o I did multiple iterations of first three Steps i.e. Plan, Design and Execute (Prototype Level) o I completed the fourth Step i.e. Execute (Full Scale) o In Sha Allah, I will wait for your valuable Feedback to further improve this Lecture

SLIDE Example - Steps (Systematically Performing a Real-world Task) Cont.… • Step 5: Document each Step, when performing a Real-world Task I have (اہلل م ےکم ملضف م سم) o Alhamdulillah, with Fazal of Allah documented this Lecture and you are reading it o In Sha Allah, I will wait for your valuable Feedback on the quality of Documentation

Lecture Aim

SLIDE Lecture Aim • The main aim of this Lecture is to demonstrate how Iris Flower Categorization Problem can be treated as a Supervised Machine Learning Problem using K-Fold Cross-Validation Approach

SLIDE What Will You Need? • To read, understand, analyze and absorb how Iris Flower Categorization Problem can be treated as a Supervised Machine Learning Problem using K-Fold Cross-Validation Approach and become a balanced and characterful personality, you will need: o Purity in Intention ن to read this Lecture should be to ( ي من) Intention ▪ ن (اہلل ک ی می ) of Allah (رعمف) Get Marifat • • Become a balanced and characterful personality • Become an authority in the field of Computer Science in the whole world اہلل مک ) o To serve the humanity for Raza of Allah (راضم o Learning Material related to Iris Flower Categorization Problem, K-Fold Cross-Validation Approach and Machine Learning o A Laptop / PC with ▪ A PDF Reader installed on it

SLIDE What Will You Learn? • After reading, understanding, documenting, and absorbing this Lecture, In Sha Allah, you will learn: o How to systematically perform any Real-world Task using a Template-based Approach? o How to become a balanced and characterful personality? o What is Iris Flower Categorization Problem? o What are the main Steps to treat the Iris Flower Categorization Problem as a Machine Learning Problem using K-Fold Cross- Validation Approach?

SLIDE Best Medicine of the World • The best medicine of the world is

Love and Respect the Humanity ن ن ن ن اسرم یم ان ي من مس متبحم رکم میم اور اسرم میم ان ي من کم مارتحام رکم یم

ن ن ن ان ي م ن کم م سسم م س سمتر یم م یخم م وخایہ ہیم م مےہ مہک اسرم یم م داینم م مےک ان من مشیمہم کم م مدوزخ سم م بم م رکم م مشیمہ ن کم م س َّ مج م ںیمم م اجےنوالم مب اجیئم ن امہرام م امین ےہ مہکرضحت دمحمم مﷺم اهللم م ےکم م آ مجر یم م یبنم م اورم م روسلم م یہم م آپم مﷺم ےکم م دعبم م )م ایقم م م

مت (م م کئم م یبنم م اورم م روسلم م یہنم م مآے اگم م م-م اسم م ئلم م تخم م بنم مت ےکم م دصقم م ہیم م ہم م سمس م کم م ذمارم میم ےہم ن ن ہکم وخدم م ینم م ماامعل م )اهلل مکم فرم ستردامر یم م ( م رکت موہے اسرم میم مداینم ےکم م ان ون مں ک ا میم منم ماور مینم ن ن ن ن ماامعل )اهلل مکم فرم ستردامر یم م( مکم دوعتدم یم م اورم م وخد گ وہ مں م )اهلل مکم ی رفم مین م ( م س تچبم م موہے اسرم میم داینم م مےک ن ن ن ن ان ون مں کم م گ وہ مں )اهلل مکم ی فرم مین (م م م س نچبم م کم م دوعتم م دم یم ن اهللم م ی مك فرآ من م ںیمم م فرم مت م یہ :م

آم ي می ابمرہکم ُک ن ُ ت َخ َۡی ُا َّم ٍۃ ُا خ ِر َج ت ِللنَّا ِس َ َت ُم ُر و َن َِبل َم ع ُر و ِف َو تَ نہَ و َن َع ِن ال ُم ن َک ِر َو تُ وِمنُ و َن َِب ٰ ِلل ؕ َو لَ و ٰا َم َن َاہ ُل ا ل ِک ٰت ِب لَ ََک َن َخ ًۡیا لَّہُ م ؕ ِمن ہُ ُم ال ُم وِمنُ و َن َو اَ ک َ َُث ُہ ُم ال ٰف ِس ُق و َ ن

تر ممج

املسمونم م! متم موہم تہبم میم ام وہم موجم مولوگںم مےکم مافدئےم مےکم مےیلم ووجدم مںیمم ملئم مئگ ےہم م۔ متم مکینم مکم میقلتم مرکتم موہم م،م سترا مئ مسم م

مروتکم موہم اورم ماہللم مپم ا میم منم مرتھکم موہم م۔ ماگم مالہم ماتکبم ا میم منم ملم مآتم تم مہیم مانم مےکم محم مںیم میہکم متہبم وہمی ۔ مانم مںیم م ن ن مسم مچکم متم موممم یہم م،م مگمم مان مکم ارثکم ي می ی فرم من مےہم ۔م Aal-e-Imran, 110

SLIDE

تبحمم م • سکم کم می نیلم تبحمم یہنم ےہم سکم ےکم دلم ںیمم گجم انبم نیلم تبحمم ےہم

ن ن ھبکم اخومشم ھٹیبم گم ھبکم چکم گتگتا مؤ گم ںیمم انتم ميی دم آؤںم اگم ھجمم نتجم الھبؤم گم کئم س سمج وپچم ےھٹیبم اگم اخومشم کم س سمس تم سم ن ہبم اھجمسمی اچوہم گم گمم اھجمسم نم ی مؤ گم ھبکم داینم لمکمم بم ےکم آےئم گم اگنوہںم ںیمم ھبکم یمم یم مکم داینم کم مہر اكم شم ںیمم ی مؤ گم یہکم پم یھبم ریہم ہم تم تبحمم ھتم تبحمم ےہم یہمتم ہم ميی دم آیئم گم یمہم تم ميی دم آوم گم

Iris Flower Categorization System

SLIDE Iris Flower – Brief Overview • Iris is a of flowering with Showy Flowers ▪ It takes its name from the Greek word for a rainbow ▪ Iris is also the name for the Greek Goddess of the Rainbow1 • Our main aim is to automatically classify Iris Flowers among three species ▪ Iris-Setosa ▪ Iris-Versicolor ▪ Iris-Virginica

SLIDE Iris Flower – Main Features • Name of Flower o Iris • Kingdom o Plantae • Family o • Subfamily o Iridoideae • Order o • Clade o Tracheophytes • Tribe o Irideae • Genus o Iris

SLIDE

1 https://en.wikipedia.org/wiki/Iris_(plant) Last visited: 05-10-2020 Iris Flower

Figure 01: Iris Sibirica [Source]

SLIDE Lecture Focus • The main focus of this Lecture is developing a o Predictive System which can automatically predict the Category (Iris-Setosa / Iris-Versicolor / Iris-Virginica) of an Iris Flower

SLIDE Iris Flower Categorization System • Real-world World o Iris Flower Categorization Problem • Treated as o Supervised Machine Learning Problem • Note o Iris Flower Categorization Problem is treated as a ▪ Multi-class Classification Problem because the main aim is to distinguish between Three Classes o Class 01 = Iris- Setosa o Class 02 = Iris-Versicolor o Class 03 = Iris-Virginica

• Goal o Learn an Input-Output Function ▪ i.e. Learn from Input to predict the Output

SLIDE Iris Flower Categorization System – Task • Given o An Iris Flower (Represented as Set of Attributes) o A pre-defined Set of Labels (Iris-Setosa, Iris-Versicolor and Iris- Virginica) • Task o Automatically predict the Category (Iris-Setosa / Iris-Versicolor / Iris-Virginica) of an Iris Flower

SLIDE Iris Flower Categorization System – Input and Output • Input o An Iris Flower • Output o Iris-Setosa / Iris-Versicolor / Iris-Virginica

SLIDE Note • Iris Flower Dataset o URL: https://archive.ics.uci.edu/ml/datasets/iris • For simplicity and to explain things more clearly o In this Lecture, we have represented an Iris Flower with Four Attributes

SLIDE Iris Flower Categorization System – Input Attributes • In this Lecture, an Iris Flower is represented with the following Four Attributes o Attribute 01 – Sepal_Length o Attribute 02 – Sepal_Width o Attribute 03 – Petal_Length o Attribute 04 – Petal_Width

SLIDE Iris Flower Categorization System – Output Attribute • In Iris Flower Dataset, there is One Output Attribute o Attribute 01 – Flower_Category ▪ Possible Value 01 = Iris-Setosa ▪ Possible Value 02 = Iris-Versicolor ▪ Possible Value 03 = Iris-Virginica

SLIDE Iris Flower Categorization System – Summary (Input and Output) • The following Table summarizes the Input and Output Attributes for Iris Flower Dataset

Attribute Attribute Name Possible Values Data Types No.

1 Sepal_Length Length in cm Numeric

2 Sepal_Width Sepal Width in cm Numeric

3 Petal_Length Length in cm Numeric

4 Petal_Width Petal Width in cm Numeric Iris-Setosa, Iris-Versicolor, Iris- Categorical 5 Flower_Category Virginica Table 01: Attributes of Dataset

SLIDE Horrrrrrrraaaaaaayyyyyyyyyyyy! • Alhamdulillah, we have understood the Iris Flower Categorization System in detail • In Sha Allah, in the next Section, I will try to present the o Steps – Treating Iris Flower Categorization Problem as a Supervised Machine Learning Problem using K-Fold Cross Validation Approach • Note o Always celebrate your achievements • Remember o There are no such things as ▪ Big Achievement ▪ Small Achievement ▪ Achievement is Achievement

Its Story Time

Book Name: Hayat Us Sahaba, Volume: 02, Page Number: 119

Steps – Treating Iris Flower Categorization Problem as a Supervised Machine Learning Problem using K-Fold Cross-Validation Approach

SLIDE Iris Flower Categorization System • Task o Develop an Iris Flower Categorization System to Predict the Category of an Iris Flower • Input o Four Attributes

1. Sepal_Length 2. Sepal_Width 3. Petal_Length 4. Petal_Width

• Output o One Attribute

1. Flower_Category

• Treated as a o Supervised Machine Learning Problem • Goal o Learn an Input-Output Function ▪ i.e. Learn from Input to predict the Output

SLIDE Iris Flower Categorization System is a Classification Problem • Iris Flower Categorization System is a Classification Problem because o Output is Categorical

SLIDE Iris Flower Categorization Problem – Input and Output • Input o Numeric • Output o Categorical

SLIDE Project Focus

Iris Flower Categorization System

SLIDE Steps – Treating Iris Flower Categorization System as a Classification Problem I will follow the following steps to treat the Iris ,(انشاء ہللا) In Sha Allah • Flower Categorization Problem as a Classification Problem o Step 1: Decide the Learning Setting o Step 2: Obtain Sample Data o Step 3: Understand and Pre-process Sample Data o Step 4: Represent Sample Data in Machine Understandable Format o Step 5: Select Suitable Machine Learning Algorithms o Step 6: Split Sample Data into K-Folds o Step 7: Select Suitable Evaluation Measure(s) o Step 8: Execute First Two Phases of Machine Learning Cycle ▪ Training Phase ▪ Testing Phase o Step 9: Analyze Results

If (Results are Good) Then Move to the Next Step Else Go to Step 1

o Step 10: Execute 3rd and 4th Phases of Machine Learning Cycle ▪ Application Phase ▪ Feedback Phase o Step 11: Improve Iris Flower Categarization System Based on Feedback ▪ Go to Step 1 and Repeat all the Steps

Step 1: Decide the Learning Setting

SLIDE Step 1: Decide the Learning Setting ن I will treat the Iris Flower Categorization Problem ,(ا نء ا مہلل) In Sha Allah • as a o Supervised Machine Learning Problem • Since Output is Categorical, it will be treated as a o Classification Problem

Step 2: Obtain Sample Data

SLIDE Step 2: Obtain Sample Data • Since I am Treating Iris Flower Categorization System as a Supervised Machine Learning Problem, I will need o Annotated Data • For more accurate learning, I need 1. Large amount of Annotated Data 2. High-quality Annotated Data 3. Balanced Data • Note / I will use a toy Corpus (انشاء ہللا) o For simplicity, In Sha Allah Dataset of 100 instances

SLIDE Step 2: Obtain Sample Data Cont… • Two Main Choices to Obtain Data 1. Use an Existing Corpus 2. Develop Your Corpus • The Dataset to use is a subset of Iris Flower Dataset o Corpus / Dataset Link: ▪ https://archive.ics.uci.edu/ml/datasets/iris o Paper Link: ▪ http://archive.ics.uci.edu/ml/datasets/Iris?ref=datanews.io o Paper Reference: ▪ Lichman, M., Irvine, (2003) CA: University of California, School of Information and Computer Science

SLIDE Obtain Sample Data Cont.… • Total Instances in Sample Data = 100 o Iris-Setosa = 34 o Iris-Versicolor = 33 o Iris-Virginica = 33

SLIDE Sample Data • We obtained a Sample Data of 100 instances o See sample-data.csv File in Supporting Material • The following Table shows the Sample Data

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 Iris-Versicolor x2 5.7 2.5 5.0 2.0 Iris-Virginica x3 7.7 3.8 6.7 2.2 Iris-Virginica x4 5.4 3.9 1.3 0.4 Iris-Setosa x5 7.3 2.9 6.3 1.8 Iris-Virginica x6 5.5 2.4 3.8 1.1 Iris-Versicolor x7 7.2 3.6 6.1 2.5 Iris-Virginica x8 6.4 3.2 4.5 1.5 Iris-Versicolor x9 5.1 3.8 1.5 0.3 Iris-Setosa x10 6.5 2.8 4.6 1.5 Iris-Versicolor x11 6.9 3.2 5.7 2.3 Iris-Virginica x12 6.4 3.2 5.3 2.3 Iris-Virginica x13 5.0 3.6 1.4 0.2 Iris-Setosa x14 5.2 4.1 1.5 0.1 Iris-Setosa x15 5.2 3.5 1.5 0.2 Iris-Setosa x16 5.0 3.4 1.5 0.2 Iris-Setosa x17 6.4 2.8 5.6 2.2 Iris-Virginica x18 4.8 3.4 1.6 0.2 Iris-Setosa x19 6.3 2.8 5.1 1.5 Iris-Virginica x20 5.7 2.6 3.5 1.0 Iris-Versicolor x21 6.4 2.8 5.6 2.1 Iris-Virginica x22 5.1 3.5 1.4 0.3 Iris-Setosa x23 6.0 2.7 5.1 1.6 Iris-Versicolor x24 6.3 2.7 4.9 1.8 Iris-Virginica x25 4.9 2.5 4.5 1.7 Iris-Virginica x26 5.1 3.5 1.4 0.2 Iris-Setosa x27 5.1 3.3 1.7 0.5 Iris-Setosa x28 4.6 3.6 1.0 0.2 Iris-Setosa x29 4.9 2.4 3.3 1.0 Iris-Versicolor x30 5.6 2.5 3.9 1.1 Iris-Versicolor x31 6.7 3.3 5.7 2.1 Iris-Virginica x32 7.7 2.6 6.9 2.3 Iris-Virginica x33 4.6 3.1 1.5 0.2 Iris-Setosa x34 6.6 3.0 4.4 1.4 Iris-Versicolor x35 6.3 3.3 4.7 1.6 Iris-Versicolor x36 7.2 3.0 5.8 1.6 Iris-Virginica x37 6.1 2.8 4.0 1.3 Iris-Versicolor x38 4.9 3.1 1.5 0.1 Iris-Setosa x39 5.7 3.8 1.7 0.3 Iris-Setosa x40 6.0 2.2 4.0 1.0 Iris-Versicolor x41 5.4 3.4 1.5 0.4 Iris-Setosa x42 7.7 2.8 6.7 2.0 Iris-Virginica x43 5.9 3.2 4.8 1.8 Iris-Versicolor x44 6.8 2.8 4.8 1.4 Iris-Versicolor x45 5.0 3.4 1.6 0.4 Iris-Setosa x46 6.1 2.8 4.7 1.2 Iris-Versicolor x47 4.8 3.4 1.9 0.2 Iris-Setosa x48 5.8 2.7 4.1 1.0 Iris-Versicolor x49 7.4 2.8 6.1 1.9 Iris-Virginica x50 5.4 3.7 1.5 0.2 Iris-Setosa x51 7.9 3.8 6.4 2.0 Iris-Virginica x52 5.0 2.0 3.5 1.0 Iris-Versicolor x53 5.6 2.8 4.9 2.0 Iris-Virginica x54 5.6 3.0 4.5 1.5 Iris-Versicolor x55 5.1 3.7 1.5 0.4 Iris-Setosa x56 6.5 3.2 5.1 2.0 Iris-Virginica x57 5.8 2.8 5.1 2.4 Iris-Virginica x58 4.8 3.1 1.6 0.2 Iris-Setosa x59 6.0 2.9 4.5 1.5 Iris-Versicolor x60 6.7 2.5 5.8 1.8 Iris-Virginica x61 5.4 3.4 1.7 0.2 Iris-Setosa x62 5.2 3.4 1.4 0.2 Iris-Setosa x63 6.9 3.1 4.9 1.5 Iris-Versicolor x64 5.5 2.3 4.0 1.3 Iris-Versicolor x65 4.7 3.2 1.3 0.2 Iris-Setosa x66 4.6 3.4 1.4 0.3 Iris-Setosa x67 7.1 3.0 5.9 2.1 Iris-Virginica x68 4.7 3.2 1.6 0.2 Iris-Setosa x69 5.6 2.9 3.6 1.3 Iris-Versicolor x70 6.4 2.9 4.3 1.3 Iris-Versicolor x71 5.4 3.9 1.7 0.4 Iris-Setosa x72 5.5 2.4 3.7 1.0 Iris-Versicolor x73 5.2 4.1 1.5 0.1 Iris-Setosa x74 6.5 3.0 5.8 2.2 Iris-Virginica x75 6.1 2.9 4.7 1.4 Iris-Versicolor x76 6.2 2.2 4.5 1.5 Iris-Versicolor x77 5.8 3.0 1.2 0.2 Iris-Setosa x78 5.9 3.0 4.2 1.5 Iris-Versicolor x79 5.7 2.8 4.5 1.3 Iris-Versicolor x80 5.7 4.4 1.5 0.4 Iris-Setosa x81 5.2 2.7 3.9 1.4 Iris-Versicolor x82 6.2 2.8 4.8 1.8 Iris-Virginica x83 6.4 2.7 5.3 1.9 Iris-Virginica x84 6.1 3.0 4.9 1.8 Iris-Virginica x85 5.0 3.0 1.6 0.2 Iris-Setosa x86 4.8 3.0 1.4 0.1 Iris-Setosa x87 6.6 2.9 4.6 1.3 Iris-Versicolor x88 6.3 2.9 5.6 1.8 Iris-Virginica x89 6.7 3.0 5.0 1.7 Iris-Versicolor x90 6.5 3.0 5.5 1.8 Iris-Virginica x91 6.8 3.0 5.5 2.1 Iris-Virginica x92 7.6 3.0 6.6 2.1 Iris-Virginica x93 5.8 2.7 3.9 1.2 Iris-Versicolor x94 4.3 3.0 1.1 0.1 Iris-Setosa sx95 6.0 2.2 5.0 1.5 Iris-Virginica x96 4.9 3.0 1.4 0.2 Iris-Setosa x97 4.4 2.9 1.4 0.2 Iris-Setosa x98 5.8 2.7 5.1 1.9 Iris-Virginica x99 7.2 3.2 6.0 1.8 Iris-Virginica x100 6.3 2.5 4.9 1.5 Iris-Versicolor

Step 03: Understand and Pre-process Data

SLIDE Step 3: Understand and Pre-process Sample Data • Understanding Data o The Sample Data contains Five Attributes ▪ Sepal_Length ▪ Sepal_Width ▪ Petal_Length ▪ Petal_Width ▪ Flower_Category o Separating Input from Output ▪ Input comprises of Four Attributes • Sepal_Length • Sepal_Width • Petal_Length • Petal_Width ▪ The Output comprises of a Single Attribute • Flower_Category • Pre-processing Data o Corpus is already pre-processed ▪ Therefore, no pre-processing is needed

SLIDE Note • To be successful in life, try to spend most of your time with people o Who are clean from two main diseases? ن ن • وملی دبعالمح ارشیف رح فرمت ھت مہک ،م o فرآن ی ك ک الخ مہص م2 ی سںیت میہ (1) :دبالكم اورم (2) دب امگینم ▪ دب الكم س امسجین امیبر يی ں دیپا وہیت میہ ▪ دب امگمین س رواحین امیبر يی ںدیپا وہیت میہ • اندوونں) دب الكم اور دب امگین( ک الخہص ےہم ن o اع س رج می ن • ااتسد رتحمم فرمت یہ ہک ،م ن o اہلل ی ك اع س رجی پ ےتلم میہ

Step 04: Represent Sample Data in Machine Understandable Format

SLIDE Step 4: Represent Sample Data in Machine Understandable Format • Feature-based Classification Algorithms (implemented in Scikit-learn) can understand data in o Attribute-Value Pair ▪ Values of Attributes / Features must be Numeric

SLIDE Feature Extraction • Features are already extracted o Therefore, we will skip the Feature Extraction Step

SLIDE Important Note • In this Lecture, we are using Scikit-learn implementation of the Support Vector Classifier Machine Learning Algorithm • Scikit-learn can only understand Data in Numerical Representation o Therefore, we will need to Convert the Categorical Values to Numerical Values

SLIDE Transforming Sample Data in Machine Understandable Format • In our Sample Data o Input is Numeric o Output is Categorical • Considering Input (Sepal_Length, Sepal_Width, Petal_Length, Petal_Width) and Output (Flower_Category) o Input is already in Numerical Representation • We will need to o Transform Output (Categorical) into Numerical Representation

SLIDE Converting Output into Numerical Representation • A Two-Step Process o Step 01: Define an Encoding Scheme o Step 02: Use Encoding Scheme defined in Step 01, to convert Categorical Output Values to Numeric Output Values for all instances in the Sample Data

SLIDE Converting Output into Numerical Representation Cont.… • Step 01: Define an Encoding Scheme • Encoding Scheme for Flower_Category Attribute o Iris-Setosa = 0 o Iris-Versicolor = 1 o Iris-Virginica = 2

SLIDE Converting Output into Numerical Representation Cont.… • Step 02: Use Encoding Scheme defined in Step 01, to convert Categorical Output Values to Numeric Output Values for all instances in the Sample Data • The Table below shows Sample Data after Encoding Categorical Output Values to Numeric Output Values o See sample-data-encoded-output.csv File in Supporting Material

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 0 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3.0 4.4 1.4 1 x35 6.3 3.3 4.7 1.6 1 x36 7.2 3.0 5.8 1.6 2 x37 6.1 2.8 4.0 1.3 1 x38 4.9 3.1 1.5 0.1 0 x39 5.7 3.8 1.7 0.3 0 x40 6.0 2.2 4.0 1.0 1 x41 5.4 3.4 1.5 0.4 0 x42 7.7 2.8 6.7 2.0 2 x43 5.9 3.2 4.8 1.8 1 x44 6.8 2.8 4.8 1.4 1 x45 5.0 3.4 1.6 0.4 0 x46 6.1 2.8 4.7 1.2 1 x47 4.8 3.4 1.9 0.2 0 x48 5.8 2.7 4.1 1.0 1 x49 7.4 2.8 6.1 1.9 2 x50 5.4 3.7 1.5 0.2 0 x51 7.9 3.8 6.4 2.0 2 x52 5.0 2.0 3.5 1.0 1 x53 5.6 2.8 4.9 2.0 2 x54 5.6 3.0 4.5 1.5 1 x55 5.1 3.7 1.5 0.4 0 x56 6.5 3.2 5.1 2.0 2 x57 5.8 2.8 5.1 2.4 2 x58 4.8 3.1 1.6 0.2 0 x59 6.0 2.9 4.5 1.5 1 x60 6.7 2.5 5.8 1.8 2 x61 5.4 3.4 1.7 0.2 0 x62 5.2 3.4 1.4 0.2 0 x63 6.9 3.1 4.9 1.5 1 x64 5.5 2.3 4.0 1.3 1 x65 4.7 3.2 1.3 0.2 0 x66 4.6 3.4 1.4 0.3 0 x67 7.1 3.0 5.9 2.1 2 x68 4.7 3.2 1.6 0.2 0 x69 5.6 2.9 3.6 1.3 1 x70 6.4 2.9 4.3 1.3 1 x71 5.4 3.9 1.7 0.4 0 x72 5.5 2.4 3.7 1.0 1 x73 5.2 4.1 1.5 0.1 0 x74 6.5 3.0 5.8 2.2 2 x75 6.1 2.9 4.7 1.4 1 x76 6.2 2.2 4.5 1.5 1 x77 5.8 3.0 1.2 0.2 0 x78 5.9 3.0 4.2 1.5 1 x79 5.7 2.8 4.5 1.3 1 x80 5.7 4.4 1.5 0.4 0 x81 5.2 2.7 3.9 1.4 1 x82 6.2 2.8 4.8 1.8 2 x83 6.4 2.7 5.3 1.9 2 x84 6.1 3.0 4.9 1.8 2 x85 5.0 3.0 1.6 0.2 0 x86 4.8 3.0 1.4 0.1 0 x87 6.6 2.9 4.6 1.3 1 x88 6.3 2.9 5.6 1.8 2 x89 6.7 3.0 5.0 1.7 1 x90 6.5 3.0 5.5 1.8 2 x91 6.8 3.0 5.5 2.1 2 x92 7.6 3.0 6.6 2.1 2 x93 5.8 2.7 3.9 1.2 1 x94 4.3 3.0 1.1 0.1 0 x95 6.0 2.2 5.0 1.5 2 x96 4.9 3.0 1.4 0.2 0 x97 4.4 2.9 1.4 0.2 0 x98 5.8 2.7 5.1 1.9 2 x99 7.2 3.2 6.0 1.8 2 x100 6.3 2.5 4.9 1.5 1

SLIDE Note Output is transformed into Numeric ,(ادمحلہلل) Alhamdulillah • Representation.

SLIDE Hoooooooorrrrrrrrrraaaaaaaaayyyyyyyyyyy! • We have successfully converted our Sample Data into Numerical Representation.

SLIDE Recap – Original Sample Data

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 Iris-Versicolor x2 5.7 2.5 5.0 2.0 Iris-Virginica x3 7.7 3.8 6.7 2.2 Iris-Virginica x4 5.4 3.9 1.3 0.4 Iris-Setosa x5 7.3 2.9 6.3 1.8 Iris-Virginica x6 5.5 2.4 3.8 1.1 Iris-Versicolor x7 7.2 3.6 6.1 2.5 Iris-Virginica x8 6.4 3.2 4.5 1.5 Iris-Versicolor x9 5.1 3.8 1.5 0.3 Iris-Setosa x10 6.5 2.8 4.6 1.5 Iris-Versicolor x11 6.9 3.2 5.7 2.3 Iris-Virginica x12 6.4 3.2 5.3 2.3 Iris-Virginica x13 5.0 3.6 1.4 0.2 Iris-Setosa x14 5.2 4.1 1.5 0.1 Iris-Setosa x15 5.2 3.5 1.5 0.2 Iris-Setosa x16 5.0 3.4 1.5 0.2 Iris-Setosa x17 6.4 2.8 5.6 2.2 Iris-Virginica x18 4.8 3.4 1.6 0.2 Iris-Setosa x19 6.3 2.8 5.1 1.5 Iris-Virginica x20 5.7 2.6 3.5 1.0 Iris-Versicolor x21 6.4 2.8 5.6 2.1 Iris-Virginica x22 5.1 3.5 1.4 0.3 Iris-Setosa x23 6.0 2.7 5.1 1.6 Iris-Versicolor x24 6.3 2.7 4.9 1.8 Iris-Virginica x25 4.9 2.5 4.5 1.7 Iris-Virginica x26 5.1 3.5 1.4 0.2 Iris-Setosa x27 5.1 3.3 1.7 0.5 Iris-Setosa x28 4.6 3.6 1.0 0.2 Iris-Setosa x29 4.9 2.4 3.3 1.0 Iris-Versicolor x30 5.6 2.5 3.9 1.1 Iris-Versicolor x31 6.7 3.3 5.7 2.1 Iris-Virginica x32 7.7 2.6 6.9 2.3 Iris-Virginica x33 4.6 3.1 1.5 0.2 Iris-Setosa x34 6.6 3.0 4.4 1.4 Iris-Versicolor x35 6.3 3.3 4.7 1.6 Iris-Versicolor x36 7.2 3.0 5.8 1.6 Iris-Virginica x37 6.1 2.8 4.0 1.3 Iris-Versicolor x38 4.9 3.1 1.5 0.1 Iris-Setosa x39 5.7 3.8 1.7 0.3 Iris-Setosa x40 6.0 2.2 4.0 1.0 Iris-Versicolor x41 5.4 3.4 1.5 0.4 Iris-Setosa x42 7.7 2.8 6.7 2.0 Iris-Virginica x43 5.9 3.2 4.8 1.8 Iris-Versicolor x44 6.8 2.8 4.8 1.4 Iris-Versicolor x45 5.0 3.4 1.6 0.4 Iris-Setosa x46 6.1 2.8 4.7 1.2 Iris-Versicolor x47 4.8 3.4 1.9 0.2 Iris-Setosa x48 5.8 2.7 4.1 1.0 Iris-Versicolor x49 7.4 2.8 6.1 1.9 Iris-Virginica x50 5.4 3.7 1.5 0.2 Iris-Setosa x51 7.9 3.8 6.4 2.0 Iris-Virginica x52 5.0 2.0 3.5 1.0 Iris-Versicolor x53 5.6 2.8 4.9 2.0 Iris-Virginica x54 5.6 3.0 4.5 1.5 Iris-Versicolor x55 5.1 3.7 1.5 0.4 Iris-Setosa x56 6.5 3.2 5.1 2.0 Iris-Virginica x57 5.8 2.8 5.1 2.4 Iris-Virginica x58 4.8 3.1 1.6 0.2 Iris-Setosa x59 6.0 2.9 4.5 1.5 Iris-Versicolor x60 6.7 2.5 5.8 1.8 Iris-Virginica x61 5.4 3.4 1.7 0.2 Iris-Setosa x62 5.2 3.4 1.4 0.2 Iris-Setosa x63 6.9 3.1 4.9 1.5 Iris-Versicolor x64 5.5 2.3 4.0 1.3 Iris-Versicolor x65 4.7 3.2 1.3 0.2 Iris-Setosa x66 4.6 3.4 1.4 0.3 Iris-Setosa x67 7.1 3.0 5.9 2.1 Iris-Virginica x68 4.7 3.2 1.6 0.2 Iris-Setosa x69 5.6 2.9 3.6 1.3 Iris-Versicolor x70 6.4 2.9 4.3 1.3 Iris-Versicolor x71 5.4 3.9 1.7 0.4 Iris-Setosa x72 5.5 2.4 3.7 1.0 Iris-Versicolor x73 5.2 4.1 1.5 0.1 Iris-Setosa x74 6.5 3.0 5.8 2.2 Iris-Virginica x75 6.1 2.9 4.7 1.4 Iris-Versicolor x76 6.2 2.2 4.5 1.5 Iris-Versicolor x77 5.8 3.0 1.2 0.2 Iris-Setosa x78 5.9 3.0 4.2 1.5 Iris-Versicolor x79 5.7 2.8 4.5 1.3 Iris-Versicolor x80 5.7 4.4 1.5 0.4 Iris-Setosa x81 5.2 2.7 3.9 1.4 Iris-Versicolor x82 6.2 2.8 4.8 1.8 Iris-Virginica x83 6.4 2.7 5.3 1.9 Iris-Virginica x84 6.1 3.0 4.9 1.8 Iris-Virginica x85 5.0 3.0 1.6 0.2 Iris-Setosa x86 4.8 3.0 1.4 0.1 Iris-Setosa x87 6.6 2.9 4.6 1.3 Iris-Versicolor x88 6.3 2.9 5.6 1.8 Iris-Virginica x89 6.7 3.0 5.0 1.7 Iris-Versicolor x90 6.5 3.0 5.5 1.8 Iris-Virginica x91 6.8 3.0 5.5 2.1 Iris-Virginica x92 7.6 3.0 6.6 2.1 Iris-Virginica x93 5.8 2.7 3.9 1.2 Iris-Versicolor x94 4.3 3.0 1.1 0.1 Iris-Setosa sx95 6.0 2.2 5.0 1.5 Iris-Virginica x96 4.9 3.0 1.4 0.2 Iris-Setosa x97 4.4 2.9 1.4 0.2 Iris-Setosa x98 5.8 2.7 5.1 1.9 Iris-Virginica x99 7.2 3.2 6.0 1.8 Iris-Virginica x100 6.3 2.5 4.9 1.5 Iris-Versicolor

SLIDE Recap - Sample Data in Numerical Representation

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 0 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3.0 4.4 1.4 1 x35 6.3 3.3 4.7 1.6 1 x36 7.2 3.0 5.8 1.6 2 x37 6.1 2.8 4.0 1.3 1 x38 4.9 3.1 1.5 0.1 0 x39 5.7 3.8 1.7 0.3 0 x40 6.0 2.2 4.0 1.0 1 x41 5.4 3.4 1.5 0.4 0 x42 7.7 2.8 6.7 2.0 2 x43 5.9 3.2 4.8 1.8 1 x44 6.8 2.8 4.8 1.4 1 x45 5.0 3.4 1.6 0.4 0 x46 6.1 2.8 4.7 1.2 1 x47 4.8 3.4 1.9 0.2 0 x48 5.8 2.7 4.1 1.0 1 x49 7.4 2.8 6.1 1.9 2 x50 5.4 3.7 1.5 0.2 0 x51 7.9 3.8 6.4 2.0 2 x52 5.0 2.0 3.5 1.0 1 x53 5.6 2.8 4.9 2.0 2 x54 5.6 3.0 4.5 1.5 1 x55 5.1 3.7 1.5 0.4 0 x56 6.5 3.2 5.1 2.0 2 x57 5.8 2.8 5.1 2.4 2 x58 4.8 3.1 1.6 0.2 0 x59 6.0 2.9 4.5 1.5 1 x60 6.7 2.5 5.8 1.8 2 x61 5.4 3.4 1.7 0.2 0 x62 5.2 3.4 1.4 0.2 0 x63 6.9 3.1 4.9 1.5 1 x64 5.5 2.3 4.0 1.3 1 x65 4.7 3.2 1.3 0.2 0 x66 4.6 3.4 1.4 0.3 0 x67 7.1 3.0 5.9 2.1 2 x68 4.7 3.2 1.6 0.2 0 x69 5.6 2.9 3.6 1.3 1 x70 6.4 2.9 4.3 1.3 1 x71 5.4 3.9 1.7 0.4 0 x72 5.5 2.4 3.7 1.0 1 x73 5.2 4.1 1.5 0.1 0 x74 6.5 3.0 5.8 2.2 2 x75 6.1 2.9 4.7 1.4 1 x76 6.2 2.2 4.5 1.5 1 x77 5.8 3.0 1.2 0.2 0 x78 5.9 3.0 4.2 1.5 1 x79 5.7 2.8 4.5 1.3 1 x80 5.7 4.4 1.5 0.4 0 x81 5.2 2.7 3.9 1.4 1 x82 6.2 2.8 4.8 1.8 2 x83 6.4 2.7 5.3 1.9 2 x84 6.1 3.0 4.9 1.8 2 x85 5.0 3.0 1.6 0.2 0 x86 4.8 3.0 1.4 0.1 0 x87 6.6 2.9 4.6 1.3 1 x88 6.3 2.9 5.6 1.8 2 x89 6.7 3.0 5.0 1.7 1 x90 6.5 3.0 5.5 1.8 2 x91 6.8 3.0 5.5 2.1 2 x92 7.6 3.0 6.6 2.1 2 x93 5.8 2.7 3.9 1.2 1 x94 4.3 3.0 1.1 0.1 0 x95 6.0 2.2 5.0 1.5 2 x96 4.9 3.0 1.4 0.2 0 x97 4.4 2.9 1.4 0.2 0 x98 5.8 2.7 5.1 1.9 2 x99 7.2 3.2 6.0 1.8 2 x100 6.3 2.5 4.9 1.5 1

Step 05: Select Suitable Machine Learning Algorithms

SLIDE Step 05: Select Suitable Machine Learning Algorithms • Previous students have shown that Good Starting Points for Classification Problems are o Random Forest Classifier o Support Vector Classifier o Naïve Bayes o Gradient Boosting Classifier

SLIDE Lecture Focus • In Sha Allah, in this Lecture, we will use

Support Vector Classifier

It’s Inspirational Quotes Time

Hadith No 01 Book Name: Muntakhab Ahadith, Page Number: 596

Hadith No 02 Reference: Book Name: Muntakhab Ahadith, Page Number: 598

Hadith No 03 Reference: Book Name: Muntakhab Ahadith, Page Number: 603

Hadith No 04 Reference: Book Name: Muntakhab Ahadith, Page Number: 602

Step 06: Split Sample Data into K-Folds

SLIDE Step 6: Split Sample Data into K-Folds • We Split the Sample Data using o K-Fold Cross-Validation Approach • Question o How many Folds will we have considering our Sample Data of 100 instances? • Answer o Each Fold must have at least 30 instances ▪ Value of K = 100 / 30 = 3.33 ▪ Value of K = 3 o We will apply 3-Fold Cross-Validation

SLIDE Step 6: Split Sample Data into K-Folds • Splitting Sample Data into 3-Folds o Fold 01 = 1 – 34 (total 34 instances) o Fold 02 = 35 – 67 (total 33 instances) o Fold 03 = 68 – 100 (total 33 instances)

SLIDE Step 6: Split Sample Data into K-Folds • The Table below shows the instances in Fold 01 o Instances from 1 to 34 In Sample Data

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 1 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3.0 4.4 1.4 1

SLIDE Step 6: Split Sample Data into K-Folds • The Table below shows the instances in Fold 02 o Instances from 35 to 67 In Sample Data

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x35 6.3 3.3 4.7 1.6 1 x36 7.2 3.0 5.8 1.6 2 x37 6.1 2.8 4.0 1.3 1 x38 4.9 3.1 1.5 0.1 0 x39 5.7 3.8 1.7 0.3 0 x40 6.0 2.2 4.0 1.0 1 x41 5.4 3.4 1.5 0.4 0 x42 7.7 2.8 6.7 2.0 2 x43 5.9 3.2 4.8 1.8 1 x44 6.8 2.8 4.8 1.4 1 x45 5.0 3.4 1.6 0.4 0 x46 6.1 2.8 4.7 1.2 1 x47 4.8 3.4 1.9 0.2 0 x48 5.8 2.7 4.1 1.0 1 x49 7.4 2.8 6.1 1.9 2 x50 5.4 3.7 1.5 0.2 0 x51 7.9 3.8 6.4 2.0 2 x52 5.0 2.0 3.5 1.0 1 x53 5.6 2.8 4.9 2.0 2 x54 5.6 3.0 4.5 1.5 1 x55 5.1 3.7 1.5 0.4 0 x56 6.5 3.2 5.1 2.0 2 x57 5.8 2.8 5.1 2.4 2 x58 4.8 3.1 1.6 0.2 0 x59 6.0 2.9 4.5 1.5 1 x60 6.7 2.5 5.8 1.8 2 x61 5.4 3.4 1.7 0.2 0 x62 5.2 3.4 1.4 0.2 0 x63 6.9 3.1 4.9 1.5 1 x64 5.5 2.3 4.0 1.3 1 x65 4.7 3.2 1.3 0.2 0 x66 4.6 3.4 1.4 0.3 0 x67 7.1 3.0 5.9 2.1 2

SLIDE Step 6: Split Sample Data into K-Folds • The Table below shows the instances in Fold 03 o Instance from 68 to 100 In Sample Data Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x68 4.7 3.2 1.6 0.2 0 x69 5.6 2.9 3.6 1.3 1 x70 6.4 2.9 4.3 1.3 1 x71 5.4 3.9 1.7 0.4 0 x72 5.5 2.4 3.7 1.0 1 x73 5.2 4.1 1.5 0.1 0 x74 6.5 3.0 5.8 2.2 2 x75 6.1 2.9 4.7 1.4 1 x76 6.2 2.2 4.5 1.5 1 x77 5.8 3.0 1.2 0.2 0 x78 5.9 3.0 4.2 1.5 1 x79 5.7 2.8 4.5 1.3 1 x80 5.7 4.4 1.5 0.4 0 x81 5.2 2.7 3.9 1.4 1 x82 6.2 2.8 4.8 1.8 2 x83 6.4 2.7 5.3 1.9 2 x84 6.1 3.0 4.9 1.8 2 x85 5.0 3.0 1.6 0.2 0 x86 4.8 3.0 1.4 0.1 0 x87 6.6 2.9 4.6 1.3 1 x88 6.3 2.9 5.6 1.8 2 x89 6.7 3.0 5.0 1.7 1 x90 6.5 3.0 5.5 1.8 2 x91 6.8 3.0 5.5 2.1 2 x92 7.6 3.0 6.6 2.1 2 x93 5.8 2.7 3.9 1.2 1 x94 4.3 3.0 1.1 0.1 0 x95 6.0 2.2 5.0 1.5 2 x96 4.9 3.0 1.4 0.2 0 x97 4.4 2.9 1.4 0.2 0 x98 5.8 2.7 5.1 1.9 2 x99 7.2 3.2 6.0 1.8 2 x100 6.3 2.5 4.9 1.5 1

Step 07: Select Suitable Evaluation Measure(s)

SLIDE Step 07: Select Suitable Evaluation Measure(s) • I will use the Accuracy Evaluation Measure to evaluate the performance of the Model • Accuracy o Accuracy is defined as the proportion of correctly classified Test Instances

푵풖풎풃풆풓 풐풇 푪풐풓풓풆풄풕풍풚 푪풍풂풔풔풊풇풊풆풅 푻풆풔풕 푰풏풔풕풂풏풄풆풔 푨풄풄풖풓풂풄풚 = 푻풐풕풂풍 푵풖풎풃풆풓 풐풇 푻풆풔풕 푰풏풔풕풂풏풄풆풔

• Note o Error = 1 – Accuracy

Step 08: Execute First Two Phases of Machine Learning Cycle

SLIDE Step 8: Execute First Two Phases of Machine Learning Cycle • Recall the Equation

푫풂풕풂 = 푴풐풅풆풍 + 푬풓풓풐풓

• Training Phase o Use Training Data to build the Model • Testing Phase o Use Testing Data to evaluate the performance of the Model • Note that we aim to o Learn an Input-Output Function

SLIDE General Settings - Learning Input-Output Function • Recall – Our goal is to o Learn an Input-Output Function

SLIDE Training Phase

Training Phase 6.7 3.1 4.4 1.4 1 5.7 2.5 5.0 2.0 2 7.7 3.8 6.7 2.2 2 5.4 3.9 1.3 0.4 0 7.3 2.9 6.3 1.8 2 5.5 2.4 3.8 1.1 1 7.2 3.6 6.1 2.5 2 6.4 3.2 4.5 1.5 1 5.1 3.8 1.5 0.3 0 6.5 2.8 4.6 1.5 1 Set of Training Examples (D ) Learner h, Where h ≈ f

h1, h2, h3,.., hn Hypothesis Space (H)

SLIDE Testing Phase • Apply Model on the Testing Data

Testing Phas 6.3 3.3 4.7 1.6 7.2 3.0 5.8 1.6 6.1 2.8 4.0 1.3 Predictions 4.9 3.1 1.5 0.1 Model (h) 5.7 3.8 1.7 0.3 Set of Testing Examples (D )

SLIDE Important Note • In this Lecture, we are using o K-Fold Cross-Validation Approach • In Sha Allah, in the next Slides, I will show o How to Train / Test Support Vector Machine Algorithms using K- Fold Cross-Validation Approach?

SLIDE Applying 3-Fold Cross-Validation Approach • The Figure below shows how we will apply 3-Fold Cross-Validation Approach on our Sample Data o For details on K-Fold Cross-Validation Approach ▪ See Lecture – Evaluating Hypothesis (Model) ▪ URL: https://ilmoirfan.com/machine-learning/

Iteration No. Fold 1 Fold 2 Fold 3 Iteration # 1 Test Iteration # 2 Test Iteration # 3 Test

SLIDE Steps - Applying 3-Fold Cross-Validation Approach • Splitting Sample Data into K-equal Folds (here K = 3) o Fold 01 = 1 – 34 (total 34 instances) o Fold 02 = 35 – 67 (total 33 instances) o Fold 03 = 68 – 100 (total 33 instances)

• Step 2: Use one of the Folds (kth fold) as the Test Set and union of remaining Folds (k – 1 Folds) as Training Set • Step 3: Calculate the Accuracy of Model (h) • Step 4: Repeat Steps 2 and 3, to choose Train Sets and Test Sets from different Folds, and calculate Accuracy K-times • Step 5: Calculate Average Accuracy

퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟏ + 퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟐ + 퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟑ 푨풗풆풓풂품풆 푨풄풄풖풓풂풄풚 = ퟑ

• Where Accuracy-01, Accuracy-02, and Accuracy-03 represent Accuracy Scores obtained in Iteration 01, Iteration 02, and Iteration 03 respectively

It’s Jokes Time

Joke No 01

ڈا رٹک ےن م ضی ک ومیم ری و ا ش رک ےک وپ اھچ اتب رو یہمت چک ي ید آ ر ہ ےہ؟ ن م ضی: رص ف ویب ی ک یم ي ی د ےہ ۔ ے ڈ ا رٹک : سس چک اف ر ٹیم وہ ایگ کیل و ا تر س یہن ایگ ۔۔م

Joke No 02

ے کش ےہ ڑل ایک ں فر سی ین ک اج ون ر نیل یہن اج ںیت و رن کنپ رلک ک كب ا او ر ل ی گ ی رلک ک اگ م ےئ ہک س آیتم

Joke No 03

مں ےن ےٹیب ک م اہمترے ااحتم ن رش و ع وہ ےن و ا لیہ اور ت وہ ہک ر ا ت د ن وس ت ر تہ وہ

ي یلد کی رک ہک :م

ےٹیب ےن وج ا ب د ي ی :ام م رٹس اص سج ےن ہک ھت ہک ت اس و قیہ یس وہ تکس وہ س س جم

دن رات ا يت رک دو

Iteration 01

SLIDE 1st Iteration of 3-Fold Cross-Validation Approach • In Sha Allah, in the next Slides, I will execute the 1st Iteration of 3-Fold Cross-Validation Approach

SLIDE 1st Iteration of 3-Fold Cross-Validation Approach Cont.… • Training Data for 1st Iteration o Training Data = Fold 02 + Fold 03 = [35 - 67] + [68 - 100] = 33 + 33 = 66 instances • Testing Data for 1st Iteration o Testing Data = Fold 01 = [1 – 34] = 34 instances

SLIDE 1st Iteration of 3-Fold Cross-Validation Approach Cont.… • Training Data for 1st Iteration o Total Instances = 66 (Instances form 35 – 100 in Sample Data) ▪ Iris-Setosa = 22 ▪ Iris-Versicolor = 22 ▪ Iris-Virginica = 22 • Testing Data for 1st Iteration o Total Instances = 34 (Instances form 1 – 34 in Sample Data) ▪ Iris-Setosa = 12 ▪ Iris-Versicolor = 11 ▪ Iris-Virginica = 11

SLIDE Training Data • The following Table shows the Training Data for 1st Iteration o See training-data-iteration-01.csv File in Supporting Material

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.3 3.3 4.7 1.6 1 x2 7.9 3.8 6.4 2.0 2 x3 6.3 2.7 4.9 1.8 2 x4 6.2 2.8 4.8 1.8 2 x5 6.4 2.8 5.6 2.2 2 x6 6.1 2.8 4.7 1.2 1 x7 4.8 3.4 1.6 0.2 0 x8 5.9 3.2 4.8 1.8 1 x9 7.6 3.0 6.6 2.1 2 x10 5.6 2.5 3.9 1.1 1 x11 5.7 3.8 1.7 0.3 0 x12 7.7 2.6 6.9 2.3 2 x13 4.7 3.2 1.3 0.2 0 x14 5.1 3.8 1.5 0.3 0 x15 6.0 2.9 4.5 1.5 1 x16 6.0 2.7 5.1 1.6 1 x17 6.5 2.8 4.6 1.5 1 x18 5.8 2.7 4.1 1.0 1 x19 6.7 3.0 5.0 1.7 1 x20 6.0 2.2 5.0 1.5 2 x21 6.5 3.0 5.8 2.2 2 x22 5.0 3.6 1.4 0.2 0 x23 7.2 3.2 6.0 1.8 2 x24 5.1 3.3 1.7 0.5 0 x25 7.1 3.0 5.9 2.1 2 x26 6.5 3.2 5.1 2.0 2 x27 6.3 2.5 4.9 1.5 1 x28 4.9 3.1 1.5 0.1 0 x29 5.0 2.0 3.5 1.0 1 x30 5.7 2.8 4.5 1.3 1 x31 6.1 3.0 4.9 1.8 2 x32 7.7 2.8 6.7 2.0 2 x33 5.7 2.6 3.5 1.0 1 x34 5.2 3.5 1.5 0.2 0 x35 5.0 3.0 1.6 0.2 0 x36 6.1 2.8 4.0 1.3 1 x37 5.9 3.0 4.2 1.5 1 x38 4.9 3.0 1.4 0.2 0 x39 6.3 2.8 5.1 1.5 2 x40 7.2 3.6 6.1 2.5 2 x41 7.7 3.8 6.7 2.2 2 x42 4.8 3.4 1.9 0.2 0 x43 6.4 2.7 5.3 1.9 2 x44 5.4 3.4 1.7 0.2 0 x45 6.7 2.5 5.8 1.8 2 x46 4.3 3.0 1.1 0.1 0 x47 6.9 3.1 4.9 1.5 1 x48 6.4 3.2 4.5 1.5 1 x49 5.4 3.4 1.5 0.4 0 x50 4.9 2.4 3.3 1.0 1 x51 6.6 2.9 4.6 1.3 1 x52 5.6 2.8 4.9 2.0 2 x53 5.6 3.0 4.5 1.5 1 x54 4.9 2.5 4.5 1.7 2 x55 6.2 2.2 4.5 1.5 1 x56 5.2 2.7 3.9 1.4 1 x57 5.5 2.4 3.7 1.0 1 x58 5.4 3.9 1.7 0.4 0 x59 4.7 3.2 1.6 0.2 0 x60 4.6 3.4 1.4 0.3 0 x61 7.4 2.8 6.1 1.9 2 x62 5.4 3.9 1.3 0.4 0 x63 5.2 4.1 1.5 0.1 0 x64 6.4 2.9 4.3 1.3 1 x65 5.4 3.7 1.5 0.2 0 x66 6.7 3.3 5.7 2.1 2

SLIDE Testing Data • The following Table shows the Testing Data for 1st Iteration o See testing-data-iteration-01.csv File in Supporting Material

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 1 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3.0 4.4 1.4 1

SLIDE Training Phase – 1st Iteration

Training Phase - 1st Iteration

6.3 3.3 4.7 1.6 1 7.9 3.8 6.4 2.0 2 6.3 2.7 4.9 1.8 2 6.2 2.8 4.8 1.8 2 6.4 2.8 5.6 2.2 2 6.1 2.8 4.7 1.2 1 4.8 3.4 1.6 0.2 0 5.9 3.2 4.8 1.8 1 7.6 3.0 6.6 2.1 2 5.6 2.5 3.9 1.1 1 Learner h, Where h ≈ f Set of Training Examples ( D )

h1, h2,

h3,….., hn

Hypothesis Space (H) SLIDE Summary – Training Phase (1st Iteration) • In the Training Phase (1st Iteration) the Learner (Support Vector Classifier) returned a o Trained Model (we call it svc_trained_model_01)

SLIDE Testing Phase– 1st Iteration Apply svc_trained_model_01 (Trained Model) on the Testing Data (1st Iteration)

Testing Phase – 1st Iteration 6.7 3.1 4.4 1.4 5.7 2.5 5.0 2.0 Predictions 7.7 3.8 6.7 2.2 Model (h) 5.4 3.9 1.3 0.4 7.3 2.9 6.3 1.8 Set of Testing Examples ( D )

SLIDE Testing Phase – 1st Iteration Cont.… • The following Table shows the Predictions Returned by the svc_trained_model_01 (Trained Model (h)) for Testing Phase – 1st Iteration o See model-predictions-iteration-01.csv File in Supporting Material

Instance Input Output No. Flower_ Sepal_ Sepal_ Petal_ Petal_ Predictions Length Width Length Width Category

x1 6.7 3.1 4.4 1.4 1 1 x2 5.7 2.5 5.0 2.0 2 2 x3 7.7 3.8 6.7 2.2 2 2 x4 5.4 3.9 1.3 0.4 0 0 x5 7.3 2.9 6.3 1.8 2 2 x6 5.5 2.4 3.8 1.1 1 1 x7 7.2 3.6 6.1 2.5 2 2 x8 6.4 3.2 4.5 1.5 1 1 x9 5.1 3.8 1.5 0.3 0 0 x10 6.5 2.8 4.6 1.5 1 1 x11 6.9 3.2 5.7 2.3 2 2 x12 6.4 3.2 5.3 2.3 2 2 x13 5.0 3.6 1.4 0.2 0 0 x14 5.2 4.1 1.5 0.1 0 0 x15 5.2 3.5 1.5 0.2 0 0 x16 5.0 3.4 1.5 0.2 0 0 x17 6.4 2.8 5.6 2.2 2 2 x18 4.8 3.4 1.6 0.2 0 0 x19 6.3 2.8 5.1 1.5 2 1 x20 5.7 2.6 3.5 1.0 1 1 x21 6.4 2.8 5.6 2.1 2 2 x22 5.1 3.5 1.4 0.3 0 0 x23 6.0 2.7 5.1 1.6 1 2 x24 6.3 2.7 4.9 1.8 2 1 x25 4.9 2.5 4.5 1.7 2 1 x26 5.1 3.5 1.4 0.2 0 0 x27 5.1 3.3 1.7 0.5 0 0 x28 4.6 3.6 1.0 0.2 0 0 x29 4.9 2.4 3.3 1.0 1 1 x30 5.6 2.5 3.9 1.1 1 1 x31 6.7 3.3 5.7 2.1 2 2 x32 7.7 2.6 6.9 2.3 2 2 x33 4.6 3.1 1.5 0.2 0 0 x34 6.6 3.0 4.4 1.4 1 1

SLIDE Testing Phase – 1st Iteration Cont.… • Calculating Accuracy for 1st Iteration o To calculate Accuracy, we will compare ▪ Actual Values with Predicted Values • Note o To explain calculations more clearly, I have converted Numerical Predicted Values to Categorical Predicted Values

Insta Input Output nce Sepal_ Sepal_ Petal_ Petal_ Actual Predicted Score No. Length Width Length Width Values Values x1 6.7 3.1 4.4 1.4 Iris-Versicolor Iris-Versicolor 1 x2 5.7 2.5 5.0 2.0 Iris-Virginica Iris-Virginica 1 x3 7.7 3.8 6.7 2.2 Iris-Virginica Iris-Virginica 1 x4 5.4 3.9 1.3 0.4 Iris-Setosa Iris-Setosa 1 x5 7.3 2.9 6.3 1.8 Iris-Virginica Iris-Virginica 1 x6 5.5 2.4 3.8 1.1 Iris-Versicolor Iris-Versicolor 1 x7 7.2 3.6 6.1 2.5 Iris-Virginica Iris-Virginica 1 x8 6.4 3.2 4.5 1.5 Iris-Versicolor Iris-Versicolor 1 x9 5.1 3.8 1.5 0.3 Iris-Setosa Iris-Setosa 1 x10 6.5 2.8 4.6 1.5 Iris-Versicolor Iris-Versicolor 1 x11 6.9 3.2 5.7 2.3 Iris-Virginica Iris-Virginica 1 x12 6.4 3.2 5.3 2.3 Iris-Virginica Iris-Virginica 1 x13 5.0 3.6 1.4 0.2 Iris-Setosa Iris-Setosa 1 x14 5.2 4.1 1.5 0.1 Iris-Setosa Iris-Setosa 1 x15 5.2 3.5 1.5 0.2 Iris-Setosa Iris-Setosa 1 x16 5.0 3.4 1.5 0.2 Iris-Setosa Iris-Setosa 1 x17 6.4 2.8 5.6 2.2 Iris-Virginica Iris-Virginica 1 x18 4.8 3.4 1.6 0.2 Iris-Setosa Iris-Setosa 1 x19 6.3 2.8 5.1 1.5 Iris-Virginica Iris-Versicolor 0 x20 5.7 2.6 3.5 1.0 Iris-Versicolor Iris-Versicolor 1 x21 6.4 2.8 5.6 2.1 Iris-Virginica Iris-Virginica 1 x22 5.1 3.5 1.4 0.3 Iris-Setosa Iris-Setosa 1 x23 6.0 2.7 5.1 1.6 Iris-Versicolor Iris-Virginica 0 x24 6.3 2.7 4.9 1.8 Iris-Virginica Iris-Versicolor 0 x25 4.9 2.5 4.5 1.7 Iris-Virginica Iris-Versicolor 0 x26 5.1 3.5 1.4 0.2 Iris-Setosa Iris-Setosa 1 x27 5.1 3.3 1.7 0.5 Iris-Setosa Iris-Setosa 1 x28 4.6 3.6 1.0 0.2 Iris-Setosa Iris-Setosa 1 x29 4.9 2.4 3.3 1.0 Iris-Versicolor Iris-Versicolor 1 x30 5.6 2.5 3.9 1.1 Iris-Versicolor Iris-Versicolor 1 x31 6.7 3.3 5.7 2.1 Iris-Virginica Iris-Virginica 1 x32 7.7 2.6 6.9 2.3 Iris-Virginica Iris-Virginica 1 x33 4.6 3.1 1.5 0.2 Iris-Setosa Iris-Setosa 1 x34 6.6 3.0 4.4 1.4 Iris-Versicolor Iris-Versicolor 1

ퟑퟎ 푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟏ) = =0.88 ퟑퟒ

SLIDE 1st Iteration Summary – Training / Testing Phases • In the 1st Iteration, we obtained the following Accuracy score by applying svc_trained_model_01 (Trained Model (h)) on Testing Data (of 1st Iteration)

푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟏ) = ퟎ. ퟖퟖ

Iteration 02

SLIDE 2nd Iteration of 3-Fold Cross-Validation Approach • In Sha Allah, in the next Slides, I will execute the 2nd Iteration of 3-Fold Cross-Validation Approach

SLIDE 2nd Iteration of 3-Fold Cross-Validation Approach Cont… • Training Data for 2nd Iteration o Training Data = Fold 01 + Fold 03 = [1 - 34] + [68 - 100] = 34 + 33 = 67 instances • Testing Data for 2nd Iteration o Testing Data = Fold 01 = [35 – 67] = 33 instances

SLIDE 2nd Iteration of 3-Fold Cross-Validation Approach Cont.… o Total Instances = 66 (Instances form 1 –34, 68 –100 in Sample Data) ▪ Iris-Setosa = 22 ▪ Iris-Versicolor = 22 ▪ Iris-Virginica = 22 • Testing Data for 2nd Iteration o Total Instances = 34 (Instances form 35 – 67 in Sample Data) ▪ Iris-Setosa = 12 ▪ Iris-Versicolor = 11 ▪ Iris-Virginica = 11

SLIDE Training Data • The following Table shows the Training Data for 2nd Iteration o See training-data-iteration-02.csv File in Supporting Material.

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 0 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3 4.4 1.4 1 x35 4.7 3.2 1.6 0.2 0 x36 5.6 2.9 3.6 1.3 1 x37 6.4 2.9 4.3 1.3 1 x38 5.4 3.9 1.7 0.4 0 x39 5.5 2.4 3.7 1.0 1 x40 5.2 4.1 1.5 0.1 0 x41 6.5 3.0 5.8 2.2 2 x42 6.1 2.9 4.7 1.4 1 x43 6.2 2.2 4.5 1.5 1 x44 5.8 3.0 1.2 0.2 0 x45 5.9 3.0 4.2 1.5 1 x46 5.7 2.8 4.5 1.3 1 x47 5.7 4.4 1.5 0.4 0 x48 5.2 2.7 3.9 1.4 1 x49 6.2 2.8 4.8 1.8 2 x50 6.4 2.7 5.3 1.9 2 x51 6.1 3.0 4.9 1.8 2 x52 5.0 3.0 1.6 0.2 0 x53 4.8 3.0 1.4 0.1 0 x54 6.6 2.9 4.6 1.3 1 x55 6.3 2.9 5.6 1.8 2 x56 6.7 3.0 5.0 1.7 1 x57 6.5 3.0 5.5 1.8 2 x58 6.8 3.0 5.5 2.1 2 x59 7.6 3.0 6.6 2.1 2 x60 5.8 2.7 3.9 1.2 1 x61 4.3 3.0 1.1 0.1 0 x62 6.0 2.2 5.0 1.5 2 x63 4.9 3.0 1.4 0.2 0 x64 4.4 2.9 1.4 0.2 0 x65 5.8 2.7 5.1 1.9 2 x66 7.2 3.2 6.0 1.8 2 x67 6.3 2.5 4.9 1.5 1

SLIDE Testing Data – 2nd Iteration • The following Table shows the Testing Data for 2nd Iteration o See testing-data-iteration-02.csv File in Supporting Material

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.3 3.3 4.7 1.6 1 x2 7.2 3.0 5.8 1.6 2 x3 6.1 2.8 4.0 1.3 1 x4 4.9 3.1 1.5 0.1 0 x5 5.7 3.8 1.7 0.3 0 x6 6.0 2.2 4.0 1.0 1 x7 5.4 3.4 1.5 0.4 0 x8 7.7 2.8 6.7 2.0 2 x9 5.9 3.2 4.8 1.8 1 x10 6.8 2.8 4.8 1.4 1 x11 5.0 3.4 1.6 0.4 0 x12 6.1 2.8 4.7 1.2 1 x13 4.8 3.4 1.9 0.2 0 x14 5.8 2.7 4.1 1.0 1 x15 7.4 2.8 6.1 1.9 2 x16 5.4 3.7 1.5 0.2 0 x17 7.9 3.8 6.4 2.0 2 x18 5.0 2.0 3.5 1.0 1 x19 5.6 2.8 4.9 2.0 2 x20 5.6 3.0 4.5 1.5 1 x21 5.1 3.7 1.5 0.4 0 x22 6.5 3.2 5.1 2.0 2 x23 5.8 2.8 5.1 2.4 2 x24 4.8 3.1 1.6 0.2 0 x25 6.0 2.9 4.5 1.5 1 x26 6.7 2.5 5.8 1.8 2 x27 5.4 3.4 1.7 0.2 0 x28 5.2 3.4 1.4 0.2 0 x29 6.9 3.1 4.9 1.5 1 x30 5.5 2.3 4.0 1.3 1 x31 4.7 3.2 1.3 0.2 0 x32 4.6 3.4 1.4 0.3 0 x33 7.1 3.0 5.9 2.1 2

SLIDE Training Phase – 2nd Iteration

Training Phase - 2nd Iteration 6.7 3.1 4.4 1.4 1 5.7 2.5 5.0 2.0 2 7.7 3.8 6.7 2.2 2 5.4 3.9 1.3 0.4 0 7.3 2.9 6.3 1.8 2 5.5 2.4 3.8 1.1 1 7.2 3.6 6.1 2.5 2 6.4 3.2 4.5 1.5 1 5.1 3.8 1.5 0.3 0 6.5 2.8 4.6 1.5 1 Set of Training Examples ( D ) Learner h, Where h ≈ f

h1, h2,

h3,….., hn

Hypothesis Space (H)

SLIDE Summary – Training Phase (2nd Iteration) • In the Training Phase (2nd Iteration) the Learner (Support Vector Classifier) returned a o Trained Model (we call it svc_trained_model_02)

SLIDE Training Phase (1st Iteration) vs Training Phase (2nd Iteration) • Trained Model returned by the Learner (Support Vector Classifier) in 1st Iteration o svc_trained_model_01 • Trained Model returned by the Learner (Support Vector Classifier) in 2nd Iteration o svc_trained_model_02 • Question o Why we have two different Trained Models in 1st and 2nd Iterations? • Answer o The Training Data used to Train Support Vector Classifier in 1st and 2nd Iterations are different ▪ Therefore, Models trained on different Training Data will be different

SLIDE Testing Phase– 2nd Iteration • Apply svc_trained_model_02 (Trained Model (h)) on the Testing Data (2nd Iteration)

Testing Phase – 2nd Iteration 6.3 3.3 4.7 1.6 7.2 3.0 5.8 1.6 Model (h) Predictions 6.1 2.8 4.0 1.3 4.9 3.1 1.5 0.1 5.7 3.8 1.7 0.3 Set of Testing Examples ( D )

SLIDE Testing Phase – 2nd Iteration Cont… • The following Table shows the Predictions Returned by the svc_trained_model_02 (Trained Model (h)) for Testing Phase – 2nd Iteration o See model-predictions-iteration-02.csv File in Supporting Material

Input Output Instance Flower_ No. Sepal_ Sepal_ Petal_ Petal_ Predictions Length Width Length Width Category

x1 6.3 3.3 4.7 1.6 1 1 x2 7.2 3.0 5.8 1.6 2 2 x3 6.1 2.8 4.0 1.3 1 1 x4 4.9 3.1 1.5 0.1 0 0 x5 5.7 3.8 1.7 0.3 0 0 x6 6.0 2.2 4.0 1.0 1 1 x7 5.4 3.4 1.5 0.4 0 0 x8 7.7 2.8 6.7 2.0 2 2 x9 5.9 3.2 4.8 1.8 1 2 x10 6.8 2.8 4.8 1.4 1 1 x11 5.0 3.4 1.6 0.4 0 0 x12 6.1 2.8 4.7 1.2 1 1 x13 4.8 3.4 1.9 0.2 0 0 x14 5.8 2.7 4.1 1.0 1 1 x15 7.4 2.8 6.1 1.9 2 2 x16 5.4 3.7 1.5 0.2 0 0 x17 7.9 3.8 6.4 2.0 2 2 x18 5.0 2.0 3.5 1.0 1 1 x19 5.6 2.8 4.9 2.0 2 2 x20 5.6 3.0 4.5 1.5 1 1 x21 5.1 3.7 1.5 0.4 0 0 x22 6.5 3.2 5.1 2.0 2 2 x23 5.8 2.8 5.1 2.4 2 2 x24 4.8 3.1 1.6 0.2 0 0 x25 6.0 2.9 4.5 1.5 1 1 x26 6.7 2.5 5.8 1.8 2 2 x27 5.4 3.4 1.7 0.2 0 0 x28 5.2 3.4 1.4 0.2 0 0 x29 6.9 3.1 4.9 1.5 1 1 x30 5.5 2.3 4.0 1.3 1 1 x31 4.7 3.2 1.3 0.2 0 0 x32 4.6 3.4 1.4 0.3 0 0 x33 7.1 3.0 5.9 2.1 2 2

SLIDE Testing Phase – 2nd Iteration Cont… • Calculating Accuracy for 2nd Iteration o To calculate Accuracy, we will compare ▪ Actual Values with Predicted Values • Note o To explain calculations more clearly, I have converted Numeric Predicted Values to Categorical Predicted Values

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Actual Predicted Length Width Length Width Values Values Score x1 6.3 3.3 4.7 1.6 Iris-Versicolor Iris-Versicolor 1 x2 7.2 3.0 5.8 1.6 Iris-Virginica Iris-Virginica 1 x3 6.1 2.8 4.0 1.3 Iris-Versicolor Iris-Versicolor 1 x4 4.9 3.1 1.5 0.1 Iris-Setosa Iris-Setosa 1 x5 5.7 3.8 1.7 0.3 Iris-Setosa Iris-Setosa 1 x6 6.0 2.2 4.0 1.0 Iris-Versicolor Iris-Versicolor 1 x7 5.4 3.4 1.5 0.4 Iris-Setosa Iris-Setosa 1 x8 7.7 2.8 6.7 2.0 Iris-Virginica Iris-Virginica 1 x9 5.9 3.2 4.8 1.8 Iris-Versicolor Iris-Virginica 0 x10 6.8 2.8 4.8 1.4 Iris-Versicolor Iris-Versicolor 1 x11 5.0 3.4 1.6 0.4 Iris-Setosa Iris-Setosa 1 x12 6.1 2.8 4.7 1.2 Iris-Versicolor Iris-Versicolor 1 x13 4.8 3.4 1.9 0.2 Iris-Setosa Iris-Setosa 1 x14 5.8 2.7 4.1 1.0 Iris-Versicolor Iris-Versicolor 1 x15 7.4 2.8 6.1 1.9 Iris-Virginica Iris-Virginica 1 x16 5.4 3.7 1.5 0.2 Iris-Setosa Iris-Setosa 1 x17 7.9 3.8 6.4 2.0 Iris-Virginica Iris-Virginica 1 x18 5.0 2.0 3.5 1.0 Iris-Versicolor Iris-Versicolor 1 x19 5.6 2.8 4.9 2.0 Iris-Virginica Iris-Virginica 1 x20 5.6 3.0 4.5 1.5 Iris-Versicolor Iris-Versicolor 1 x21 5.1 3.7 1.5 0.4 Iris-Setosa Iris-Setosa 1 x22 6.5 3.2 5.1 2.0 Iris-Virginica Iris-Virginica 1 x23 5.8 2.8 5.1 2.4 Iris-Virginica Iris-Virginica 1 x24 4.8 3.1 1.6 0.2 Iris-Setosa Iris-Setosa 1 x25 6.0 2.9 4.5 1.5 Iris-Versicolor Iris-Versicolor 1 x26 6.7 2.5 5.8 1.8 Iris-Virginica Iris-Virginica 1 x27 5.4 3.4 1.7 0.2 Iris-Setosa Iris-Setosa 1 x28 5.2 3.4 1.4 0.2 Iris-Setosa Iris-Setosa 1 x29 6.9 3.1 4.9 1.5 Iris-Versicolor Iris-Versicolor 1 x30 5.5 2.3 4.0 1.3 Iris-Versicolor Iris-Versicolor 1 x31 4.7 3.2 1.3 0.2 Iris-Setosa Iris-Setosa 1 x32 4.6 3.4 1.4 0.3 Iris-Setosa Iris-Setosa 1 x33 7.1 3.0 5.9 2.1 Iris-Virginica Iris-Virginica 1

ퟑퟐ 푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟐ) = = ퟎ. ퟗퟕ ퟑퟑ

SLIDE 2nd Iteration Summary – Training / Testing Phase • In the 2nd Iteration, we obtained the following Accuracy score by applying svc_trained_model_02 (Trained Model (h)) on Testing Data (of 2nd Iteration)

푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟐ) = ퟎ. ퟗퟕ

It’s Poetry Time

Ghazal No 01

ن ہیوسچ رک ہک مغ ےک جر يیدا ر آےئگ ہ وخ ا ب ےنچیب رسْ سیز ا ر آ ےئگ ا ب د ل ںیم وحہلص ن تکس سیز و روں ںیمم ا ب ہک اقم ےلب ہپ یم ے ي ی ر آےئگ ے آواز دے ہک پھچ گ ہر سیر ز دن گ م ہ اسی اس دہ دل ھتہک ر ہ سیر آےئگ ہ جک ادا رچ ا غ ہک س سج یھب وہ ا یلچ م

یک ں ک وھچ ڑ رک رسْ دوی ا ر آ مےئگ ن ادمح فر ا ز

Ghazal No 01

ہلعشھتلج اھجب وہں وہ ا یئ ھجمن دو م ںیمبککاج کچ وہ ں دص ایئ ھجمن دو م وج ز ہر یپ کچ وہ ں یہمت ےن ھجمد ي یم ابت ت زدن گ ک داع یئ ھجمن دو م م

ہییھب ستر ا رک م ےہ الس م ےہ سج ایھب م ہیرسخ وا ْن رہش ابق یئ ھجم ندو م اسینوہ ھبک ہک ٹلپ رک ن آ وکسں م ہر سیر دور اج ہک دص اْیئ ھجمن دوم ن بک جم ک ا رتع ا ْف تبحم ن ھت فر ا زم م بکںیمےن ہی ہک ھت زس ا یئ ھجمن دوم ن م مادمح فر ا زم

Iteration 03

SLIDE 3rd Iteration of 3-Fold Cross-Validation Approach • In Sha Allah, in the next Slides, I will execute the 3rd Iteration of 3-Fold Cross-Validation Approach

SLIDE 3rd Iteration of 3-Fold Cross-Validation Approach cont.… • Training Data for 3rd Iteration o Training Data = Fold 01 + Fold 02 = [1 - 34] + [35 - 67] = 34 + 33 = 67 instances • Testing Data for 3rd Iteration o Testing Data = Fold 03 = [68 – 100] = 33 instances

SLIDE 3rd Iteration of 3-Fold Cross-Validation Approach Cont… • Training Data for 3rd Iteration o Total Instances = 66 (Instances form 1 – 67 in Sample Data) ▪ Iris-Setosa = 22 ▪ Iris-Versicolor = 22 ▪ Iris-Virginica = 22 • Testing Data for 3rd Iteration o Total Instances = 34 (Instances form 68 – 100 in Sample Data) ▪ Iris-Setosa = 12 ▪ Iris-Versicolor = 11 ▪ Iris-Virginica = 11

SLIDE Training Data • The following Table shows the Training Data for 3rd Iteration o See training-data-iteration-03.csv File in Supporting Material

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 6.7 3.1 4.4 1.4 1 x2 5.7 2.5 5.0 2.0 2 x3 7.7 3.8 6.7 2.2 2 x4 5.4 3.9 1.3 0.4 0 x5 7.3 2.9 6.3 1.8 2 x6 5.5 2.4 3.8 1.1 1 x7 7.2 3.6 6.1 2.5 2 x8 6.4 3.2 4.5 1.5 1 x9 5.1 3.8 1.5 0.3 0 x10 6.5 2.8 4.6 1.5 1 x11 6.9 3.2 5.7 2.3 2 x12 6.4 3.2 5.3 2.3 2 x13 5.0 3.6 1.4 0.2 0 x14 5.2 4.1 1.5 0.1 0 x15 5.2 3.5 1.5 0.2 0 x16 5.0 3.4 1.5 0.2 0 x17 6.4 2.8 5.6 2.2 2 x18 4.8 3.4 1.6 0.2 0 x19 6.3 2.8 5.1 1.5 2 x20 5.7 2.6 3.5 1.0 1 x21 6.4 2.8 5.6 2.1 2 x22 5.1 3.5 1.4 0.3 0 x23 6.0 2.7 5.1 1.6 1 x24 6.3 2.7 4.9 1.8 2 x25 4.9 2.5 4.5 1.7 2 x26 5.1 3.5 1.4 0.2 0 x27 5.1 3.3 1.7 0.5 0 x28 4.6 3.6 1.0 0.2 0 x29 4.9 2.4 3.3 1.0 0 x30 5.6 2.5 3.9 1.1 1 x31 6.7 3.3 5.7 2.1 2 x32 7.7 2.6 6.9 2.3 2 x33 4.6 3.1 1.5 0.2 0 x34 6.6 3.0 4.4 1.4 1 x35 6.3 3.3 4.7 1.6 1 x36 7.2 3.0 5.8 1.6 2 x37 6.1 2.8 4.0 1.3 1 x38 4.9 3.1 1.5 0.1 0 x39 5.7 3.8 1.7 0.3 0 x40 6.0 2.2 4.0 1.0 1 x41 5.4 3.4 1.5 0.4 0 x42 7.7 2.8 6.7 2.0 2 x43 5.9 3.2 4.8 1.8 1 x44 6.8 2.8 4.8 1.4 1 x45 5.0 3.4 1.6 0.4 0 x46 6.1 2.8 4.7 1.2 1 x47 4.8 3.4 1.9 0.2 0 x48 5.8 2.7 4.1 1.0 1 x49 7.4 2.8 6.1 1.9 2 x50 5.4 3.7 1.5 0.2 0 x51 7.9 3.8 6.4 2.0 2 x52 5.0 2.0 3.5 1.0 1 x53 5.6 2.8 4.9 2.0 2 x54 5.6 3.0 4.5 1.5 1 x55 5.1 3.7 1.5 0.4 0 x56 6.5 3.2 5.1 2.0 2 x57 5.8 2.8 5.1 2.4 2 x58 4.8 3.1 1.6 0.2 0 x59 6.0 2.9 4.5 1.5 1 x60 6.7 2.5 5.8 1.8 2 x61 5.4 3.4 1.7 0.2 0 x62 5.2 3.4 1.4 0.2 0 x63 6.9 3.1 4.9 1.5 1 x64 5.5 2.3 4.0 1.3 1 x65 4.7 3.2 1.3 0.2 0 x66 4.6 3.4 1.4 0.3 0 x67 7.1 3.0 5.9 2.1 2

SLIDE Testing Data • The following Table shows the Testing Data for 3rd Iteration o See testing-data-iteration-03.csv File in Supporting Material.

Input Output Instance No. Sepal_ Sepal_ Petal_ Petal_ Flower_ Length Width Length Width Category x1 4.7 3.2 1.6 0.2 0 x2 5.6 2.9 3.6 1.3 1 x3 6.4 2.9 4.3 1.3 1 x4 5.4 3.9 1.7 0.4 0 x5 5.5 2.4 3.7 1.0 1 x6 5.2 4.1 1.5 0.1 0 x7 6.5 3.0 5.8 2.2 2 x8 6.1 2.9 4.7 1.4 1 x9 6.2 2.2 4.5 1.5 1 x10 5.8 3.0 1.2 0.2 0 x11 5.9 3.0 4.2 1.5 1 x12 5.7 2.8 4.5 1.3 1 x13 5.7 4.4 1.5 0.4 0 x14 5.2 2.7 3.9 1.4 1 x15 6.2 2.8 4.8 1.8 2 x16 6.4 2.7 5.3 1.9 2 x17 6.1 3.0 4.9 1.8 2 x18 5.0 3.0 1.6 0.2 0 x19 4.8 3.0 1.4 0.1 0 x20 6.6 2.9 4.6 1.3 1 x21 6.3 2.9 5.6 1.8 2 x22 6.7 3.0 5.0 1.7 1 x23 6.5 3.0 5.5 1.8 2 x24 6.8 3.0 5.5 2.1 2 x25 7.6 3.0 6.6 2.1 2 x26 5.8 2.7 3.9 1.2 1 x27 4.3 3.0 1.1 0.1 0 x28 6.0 2.2 5.0 1.5 2 x29 4.9 3.0 1.4 0.2 0 x30 4.4 2.9 1.4 0.2 0 x31 5.8 2.7 5.1 1.9 2 x32 7.2 3.2 6.0 1.8 2 x33 6.3 2.5 4.9 1.5 1

SLIDE Training Phase – 3rd Iteration

Training Phase - 3rd Iteration

6.7 3.1 4.4 1.4 1 5.7 2.5 5.0 2.0 2 7.7 3.8 6.7 2.2 2 5.4 3.9 1.3 0.4 0 7.3 2.9 6.3 1.8 2 5.5 2.4 3.8 1.1 1 7.2 3.6 6.1 2.5 2 6.4 3.2 4.5 1.5 1 5.1 3.8 1.5 0.3 0 6.5 2.8 4.6 1.5 1 Learner h, Where h ≈ f Set of Training Examples (D )

h1, h2,

h3,….., hn

Hypothesis Space (H)

SLIDE Summary – Training Phase (3rd Iteration) • In the Training Phase (3rd Iteration) the Learner (Support Vector Classifier) returned a o Trained Model (we call it svc_trained_model_03)

SLIDE Training Phase (1st Iteration) vs Training Phase (2nd Iteration) vs Training Phase (3rd Iteration) • Trained Model returned by the Learner (Support Vector Classifier) in 1st Iteration o svc_trained_model_01 • Trained Model returned by the Learner (Support Vector Classifier) in 2nd Iteration o svc_trained_model_02 • Trained Model returned by the Learner (Support Vector Classifier) in 3rd Iteration o svc_trained_model_03 • Question o Why we have three different Trained Models in 1st and 2nd and 3rd Iterations? • Answer o The Training Data used to Train Support Vector Classifier in 1st and 2nd and 3rd Iterations are different ▪ Therefore, Models trained on different Training Data will be different

SLIDE Testing Phase– 3rd Iteration • Apply svc_trained_model_03 (Trained Model (h)) on the Testing Data (3rd Iteration)

Testing Phase – 3rd Iteration 4.7 3.2 1.6 0.2 5.6 2.9 3.6 1.3 Model (h) Predictions 6.4 2.9 4.3 1.3 5.4 3.9 1.7 0.4 5.5 2.4 3.7 1 Set of Testing Examples ( D )

SLIDE Testing Phase – 3rd Iteration Cont… • The following Table shows the Predictions Returned by svc_trained_model_03 (Trained Model (h)) for Testing Phase – 3rd Iteration o See model-predictions-iteration-03.csv File in Supporting Material

s Output Instance Flower_ No. Sepal_ Sepal_ Petal_ Petal_ Predictions Length Width Length Width Category

x1 4.7 3.2 1.6 0.2 0 0 x2 5.6 2.9 3.6 1.3 1 1 x3 6.4 2.9 4.3 1.3 1 1 x4 5.4 3.9 1.7 0.4 0 0 x5 5.5 2.4 3.7 1.0 1 1 x6 5.2 4.1 1.5 0.1 0 0 x7 6.5 3.0 5.8 2.2 2 2 x8 6.1 2.9 4.7 1.4 1 1 x9 6.2 2.2 4.5 1.5 1 1 x10 5.8 3.0 1.2 0.2 0 0 x11 5.9 3.0 4.2 1.5 1 1 x12 5.7 2.8 4.5 1.3 1 1 x13 5.7 4.4 1.5 0.4 0 0 x14 5.2 2.7 3.9 1.4 1 1 x15 6.2 2.8 4.8 1.8 2 1 x16 6.4 2.7 5.3 1.9 2 2 x17 6.1 3.0 4.9 1.8 2 1 x18 5.0 3.0 1.6 0.2 0 0 x19 4.8 3.0 1.4 0.1 0 0 x20 6.6 2.9 4.6 1.3 1 1 x21 6.3 2.9 5.6 1.8 2 2 x22 6.7 3.0 5.0 1.7 1 1 x23 6.5 3.0 5.5 1.8 2 2 x24 6.8 3.0 5.5 2.1 2 2 x25 7.6 3.0 6.6 2.1 2 2 x26 5.8 2.7 3.9 1.2 1 1 x27 4.3 3.0 1.1 0.1 0 0 x28 6.0 2.2 5.0 1.5 2 1 x29 4.9 3.0 1.4 0.2 0 0 x30 4.4 2.9 1.4 0.2 0 0 x31 5.8 2.7 5.1 1.9 2 2 x32 7.2 3.2 6.0 1.8 2 2 x33 6.3 2.5 4.9 1.5 1 1

SLIDE Testing Phase – 3rd Iteration cont.… • Calculating Accuracy for 3rd Iteration o To calculate Accuracy, we will compare ▪ Actual Values with Predicted Values • Note o To explain calculations more clearly, I have converted Numerical Predicted Values to Categorical Predicted Values

Instance Input Output No. Sepal_ Sepal_ Petal_ Petal_ Actual Predicted Length Width Length Width Values Values Score x1 4.7 3.2 1.6 0.2 Iris-Setosa Iris-Setosa 1 x2 5.6 2.9 3.6 1.3 Iris-Versicolor Iris-Versicolor 1 x3 6.4 2.9 4.3 1.3 Iris-Versicolor Iris-Versicolor 1 x4 5.4 3.9 1.7 0.4 Iris-Setosa Iris-Setosa 1 x5 5.5 2.4 3.7 1.0 Iris-Versicolor Iris-Versicolor 1 x6 5.2 4.1 1.5 0.1 Iris-Setosa Iris-Setosa 1 x7 6.5 3.0 5.8 2.2 Iris-Virginica Iris-Virginica 1 x8 6.1 2.9 4.7 1.4 Iris-Versicolor Iris-Versicolor 1 x9 6.2 2.2 4.5 1.5 Iris-Versicolor Iris-Versicolor 1 x10 5.8 3.0 1.2 0.2 Iris-Setosa Iris-Setosa 1 x11 5.9 3.0 4.2 1.5 Iris-Versicolor Iris-Versicolor 1 x12 5.7 2.8 4.5 1.3 Iris-Versicolor Iris-Versicolor 1 x13 5.7 4.4 1.5 0.4 Iris-Setosa Iris-Setosa 1 x14 5.2 2.7 3.9 1.4 Iris-Versicolor Iris-Versicolor 1 x15 6.2 2.8 4.8 1.8 Iris-Virginica Iris-Versicolor 0 x16 6.4 2.7 5.3 1.9 Iris-Virginica Iris-Virginica 1 x17 6.1 3.0 4.9 1.8 Iris-Virginica Iris-Versicolor 0 x18 5.0 3.0 1.6 0.2 Iris-Setosa Iris-Setosa 1 x19 4.8 3.0 1.4 0.1 Iris-Setosa Iris-Setosa 1 x20 6.6 2.9 4.6 1.3 Iris-Versicolor Iris-Versicolor 1 x21 6.3 2.9 5.6 1.8 Iris-Virginica Iris-Virginica 1 x22 6.7 3.0 5.0 1.7 Iris-Versicolor Iris-Versicolor 1 x23 6.5 3.0 5.5 1.8 Iris-Virginica Iris-Virginica 1 x24 6.8 3.0 5.5 2.1 Iris-Virginica Iris-Virginica 1 x25 7.6 3.0 6.6 2.1 Iris-Virginica Iris-Virginica 1 x26 5.8 2.7 3.9 1.2 Iris-Versicolor Iris-Versicolor 1 x27 4.3 3.0 1.1 0.1 Iris-Setosa Iris-Setosa 1 x28 6.0 2.2 5.0 1.5 Iris-Virginica Iris-Versicolor 0 x29 4.9 3.0 1.4 0.2 Iris-Setosa Iris-Setosa 1 x30 4.4 2.9 1.4 0.2 Iris-Setosa Iris-Setosa 1 x31 5.8 2.7 5.1 1.9 Iris-Virginica Iris-Virginica 1 x32 7.2 3.2 6.0 1.8 Iris-Virginica Iris-Virginica 1 x33 6.3 2.5 4.9 1.5 Iris-Versicolor Iris-Versicolor 1

ퟑퟎ 푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟑ) = = ퟎ. ퟗퟏ ퟑퟑ

SLIDE 3rd Iteration Summary – Training / Testing Phase • In the 3rd Iteration, we obtained the following Accuracy score by applying svc_trained_model_03 (Trained Model (h)) on Testing Data (3rd Iteration)

푨풄풄풖풓풂풄풚 (푰풕풆풓풂풕풊풐풏ퟎퟑ) = ퟎ. ퟗퟏ

Calculating Average Accuracy

SLIDE Average Accuracy

퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟏ + 퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟐ + 퐀퐜퐜퐮퐫퐚퐜퐲 − ퟎퟑ 푨풗풆풓풂품풆 푨풄풄풖풓풂풄풚 = ퟑ

• Where Accuracy-01, Accuracy-02, and Accuracy-03 represent Accuracy Scores obtained in Iteration 01, Iteration 02, and Iteration 03 respectively

ퟎ. ퟖퟖ + ퟎ. ퟗퟕ + ퟎ. ퟗퟏ 푨풗풆풓풂품풆 푨풄풄풖풓풂풄풚 = ퟑ

푨풗풆풓풂품풆 푨풄풄풖풓풂풄풚 = ퟎ. ퟗퟐ

Step 09: Analyze Results

SLIDE Step 9: Analyze Results • The assumption for this Example o Here, I am assuming that the Model ▪ performed well on large Test Data and we can deploy it in the real-world

SLIDE Which Trained Model Should be used in the Application Phase • Question o By applying 3-Fold Cross-Validation Approach on our Sample Data we obtained three different Trained Models ▪ svc_trained_model_01 (Accuracy = 0.88) ▪ svc_trained_model_02 (Accuracy = 0.97) ▪ svc_trained_model_03 (Accuracy = 0.91) o Which Trained Model should be used in the Application Phase? • Possible Answer 01 o Randomly select one of the three Trained Models and use it in the Application Phase • Possible Answer 02 o Select the Trained Model which has Highest Accuracy Score (i.e. Best Trained Model) among all three Trained Models and use it in the Application Phase • Possible Answer 03 o A Two-Step Process ▪ Step 01: Re-train the Learner (Support Vector Classifier) on entire Sample Data (called svc-trained-model) ▪ Step 02: Use svc-trained-model (Model (h)) in the Application Phase • Question o What Accuracy you will report to your Client / Customer? • Answer o Average Accuracy

SLIDE Which Trained Model Should be used in the Application Phase Cont… • In this Lecture, In Sha Allah, we will use the Trained Model which has Highest Accuracy Score among all three Trained Models i.e. o svc_trained_model_02

Step 10: Execute 3rd and 4th Phases of Machine Learning Cycle

SLIDE Step 10: Execute 3rd and 4th Phases of Machine Learning Cycle • Application Phase o Model is deployed in Real-world to make predictions on Real-time Data • Steps – Make Predictions on Real-time Data o Step 1: Take Input from User o Step 2: Convert User Input into Feature Vector (Exactly same as Feature Vectors of Sample Data) o Step 3: Apply Model on the Feature Vector of the unseen instance o Step 4: Return Prediction to the User

SLIDE Example – Making Predictions on Real-time Data • Step 1: Take Input from User o User Input

Please enter Sepal_Length (in cm): 3.3

Please enter Sepal_Width (in cm): 4.5

Please enter Petal_Length (in cm): 5.1

Please enter Petal_Width (in cm): 1.2

• Step 2: Convert User Input into Feature Vector (Exactly Same as the Feature Vectors of Training Data and Testing Data) o Feature Vector of Unseen Instance

<3.3, 4.5, 5.1, 1.2>

• Step 3: Apply svc_trained_model_02 (Model) on the Label Encoded Feature Vector of unseen instance o (Model (h)) is applied on: < 3.3, 4.5, 5.1, 1.2> • Step 4: Return Prediction to the User o 2 (Iris-Virginica)

SLIDE Application Phase

Application Phase

3.3 4.5 5.1 1.2 Model (h) Prediction

SLIDE Feedback Phase • A Two-Step Process • Step 1: After some time, take Feedback from o Domain Experts and Users on deployed Iris Flower Categorization System • Step 2: Make a List of Possible Improvements based on Feedback receive

Step 11: Improve Iris Flower Categorization System based on Feedback

SLIDE Step 11: Improve Iris Flower Categorization System based on Feedback • Go to Step 1 and improve the Iris Flower Categorization System based on o List of Possible Improvements made in Step 10

TODO and Your Turn

SLIDE TODO • Task o Consider the Bird Multi-class Classification Problem o The main aim is to Classify Birds according to their types (considering their living environment and habits) o Bird Dataset Link ▪ https://www.kaggle.com/zhangjuefei/birds-bones-and- living-habits o For simplicity, I have taken a Sample Data of 100 instances from the Original Bird Dataset ▪ See bird-sample-data.csv File in Supporting Material • Bird Dataset - Attributes o Bird Dataset contains following Attributes ▪ Attribute 01 - Humerus_Length ▪ Attribute 02 - Humerus_Diameter ▪ Attribute 03 - Ulna_Length ▪ Attribute 04 - Ulna_Diameter ▪ Attribute 05 - Femur_Length ▪ Attribute 06 - Femur_Diameter ▪ Attribute 07 - Tibiotarsus_Length ▪ Attribute 08 - Tibiotarsus_Diameter ▪ Attribute 09 - Tarsometatarsus_Length ▪ Attribute 10 - Tarsometatarsus_Diameter ▪ Attribute 11 - Bird_Category • Bird Dataset – Input Attributes o Bird Dataset contains following Input Attributes ▪ Attribute 01 - Humerus_Length ▪ Attribute 02 - Humerus_Diameter ▪ Attribute 03 - Ulna_Length ▪ Attribute 04 - Ulna_Diameter ▪ Attribute 05 - Femur_Length ▪ Attribute 06 - Femur_Diameter ▪ Attribute 07 - Tibiotarsus_Length ▪ Attribute 08 - Tibiotarsus_Diameter ▪ Attribute 09 - Tarsometatarsus_Length ▪ Attribute 10 - Tarsometatarsus_Diameter • Bird Dataset – Output Attribute o Bird Dataset contains following Output Attribute ▪ Attribute 01 - Bird_Category • Possible Value 01 = Swimming-Bird • Possible Value 02 = Wading-Bird • Possible Value 03 = Terrestrial-Bird • Possible Value 04 = Raptor-Bird • Possible Value 05 = Scansorial-Bird • Possible Value 06 = Singing-Bird • Note o Your answer should be ▪ Well Justified • Questions o Follow the Steps mentioned in this Lecture and show ▪ How will you treat the Bird Multi-class Classification Problem as a Supervised Machine Learning Problem using K-Fold Cross-Validation Approach?

Stop Complaining! Stop Criticizing! Let’s Start Contributing

SLIDE A True Story • Here I am writing a true story of one of my Respected Teachers (Prof. Dr. Yaseen Iqbal Department of Physics, University of Peshawar, Pakistan)

SLIDE Story • In 1996, I was a Ph.D. student at the University of Sheffield, England. One day, I was having a walk with my friends. We saw an Old Lady picking up French Fries (potato chips) from the Foot Path. One of my friends said to the Old Lady o Mam! Why are you picking these? It is a crowded place and you may get hurt. • Old Lady replied o Gentleman! This is MY Country. If it is dirty. I feel dirty. • Remember o There is nothing like ▪ Big Contribution or ▪ Small Contribution o Contribution is Contribution • Let’s Strat Contributing from Today o To make this Beautiful World, more Beautiful

Lecture Summary

SLIDE Lecture Summary • To systematically perform any Real-world Task using a Template-based Approach, follow the following steps o Step 1: Completely and correctly understand the Real-world Task ▪ Write down two main things • Given • Task o Step 2: Understand the Input and Output of the Real-world Task ▪ Write down two main things • Input • Output o Step 3: Plan and Design a Template-based Approach to perform the Real-world Task ▪ Step 3.1: Use the Divide and Conquer Approach to break the Real-world Task into • Steps / Sub-steps / Sub-sub-steps ▪ Step 3.2: For each Step / Sub-step / Sub-sub-step • Check the Order and Flow between Steps / Sub- steps/ Sub-sub-steps • Check the Connectivity and Independence between Steps / Sub-steps / Sub-sub-steps o Step 4: Use a Five-Step Process to perform the Real-world Task ▪ Step 4.1: Plan – in Mind ▪ Step 4.2: Design – on Paper ▪ Step 4.3: Execute – at Prototype level ▪ Step 4.4: Execute – at Full Scale ▪ Step 4.5: Take Feedback from Users / Audience and Domain Expert to further improve the solution of Real-world Task o Step 5: Document each Step, when performing a Real-world Task • Iris Flower Categorization Problem – Task o Given ▪ An Iris Flower (Represented as Set of Attributes) ▪ A pre-defined Set of Labels (Iris-Setosa, Iris-Versicolor and Iris-Virginica) o Task ▪ Automatically predict whether the Category of an Iris Flower is Iris-Setosa or Iris-Versicolor or Iris-Virginica. • Iris Flower Categorization Problem – Input and Output o Input ▪ An Iris Flower o Output ▪ Iris-Setosa / Iris—versicolor / Iris-Virginica • The Problem of Iris Flower Categorization is treated as a o Supervised Machine Learning Task • The main goal of Iris Flower Categorization System is to o Learn an Input-Output Function ▪ i.e. Learn from Input to predict the Output • Learning Input-Output Function – General Settings o Input to Learner ▪ Set of Training Examples (D) ▪ Set of Hypothesis (a.k.a. Hypothesis Space (H)) o Job of Learner ▪ The main job of a Learner is to search the Hypothesis Space (H) using the Set of Training Examples (D) to find out a Hypothesis (h) from Hypothesis Space (H), which best fits the Set of Training Examples (D) o Output of Learner ▪ A Learner outputs a Hypothesis (h) from Hypothesis Space (H), which best fits the Set of Training Examples (D) • Steps to treat the Iris Flower Categorization Problem as a Classification Problem o Step 01: Decide the Learning Settings o Step 02: Obtain Sample Data o Step 03: Understand and Pre-process Sample Data o Step 04: Represent Sample Data in Machine Understandable Format o Step 05: Select Suitable Machine Learning Algorithms o Step 06: Split Sample Data into K-Folds o Step 07: Select Suitable Evaluation Measure(s) o Step 08: Execute First Two Phases of Machine Learning Cycle ▪ Training Phase ▪ Testing Phase o Step 09: Analyze Results

If (Results are Good ) Then Move to the Next Step Else Go to Step 01

o Step 10: Execute 3rd and 4th Phases of Machine Learning Cycle ▪ Application Phase ▪ Feedback Phase o Step 11: Based on Feedback ▪ Go to Step 01 and Repeat all the Steps • Alhamdulillah, in this Lecture we systematically learned (using a Template-based Approach) o How to use the Best Teaching and Learning Methodology of the World to systematically perform any Real-world Task using a Template-based Approach? o What is Iris Flower Categorization Problem? o Steps – Treatomg Iris Flower Categorization Problem as a Supervised Machine Learning Problem using K-Fold Cross Validation Approach o Start Contributing from Today

جزاك هللاُ خ ًريُا