Machine Learning(李宏毅公开课笔记)-Machine Learning and Deep Learning

Machine Learning and Deep Learning

1. Functions

  1. Regression:PM2.5
  2. Classification:chess
  3. Others:structured learning

2. The procedures of finding the functions

  1. Functions with unknown parameters
  2. Define loss from training data
  3. Optimization
    1. gradient descent
      A) randomly set an initial value w
      B) compute the ∂ l / ∂ w \partial l/\partial w l/w
      C) update w iteratively

3. Models

  1. linear model
  2. sophisticated model
  1. linear curves:curves
    all piecewise linear curves = constant + sum of set (sigmoid)
    activation function:
    1.hard sigmoid: which can be represented by sum of two ReLU

    在这里插入图片描述
    2.rectified linear unit(ReLU): m a x ( 0 , w x + b ) max(0,wx+b) max(0,wx+b)
    在这里插入图片描述
    3.soft sigmoid: c 1 + e − ( w x + b ) = c ∗ s i g m o i d ( w x + b ) \cfrac{c}{1+e^{-(wx+b)}}=c*sigmoid(wx+b) 1+e(wx+b)c=csigmoid(wx+b)
    在这里插入图片描述
  1. Beyond piecewise curves
    在这里插入图片描述
    approximate continuous curve by a piecewise linear curve
    to have a good approximate, we need sufficient pieces
  1. New model: More Features
    y = b + ∑ i c i ∗ s i g m o i d ( ∑ j w i j x j + b i ) y = b + \sum_{i}{c_i * sigmoid(\sum_{j}w_{ij}x_j+b_i)} y=b+icisigmoid(jwijxj+bi)
    r i = W i X + b i , a i = s i g m o i d ( r i ) r_i = W_i X+b_i ,a_i=sigmoid(ri) ri=WiX+biai=sigmoid(ri)
    y = b + C A y = b + CA y=b+CA
    optimization of new model:
    Θ = [ W B C ] \varTheta = [W B C] Θ=[WBC]
    g r a d i e n t = ∣ ∂ L ∂ Θ 1 ∂ L ∂ Θ 2 . . . ∂ L ∂ Θ n ∣ gradient = \begin{vmatrix} \cfrac{\partial L}{\partial\varTheta_1} \\ \cfrac{\partial L}{\partial\varTheta_2} \\...\\\cfrac{\partial L}{\partial\varTheta_n} \end{vmatrix} gradient=Θ1LΘ2L...ΘnL
    g = ∇ L ( Θ 0 ) g = \nabla{L(\varTheta^0)} g=L(Θ0)
    ∣ Θ 1 1 Θ 2 1 . . . Θ n 1 ∣ = ∣ Θ 1 0 Θ 2 0 . . . Θ n 0 ∣ − η ∗ g \begin{vmatrix}\varTheta_1^1 \\ \varTheta_2^1\\...\\\varTheta_n^1 \end{vmatrix}=\begin{vmatrix} \varTheta_1^0 \\ \varTheta_2^0\\...\\\varTheta_n^0 \end{vmatrix} - \eta * g Θ11Θ21...Θn1=Θ10Θ20...Θn0ηg
  1. epoch | batch | update | iteration
    number of samples: 1000
    batch size: 10
    iterations: 100
    epoch:1

video link: https://speech.ee.ntu.edu.tw/~hylee/ml/2021-spring.html.

Through exposure to the news and social media, you are probably aware of the fact that machine learning has become one of the most exciting technologies of our time and age. Large companies, such as Google, Facebook, Apple, Amazon, and IBM, heavily invest in machine learning research and applications for good reasons. While it may seem that machine learning has become the buzzword of our time and age, it is certainly not a fad. This exciting field opens the way to new possibilities and has become indispensable to our daily lives. This is evident in talking to the voice assistant on our smartphones, recommending the right product for our customers, preventing credit card fraud, filtering out spam from our email inboxes, detecting and diagnosing medical diseases, the list goes on and on. If you want to become a machine learning practitioner, a better problem solver, or maybe even consider a career in machine learning research, then this book is for you. However, for a novice, the theoretical concepts behind machine learning can be quite overwhelming. Many practical books have been published in recent years that will help you get started in machine learning by implementing powerful learning algorithms. Getting exposed to practical code examples and working through example applications of machine learning are a great way to dive into this field. Concrete examples help illustrate the broader concepts by putting the learned material directly into action. However, remember that with great power comes great responsibility! In addition to offering a hands-on experience with machine learning using the Python programming languages and Python-based machine learning libraries, this book introduces the mathematical concepts behind machine learning algorithms, which is essential for using machine learning successfully. Thus, this book is different from a purely practical book; it is a book that discusses the necessary details regarding machine learning concepts and offers intuitive yet informative explanations of how machine learning algorithms work, how to use them, and most importantly, how to avoid the most common pitfalls. Currently, if you type "machine learning" as a search term in Google Scholar, it returns an overwhelmingly large number of publications—1,800,000. Of course, we cannot discuss the nitty-gritty of all the different algorithms and applications that have emerged in the last 60 years. However, in this book, we will embark on an exciting journey that covers all the essential topics and concepts to give you a head start in this field. If you find that your thirst for knowledge is not satisfied, this book references many useful resources that can be used to follow up on the essential breakthroughs in this field. If you have already studied machine learning theory in detail, this book will show you how to put your knowledge into practice. If you have used machine learning techniques before and want to gain more insight into how machine learning actually works, this book is for you. Don't worry if you are completely new to the machine learning field; you have even more reason to be excited. Here is a promise that machine learning will change the way you think about the problems you want to solve and will show you how to tackle them by unlocking the power of data. Before we dive deeper into the machine learning field, let's answer your most important question, "Why Python?" The answer is simple: it is powerful yet very accessible. Python has become the most popular programming language for data science because it allows us to forget about the tedious parts of programming and offers us an environment where we can quickly jot down our ideas and put concepts directly into action. We, the authors, can truly say that the study of machine learning has made us better scientists, thinkers, and problem solvers. In this book, we want to share this knowledge with you. Knowledge is gained by learning. The key is our enthusiasm, and the real mastery of skills can only be achieved by practice. The road ahead may be bumpy on occasions and some topics may be more challenging than others, but we hope that you will embrace this opportunity and focus on the reward. Remember that we are on this journey together, and throughout this book, we will add many powerful techniques to your arsenal that will help us solve even the toughest problems the data-driven way.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值