日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

使用python学线性代数_最简单的神经网络简介| 使用Python的线性代数

發(fā)布時(shí)間:2023/12/1 python 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用python学线性代数_最简单的神经网络简介| 使用Python的线性代数 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

使用python學(xué)線性代數(shù)

A neural network is a powerful tool often utilized in Machine Learning because neural networks are fundamentally very mathematical. We will use our basics of Linear Algebra and NumPy to understand the foundation of Machine Learning using Neural Networks. Our article is a showcase of the application of Linear Algebra and, Python provides a wide set of libraries that help to build our motivation of using Python for machine learning.

神經(jīng)網(wǎng)絡(luò)是機(jī)器學(xué)習(xí)中經(jīng)常使用的強(qiáng)大工具,因?yàn)樯窠?jīng)網(wǎng)絡(luò)從根本上說是非常數(shù)學(xué)的。 我們將使用線性代數(shù)和NumPy的基礎(chǔ)知識(shí)來理解使用神經(jīng)網(wǎng)絡(luò)進(jìn)行機(jī)器學(xué)習(xí)的基礎(chǔ)。 我們的文章展示了線性代數(shù)的應(yīng)用,Python提供了廣泛的庫(kù),有助于建立我們使用Python進(jìn)行機(jī)器學(xué)習(xí)的動(dòng)機(jī)。

The figure is showing the simplest neural network of two input nodes and one output node.

該圖顯示了具有兩個(gè)輸入節(jié)點(diǎn)和一個(gè)輸出節(jié)點(diǎn)的最簡(jiǎn)單的神經(jīng)網(wǎng)絡(luò)。



Simplest Neural Network: 2 Input - 1 Output Node

最簡(jiǎn)單的神經(jīng)網(wǎng)絡(luò):2輸入-1輸出節(jié)點(diǎn)

Input to the neural network is X1 and X2 and their corresponding weights are w1 and w2 respectively. The output z is a tangent hyperbolic function for decision making which have input as sum of products of Input and Weight. Mathematically,

輸入到神經(jīng)網(wǎng)絡(luò)的是X 1X 2 ,它們相應(yīng)的權(quán)重分別是w 1w 2 。 輸出z是用于決策的正切雙曲函數(shù),其輸入為輸入與權(quán)重的乘積之和。 數(shù)學(xué)上

z = tanh(X1w1 + X2w2)

Where, tanh() is an tangent hyperbolic function because it is one of the most used decision making functions.

其中, tanh()是切線雙曲函數(shù),因?yàn)樗亲畛S玫臎Q策函數(shù)之一。

So for drawing this mathematical network in a python code by defining a function neural_network( X, W). Note: The tangent hyperbolic function takes input within range of 0 to 1.

因此,通過定義函數(shù)Neuro_network(X,W)以python代碼繪制此數(shù)學(xué)網(wǎng)絡(luò)。 注意:正切雙曲函數(shù)的輸入范圍為0到1。

Parameter(s):

參數(shù):

Vector X = [[X1][X2]] and W = [[w1][w2]]

Return value:

返回值:

A value ranging between 0 and 1, as a prediction of the neural network based on the inputs.

一個(gè)介于0到1之間的值,作為基于輸入的神經(jīng)網(wǎng)絡(luò)的預(yù)測(cè)。

Application:

應(yīng)用:

  • Machine Learning

    機(jī)器學(xué)習(xí)

  • Computer Vision

    計(jì)算機(jī)視覺

  • Data Analysis

    數(shù)據(jù)分析

  • Fintech

    金融科技

  • # Linear Algebra and Neural Network # Linear Algebra Learning Sequence # Simplest Neural Network for 2 input 1 output nodeimport numpy as np# Use of np.array() to define an Input Vector V = np.array([.323,.432]) print("The Vector A : ",V)# defining Weight Vector VV = np.array([.3,.63,]) print("\nThe Vector B : ",VV)# defining a neural network for predicting an # output value def neural_network(inputs, weights):wT = np.transpose(weights)elpro = wT.dot(inputs)# Tangent Hyperbolic Function for Decision Makingout = np.tanh(elpro)return outoutputi = neural_network(V,VV)# printing the expected output print("Expected Output of the given Input data and their respective Weight : ", outputi)

    Output:

    輸出:

    The Vector A : [0.323 0.432]The Vector B : [0.3 0.63] Expected Output of the given Input data and their respective Weight : 0.35316923056117167

    翻譯自: https://www.includehelp.com/python/introduction-to-simplest-neural-network.aspx

    使用python學(xué)線性代數(shù)

    總結(jié)

    以上是生活随笔為你收集整理的使用python学线性代数_最简单的神经网络简介| 使用Python的线性代数的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。