0 Up votes0 Down votes

8 views12 pagesLinear Regression With Multiple Variables

Jan 24, 2018

© © All Rights Reserved

PDF, TXT or read online from Scribd

Linear Regression With Multiple Variables

© All Rights Reserved

8 views

Linear Regression With Multiple Variables

© All Rights Reserved

- The Woman Who Smashed Codes: A True Story of Love, Spies, and the Unlikely Heroine who Outwitted America's Enemies
- Steve Jobs
- NIV, Holy Bible, eBook
- NIV, Holy Bible, eBook, Red Letter Edition
- Hidden Figures Young Readers' Edition
- Cryptonomicon
- Console Wars: Sega, Nintendo, and the Battle that Defined a Generation
- Make Your Mind Up: My Guide to Finding Your Own Style, Life, and Motavation!
- The Golden Notebook: A Novel
- Alibaba: The House That Jack Ma Built
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- Autonomous: A Novel
- The 10X Rule: The Only Difference Between Success and Failure
- Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are
- Life After Google: The Fall of Big Data and the Rise of the Blockchain Economy

You are on page 1of 12

Machine Learning

Machine Learning Resources ▾

Machine Learning and Econometrics ▾

Supervised Learning Theory ▾

Overview (/machine-learning/)

Reinforcement Learning Theory ▾

Deep Learning Theory ▾

Deep Learning with TensorFlow ▾

Machine Learning with Scikit-Learn ▾

Machine Learning Projects ▾

Summary: Linear Regression with Multiple Variables.

Table of Contents

1. Multivariate Linear Regression

– 1a. Multiple Features (Variables)

– 1b. Gradient Descent for Multiple Variables

http://www.ritchieng.com/multi-variable-linear-regression/ 1/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

– 1d. Gradient Descent: Checking

– 1e. Gradient Descent: Learning Rate

– 1f. Features and Polynomial Regression

– 2a. Normal Equation

– 2b. Normal Equation Non-invertibility

I would like to give full credits to the respective authors as these are my personal python notebooks taken from

deep learning courses from Andrew Ng, Data School and Udemy :) This is a simple python notebook hosted

generously through Github Pages that is on my main personal notes repository on

https://github.com/ritchieng/ritchieng.github.io . They are meant for my personal review but I have open-source

my repository of personal notes as a lot of people found it useful.

X1, X2, X3, X4 and more

http://www.ritchieng.com/multi-variable-linear-regression/ 2/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

New hypothesis

Can reduce hypothesis to single number with a transposed theta matrix multiplied by x matrix

http://www.ritchieng.com/multi-variable-linear-regression/ 3/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

Summary

http://www.ritchieng.com/multi-variable-linear-regression/ 4/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

New Algorithm

Ensure features are on similar scale

Gradient descent will take longer to reach the global minimum when the features are not on a similar

scale

http://www.ritchieng.com/multi-variable-linear-regression/ 5/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

Mean normalization

Can you a graph

http://www.ritchieng.com/multi-variable-linear-regression/ 6/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

Alpha (Learning Rate) too small: slow convergence

http://www.ritchieng.com/multi-variable-linear-regression/ 7/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

Start with 0.001 and increase x3 each time until you reach an acceptable alpha

Ensure the features capture the pattern

http://www.ritchieng.com/multi-variable-linear-regression/ 8/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

Method to solve for theta analytically

If theta is not

http://www.ritchieng.com/multi-variable-linear-regression/ 9/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

X: m x (n + 1)

n: number of features

X_transpose: (n + 1) x m

X_transpose * X: (n + 1) x m * m x (n + 1) = (n + 1) x (n + 1)

http://www.ritchieng.com/multi-variable-linear-regression/ 10/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

theta = (n + 1) x m * m x 1 = (n + 1) x 1

http://www.ritchieng.com/multi-variable-linear-regression/ 11/12

1/21/2018 Linear Regression with Multiple Variables | Machine Learning, Deep Learning, and Computer Vision

alpha

iterations

(10,000)

> 1000

What happens if X_transpose * X is non-invertible (singular or degenerate)

Intuition of non-invertibility

Causes of non-invertibility

http://www.ritchieng.com/multi-variable-linear-regression/ 12/12

- 1-5-18 M Tech CSE Batch 2018.pdfUploaded bySangeeta
- Deep LearningUploaded byhadi645
- Data Science AcadgildUploaded bypraneet singh
- Machine learning for antennas and radar signal processingUploaded bySuryaRajitha Inp
- RegressionUploaded byturnernp
- Deep Learning (2016.09.23-00.17.14Z).epubUploaded byAndres Tuells Jansson
- Deep LearningUploaded bymmiljana95
- NEXUS BETWEEN ELECTRICITY GENERATION AND SUPPLY ON ECONOMIC GROWTH IN NIGERIAUploaded byUDECHUKWU
- cemento_4.0_ENG_baja.pdfUploaded byN
- MonicaUploaded byanon_431196468
- Econometrics Assignment HelpUploaded bystatisticshelpdesk
- Profile LinkedinUploaded byALI FARAZ ZAIDI
- Fingleton Slides Peebles2009Uploaded byavcs1
- Modelling sap flow of young apple rootstocks under various climatesUploaded byEndrit Kullaj
- When to Use Hierarchical Linear ModelingUploaded byMaría Marchiano
- Unemployment Rate 2Uploaded bySk.Ashiquer Rahman
- AdvancedBooks - Python WikiUploaded bysarvesh_mishra
- Progress ReportUploaded byteddy demissie
- Tian 2015Uploaded byNguyenHuy
- Benchmark Mata Kuliah StatistikUploaded byanaikzir
- RegressionUploaded byluispedro1985
- Reg LinealUploaded bynacho2012
- WJ_1996_01_s1Uploaded byabraham silva hernandez
- Demand Forecasting QuesterUploaded byPeter Rue
- 1536Uploaded bybepinno
- Multcomp ExamplesUploaded byTrina Miller
- Jessie Salas 2019Uploaded byJessie Salas
- ECON 10 FinalUploaded byRC Willenbrock
- w4l1 Causalmodels ANNOTATED FINALUploaded byGlennizze Galvez
- Root-Zone Salinity II. Indices for Tolerance in Agricultural CropsUploaded bylgtsoria

- The Nature of Communication Between HumansUploaded byLeonardo Pérez Pino
- The Anatomy of the Luxury Fasion BrandUploaded bySólrún Björk Guðmundsdóttir
- hemodyalisis patients..pdfUploaded byMolly Simmons
- cctc-ccs.pdfUploaded byWandi Husein
- Gated Communities Social Sustainability 10Uploaded byGabriela Souza
- 6. Five Elements of a Strategic PlanUploaded byearl58
- Marketing PhD Job Market SummaryUploaded byAnonymous RByzIBg
- Introduction to leanUploaded byMohan Prasad.M
- Paper ComputersUploaded byNidhin Mathew
- SP2017_IGBS_SyllabusUploaded bychrisrosser
- bmk sample feedback reportUploaded byapi-204405393
- ANALYTICAL METHOD DEVELOPMENT AND VALIDATION OF ACETYLCYSTEINE AND TAURINEIN TABLET DOSAGE FORM BY USING RP-HPLCUploaded byBaru Chandrasekhar Rao
- ECOP2018 Programme at a Glance 22102018Uploaded byKaryofyllis Tsiakitzis
- CELCHA2 Study GuidesUploaded byEsther
- esther1Uploaded byapi-309747727
- 3DR917Uploaded byDragomir Vasic
- 1626Uploaded byMohit Gandhi
- 1957 Transportation in the Los Angeles AreaUploaded byJason Bentley
- Amethyste Technical Summary.pdfUploaded byhuydong2507
- New Media, New Citizens Thesis 2009Uploaded byClaire Leigh
- Wartsila SP Ppt 2011 Arctic.Uploaded byUhrin Imre
- Impulse Buying BehaviorUploaded bynan7625
- IR 2-3-Steps in Research ProcessUploaded byMelita Sheela Alva
- LSSA Green Belt ISQI Sample Paper Question Booklet v1.1Uploaded byKhatija Kam
- Journal Club TemplateUploaded byAnonymous zyHbTsybDX
- Assessing Adhesion with Transdermal Delivery Systems and Topical Patches for ANDAs Draft June 2016 Generic Drugs.pdfUploaded byMarkbot1999
- ARE 213 NotesUploaded byKelly Zhang
- The Process ApproachUploaded byKerby
- Strength Analysis of Steel Concrete Composite BeamUploaded byYoshua Yang
- Application Form NestleUploaded byanggamg25

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.