SlideShare a Scribd company logo
blem 2) [Python] Gradient descent learning in Python: a) Create class NeuralNetwork () : that
creates a single neuron with a linear activation, train it using gradient descent learning. This class
should have the following function: i. def _init_(self, learning_r): that initializes a 31 weight vector
randomly and initializes the learning rate to learning_r. Also, it creates a history variable that saves
the weights and the training cost after each epoch (i.e., iteration). ii. def sigmoid(self, x ): that takes
an input x, and applies the sigmoid function to return: (x)=1+ex1 iii. def forward_propagation(self,
inputs): that performs forward propagation by multiplying the inputs by the neuron weights, uses
sigmoid activation function and then generates the output. iv. def train(self, inputs_train,
labels_train, num_train_iterations): that performs the gradient descent learning rule for
num_train_iterations times using the inputs and labels.

More Related Content

Similar to blem 2 Python Gradient descent learning in Python a Cre.pdf

Python library
Python libraryPython library
Python library
ToniyaP1
 
Naïve Bayes.pptx
Naïve Bayes.pptxNaïve Bayes.pptx
Naïve Bayes.pptx
Dr. Amanpreet Kaur
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdf
enodani2008
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
Amazon Web Services
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
Kuntal Bhowmick
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Three
amiable_indian
 
Advanced oops concept using asp
Advanced oops concept using aspAdvanced oops concept using asp
Advanced oops concept using asp
shenbagavallijanarth
 
Matching networks for one shot learning
Matching networks for one shot learningMatching networks for one shot learning
Matching networks for one shot learning
Kazuki Fujikawa
 
Hybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskitHybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskit
Vijayananda Mohire
 
Artificial Neural Network for machine learning
Artificial Neural Network for machine learningArtificial Neural Network for machine learning
Artificial Neural Network for machine learning
2303oyxxxjdeepak
 
Python3
Python3Python3
Python3
Ruchika Sinha
 
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS Academy
 
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Thomas Fan
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.com
ledlang1
 
C sharp chap6
C sharp chap6C sharp chap6
C sharp chap6
Mukesh Tekwani
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
Ruby Shrestha
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
Kuntal Bhowmick
 
Python programming : Threads
Python programming : ThreadsPython programming : Threads
Python programming : Threads
Emertxe Information Technologies Pvt Ltd
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning Algorithms
Hichem Felouat
 
machine_learning_and_keras_tutorial_slide
machine_learning_and_keras_tutorial_slidemachine_learning_and_keras_tutorial_slide
machine_learning_and_keras_tutorial_slide
ycwu0509
 

Similar to blem 2 Python Gradient descent learning in Python a Cre.pdf (20)

Python library
Python libraryPython library
Python library
 
Naïve Bayes.pptx
Naïve Bayes.pptxNaïve Bayes.pptx
Naïve Bayes.pptx
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdf
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Three
 
Advanced oops concept using asp
Advanced oops concept using aspAdvanced oops concept using asp
Advanced oops concept using asp
 
Matching networks for one shot learning
Matching networks for one shot learningMatching networks for one shot learning
Matching networks for one shot learning
 
Hybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskitHybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskit
 
Artificial Neural Network for machine learning
Artificial Neural Network for machine learningArtificial Neural Network for machine learning
Artificial Neural Network for machine learning
 
Python3
Python3Python3
Python3
 
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
 
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.com
 
C sharp chap6
C sharp chap6C sharp chap6
C sharp chap6
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
Python programming : Threads
Python programming : ThreadsPython programming : Threads
Python programming : Threads
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning Algorithms
 
machine_learning_and_keras_tutorial_slide
machine_learning_and_keras_tutorial_slidemachine_learning_and_keras_tutorial_slide
machine_learning_and_keras_tutorial_slide
 

More from advaith20071

Briefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdfBriefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdf
advaith20071
 
Briefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdfBriefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdf
advaith20071
 
Briefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdfBriefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdf
advaith20071
 
Brief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdfBrief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdf
advaith20071
 
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdfBrezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
advaith20071
 
Breve historial del paciente La Sra J es una vctima de un.pdf
Breve historial del paciente  La Sra J es una vctima de un.pdfBreve historial del paciente  La Sra J es una vctima de un.pdf
Breve historial del paciente La Sra J es una vctima de un.pdf
advaith20071
 
Brecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdfBrecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdf
advaith20071
 
Breastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdfBreastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdf
advaith20071
 
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdfBreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
advaith20071
 
Brain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdfBrain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdf
advaith20071
 
Brain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdfBrain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdf
advaith20071
 
Brain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdfBrain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdf
advaith20071
 
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdfBoth PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
advaith20071
 
Borner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdfBorner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdf
advaith20071
 
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdfBONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
advaith20071
 
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
Bones and Bone Tissue Study Guide  Describe the gross anato.pdfBones and Bone Tissue Study Guide  Describe the gross anato.pdf
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
advaith20071
 
Bonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdfBonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdf
advaith20071
 
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
Bones and Bone Tissues Study Guide  Explain the chemical co.pdfBones and Bone Tissues Study Guide  Explain the chemical co.pdf
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
advaith20071
 
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdfBond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
advaith20071
 
Bombas Creating Socks with a purpose case study marketin.pdf
Bombas Creating Socks with a purpose case study  marketin.pdfBombas Creating Socks with a purpose case study  marketin.pdf
Bombas Creating Socks with a purpose case study marketin.pdf
advaith20071
 

More from advaith20071 (20)

Briefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdfBriefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdf
 
Briefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdfBriefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdf
 
Briefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdfBriefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdf
 
Brief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdfBrief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdf
 
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdfBrezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
 
Breve historial del paciente La Sra J es una vctima de un.pdf
Breve historial del paciente  La Sra J es una vctima de un.pdfBreve historial del paciente  La Sra J es una vctima de un.pdf
Breve historial del paciente La Sra J es una vctima de un.pdf
 
Brecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdfBrecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdf
 
Breastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdfBreastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdf
 
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdfBreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
 
Brain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdfBrain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdf
 
Brain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdfBrain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdf
 
Brain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdfBrain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdf
 
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdfBoth PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
 
Borner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdfBorner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdf
 
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdfBONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
 
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
Bones and Bone Tissue Study Guide  Describe the gross anato.pdfBones and Bone Tissue Study Guide  Describe the gross anato.pdf
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
 
Bonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdfBonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdf
 
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
Bones and Bone Tissues Study Guide  Explain the chemical co.pdfBones and Bone Tissues Study Guide  Explain the chemical co.pdf
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
 
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdfBond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
 
Bombas Creating Socks with a purpose case study marketin.pdf
Bombas Creating Socks with a purpose case study  marketin.pdfBombas Creating Socks with a purpose case study  marketin.pdf
Bombas Creating Socks with a purpose case study marketin.pdf
 

Recently uploaded

Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 

Recently uploaded (20)

Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 

blem 2 Python Gradient descent learning in Python a Cre.pdf

  • 1. blem 2) [Python] Gradient descent learning in Python: a) Create class NeuralNetwork () : that creates a single neuron with a linear activation, train it using gradient descent learning. This class should have the following function: i. def _init_(self, learning_r): that initializes a 31 weight vector randomly and initializes the learning rate to learning_r. Also, it creates a history variable that saves the weights and the training cost after each epoch (i.e., iteration). ii. def sigmoid(self, x ): that takes an input x, and applies the sigmoid function to return: (x)=1+ex1 iii. def forward_propagation(self, inputs): that performs forward propagation by multiplying the inputs by the neuron weights, uses sigmoid activation function and then generates the output. iv. def train(self, inputs_train, labels_train, num_train_iterations): that performs the gradient descent learning rule for num_train_iterations times using the inputs and labels.