MachineLearning-Neural Network与Logistic Regression关系

神经网络与逻辑回归的关系:
	逻辑回归就是没有隐含层的神经网络。
	两个的假设函数都是 h(x) = sigmoid(theta * x)
1.神经网络:

1.1 为什么需要神经网络
	当一个非线性分类,特征数很大时,使用逻辑回归会导致 theta 出现很多高阶项,
	计算效率下降,才能对训练集完成拟合。
	这时逻辑回归分类器就不适用了。

在这里插入图片描述

1.2 神经网络 图解:

第一列为输入层,第二列,第三列是隐含层,h(x)是输出层。
theta 的带括号的上标j,是指在神经网络的第j层到第j+1层的权重
theta 的右下标,两位数,第一位是目的地神经元,第二位是源头神经元,反过来了。

在这里插入图片描述
在这里插入图片描述

1.3 神经网络 向量化实现(Vectorized Implementation)

把各层都用向量矩阵展现:
a 就是 x
然后就是从第一层输入,经过与 theta 权重相乘,输出到下一层,不断迭代

在这里插入图片描述
在这里插入图片描述

1.4 神经网络 代价函数如图:

其实与逻辑回归主题函数相同,多了很多嵌套。

术语:
m  — 训练example的数量
K   — 最后一层(输出层)的神经元的个数,也等于分类数(分K类,K≥3)
L  — 神经网络总共的层数(包括输入层和输出层)
Θ(l)  — 第l层到第l+1层的权重矩阵
sl  — 第l层神经元的个数, 注意i从1开始计数,bias神经元的权重不算在正则项内
sl+1  — 第l+1 层神经元的个数

y(i)k  — 第i个训练exmaple的输出(长度为K个向量)的第k个分量值
(hθ(x(i)))k  — 对第i个example用神经网络预测的输出(长度为K的向量)的第k个分量值

在这里插入图片描述

2. 神经网络与逻辑回归的关系:
	theta一维的就是逻辑回归
	theta是个矩阵的能产生多个输出,在加上多层的话就是神经网络

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1 Introduction 19 1.1 What Is Learning? 19 1.2 When Do We Need Machine Learning? 21 1.3 Types of Learning 22 1.4 Relations to Other Fields 24 1.5 How to Read This Book 25 1.5.1 Possible Course Plans Based on This Book 26 1.6 Notation 27 Part I Foundations 31 2 A Gentle Start 33 2.1 A Formal Model { The Statistical Learning Framework 33 2.2 Empirical Risk Minimization 35 2.2.1 Something May Go Wrong { Overtting 35 2.3 Empirical Risk Minimization with Inductive Bias 36 2.3.1 Finite Hypothesis Classes 37 2.4 Exercises 41 3 A Formal Learning Model 43 3.1 PAC Learning 43 3.2 A More General Learning Model 44 3.2.1 Releasing the Realizability Assumption { Agnostic PAC Learning 45 3.2.2 The Scope of Learning Problems Modeled 47 3.3 Summary 49 3.4 Bibliographic Remarks 50 3.5 Exercises 50 4 Learning via Uniform Convergence 54 4.1 Uniform Convergence Is Sucient for Learnability 54 4.2 Finite Classes Are Agnostic PAC Learnable 55 Understanding Machine Learning, c 2014 by Shai Shalev-Shwartz and Shai Ben-David Published 2014 by Cambridge University Press. Personal use only. Not for distribution. Do not post. Please link to http://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning x Contents 4.3 Summary 58 4.4 Bibliographic Remarks 58 4.5 Exercises 58 5 The Bias-Complexity Tradeo 60 5.1 The No-Free-Lunch Theorem 61 5.1.1 No-Free-Lunch and Prior Knowledge 63 5.2 Error Decomposition 64 5.3 Summary 65 5.4 Bibliographic Remarks 66 5.5 Exercises 66 6 The VC-Dimension 67 6.1 Innite-Size Classes Can Be Learnable 67 6.2 The VC-Dimension 68 6.3 Examples 70 6.3.1 Threshold Functions 70 6.3.2 Intervals 71 6.3.3 Axis Aligned Rectangles 71 6.3.4 Finite Classes 72 6.3.5 VC-Dimension and the Number of Parameters 72 6.4 The Fundamental Theorem of PAC learning 72 6.5 Proof of Theorem 6.7 73 6.5.1 Sauer's Lemma and the Growth Function 73 6.5.2 Uniform Convergence for Classes of Small Eective Size 75 6.6 Summary 78 6.7 Bibliographic remarks 78 6.8 Exercises 78 7 Nonuniform Learnability 83 7.1
Book Description Machine learning is the buzzword bringing computer science and statistics together to build smart and efficient models. Using powerful algorithms and techniques offered by machine learning you can automate any analytical model. This book examines a variety of machine learning models including popular machine learning algorithms such as k-nearest neighbors, logistic regression, naive Bayes, k-means, decision trees, and artificial neural networks. It discusses data preprocessing, hyperparameter optimization, and ensemble methods. You will build systems that classify documents, recognize images, detect ads, and more. You will learn to use scikit-learn’s API to extract features from categorical variables, text and images; evaluate model performance, and develop an intuition for how to improve your model’s performance. By the end of this book, you will master all required concepts of scikit-learn to build efficient models at work to carry out advanced tasks with the practical approach. What you will learn Review fundamental concepts such as bias and variance Extract features from categorical variables, text, and images Predict the values of continuous variables using linear regression and K Nearest Neighbors Classify documents and images using logistic regression and support vector machines Create ensembles of estimators using bagging and boosting techniques Discover hidden structures in data using K-Means clustering Evaluate the performance of machine learning systems in common tasks About the Author Gavin Hackeling is a data scientist and author. He was worked on a variety of machine learning problems, including automatic speech recognition, document classification, object recognition, and semantic segmentation. An alumnus of the University of North Carolina and New York University, he lives in Brooklyn with his wife and cat. Contents Chapter 1. The Fundamentals of Machine Learning Chapter 2. Simple linear regression Chapter 3. Classification and Regression with K Nearest Neighbors Chapter 4. Feature Extraction and Preprocessing Chapter 5. From Simple Regression to Multiple Regression Chapter 6. From Linear Regression to Logistic Regression Chapter 7. Naive Bayes Chapter 8. Nonlinear Classification and Regression with Decision Trees Chapter 9. From Decision Trees to Random Forests, and other Ensemble Methods Chapter 10. The Perceptron Chapter 11. From the Perceptron to Support Vector Machines Chapter 12. From the Perceptron to Artificial Neural Networks Chapter 13. Clustering with K-Means Chapter 14. Dimensionality Reduction with Principal Component Analysis
https://www.udemy.com/deep-learning-convolutional-neural-networks-theano-tensorflow/ Deep Learning: Convolutional Neural Networks in Python Computer Vision and Data Science and Machine Learning combined! In Theano and TensorFlow Created by Lazy Programmer Inc. Last updated 5/2017 English What Will I Learn? Understand convolution Understand how convolution can be applied to audio effects Understand how convolution can be applied to image effects Implement Gaussian blur and edge detection in code Implement a simple echo effect in code Understand how convolution helps image classification Understand and explain the architecture of a convolutional neural network (CNN) Implement a convolutional neural network in Theano Implement a convolutional neural network in TensorFlow Requirements Install Python, Numpy, Scipy, Matplotlib, Scikit Learn, Theano, and TensorFlow Learn about backpropagation from Deep Learning in Python part 1 Learn about Theano and TensorFlow implementations of Neural Networks from Deep Learning part 2 Description This is the 3rd part in my Data Science and Machine Learning series on Deep Learning in Python. At this point, you already know a lot about neural networks and deep learning, including not just the basics like backpropagation, but how to improve it using modern techniques like momentum and adaptive learning rates. You’ve already written deep neural networks in Theano and TensorFlow, and you know how to run code using the GPU. This course is all about how to use deep learning for computer vision using convolutional neural networks. These are the state of the art when it comes to image classification and they beat vanilla deep networks at tasks like MNIST. In this course we are going to up the ante and look at the StreetView House Number (SVHN) dataset – which uses larger color images at various angles – so things are going to get tougher both computationally and in terms of the difficulty of the classification task. But we will show that convolutional neural networks, or CNNs, are capable of handling the challenge! Because convolution is such a central part of this type of neural network, we are going to go in-depth on this topic. It has more applications than you might imagine, such as modeling artificial organs like the pancreas and the heart. I’m going to show you how to build convolutional filters that can be applied to audio, like the echo effect, and I’m going to show you how to build filters for image effects, like the Gaussian blur and edge detection. We will also do some biology and talk about how convolutional neural networks have been inspired by the animal visual cortex. After describing the architecture of a convolutional neural network, we will jump straight into code, and I will show you how to extend the deep neural networks we built last time (in part 2) with just a few new functions to turn them into CNNs. We will then test their performance and show how convolutional neural networks written in both Theano and TensorFlow can outperform the accuracy of a plain neural network on the StreetView House Number dataset. All the materials for this course are FREE. You can download and install Python, Numpy, Scipy, Theano, and TensorFlow with simple commands shown in previous courses. This course focuses on “how to build and understand“, not just “how to use”. Anyone can learn to use an API in 15 minutes after reading some documentation. It’s not about “remembering facts”, it’s about “seeing for yourself” via experimentation. It will teach you how to visualize what’s happening in the model internally. If you want more than just a superficial look at machine learning models, this course is for you. NOTES: All the code for this course can be downloaded from my github: /lazyprogrammer/machine_learning_examples In the directory: cnn_class Make sure you always “git pull” so you have the latest version! HARD PREREQUISITES / KNOWLEDGE YOU ARE ASSUMED TO HAVE: calculus linear algebra probability Python coding: if/else, loops, lists, dicts, sets Numpy coding: matrix and vector operations, loading a CSV file Can write a feedforward neural network in Theano and TensorFlow TIPS (for getting through the course): Watch it at 2x. Take handwritten notes. This will drastically increase your ability to retain the information. Write down the equations. If you don’t, I guarantee it will just look like gibberish. Ask lots of questions on the discussion board. The more the better! Realize that most exercises will take you days or weeks to complete. Write code yourself, don’t just sit there and look at my code. USEFUL COURSE ORDERING: (The Numpy Stack in Python) Linear Regression in Python Logistic Regression in Python (Supervised Machine Learning in Python) (Bayesian Machine Learning in Python: A/B Testing) Deep Learning in Python Practical Deep Learning in Theano and TensorFlow (Supervised Machine Learning in Python 2: Ensemble Methods) Convolutional Neural Networks in Python (Easy NLP) (Cluster Analysis and Unsupervised Machine Learning) Unsupervised Deep Learning (Hidden Markov Models) Recurrent Neural Networks in Python Artificial Intelligence: Reinforcement Learning in Python Natural Language Processing with Deep Learning in Python Who is the target audience? Students and professional computer scientists Software engineers Data scientists who work on computer vision tasks Those who want to apply deep learning to images Those who want to expand their knowledge of deep learning past vanilla deep networks People who don’t know what backpropagation is or how it works should not take this course, but instead, take parts 1 and 2. People who are not comfortable with Theano and TensorFlow basics should take part 2 before taking this course.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值