Tag：linear

Time：20201127
One dimensional linear fitting The data is y = 4x + 5 plus noise result: import numpy as np from mpl_toolkits.mplot3d import Axes3D from matplotlib import pyplot as plt from torch.autograd import Variable import torch from torch import nn X = torch.unsqueeze(torch.linspace(1, 1, 100), dim=1) Y = 4*X + 5 + torch.rand(X.size()) class LinearRegression(nn.Module): def […]

Time：20201126
Recently, I listened to Mr. Zhang Jiang’s deep learning course and used Python to realize neural network prediction. I had a little knowledge of tensorflow when I did the prediction of Titanic survival rate. I heard that the pyrorch that tensorflow can do can be done, and it is more convenient and fast. I tried […]

Time：20201122
[guide]: in embedded system, it is often necessary to collect analog signals. It is inevitable to introduce interference into the signal chain of collecting analog signals. So how to filter out the interference? Today, let’s describe step by step how to design and deploy an IIR filter to your system. What is IIR filter? Infinite […]

Time：20201121
1. Objectives Fitting function $f (x) = 2x_ {1}^{3}+3x_ 2^2+4x_ 3+0.5 $ 2. Theory The principle is similar to onedimensional linear regression and multidimensional linear regression, but the frequency is higher. 3. Implementation 3.1 environment python == 3.6 torch == 1.4 3.2 construction data #This is the target weight and offset w = torch.FloatTensor([2.0, 3.0, […]

Time：20201119
Pyrorch’s linear function mainly encapsulates Blas and LAPACK, and its usage and interface are similar. The following linear functions are commonly used: function function trace Sum of diagonal elements (trace of matrix) diag Diagonal element triu/tril Upper / lower triangle of the matrix, offset can be specified mm/bmm Matrix multiplication, matrix multiplication of batch t […]

Time：20201119
In order to reduce the computational cost of neural network, ghost module is proposed to construct efficient network results. In this module, the original convolution layer is divided into two parts. Firstly, fewer convolution kernels are used to generate a small number of intrinsic feature maps, and then a simple linear change operation is used […]

Time：20201114
In theory, linear regression model can be used for both regression and classification. Solving the regression problem can be used to predict the continuous target value. But for the classification problem, this method is not suitable, because the output value of linear regression is uncertain range, which can not be well matched to some of […]

Time：20201113
Link to the original text: http://tecdat.cn/?p=5277 This paper analyzes the predictability and tradability of volatility of large S & P 500 index and spy ETF, VIX Index and vxx ETN. Although there are a lot of literatures about forecasting highfrequency fluctuations, most of them only evaluate the prediction based on statistical error. In fact, this […]

Time：20201111
Series articles： Tensorflow tutorial (first one) — linear regression Tensorflow course (first two) — polynomial regression Tensorflow tutorial (first three) — Logical Regression Tensorflow course (1) — linear model install pip3 install tensorflow introduce import tensorflow as tf Execute options with tf.compat.v1.Session() as session: session.run([…]) #Execute initialization variables session.run(init) #Feed assignment print(session.run(iMul, feed_dict={input2: [7.0], input3: […]

Time：2020117
Series articles： Tensorflow tutorial (first one) — linear regression Tensorflow course (first two) — polynomial regression Tensorflow tutorial (first three) — Logical Regression Tensorflow course (1) — linear model Univariate linear regression cost function The sum of the squares of the error between the predicted value and the real value is calculated and minimized One […]

Time：2020114
Series articles： Tensorflow tutorial (first one) — linear regression Tensorflow course (first two) — polynomial regression Tensorflow tutorial (first three) — Logical Regression Tensorflow course (1) — linear model logistic regression Logistic regression equationIt can be classified according to the change of drawingCost functionRegularization cost functionDerivation process Standard of fitting degree Accuracy: correct quantity / […]

Time：20201027
1. Definition Exponential distribution family refers to a class of distribution functions with specific forms, which are as follows:$$p (Y  / ETA) = B (y) e ^ {ETA ^ TT (y) – A (/ ETA)} = \ dfrac {B (y) e ^ {ETA ^ TT (y)}} {e ^ {a (ETA)}} begin {cases} ETA: parameter […]