Tag:linear

  • Implementation of linear fitting by Python

    Time:2020-11-27

    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 […]

  • A simple linear regression algorithm based on Python

    Time:2020-11-26

    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 […]

  • Design of IIR filter for hand to hand teaching series

    Time:2020-11-22

    [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 […]

  • Pytoch: polynomial regression

    Time:2020-11-21

    1. Objectives Fitting function $f (x) = 2x_ {1}^{3}+3x_ 2^2+4x_ 3+0.5 $ 2. Theory The principle is similar to one-dimensional 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, […]

  • Detailed explanation of common linear functions in Python

    Time:2020-11-19

    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 […]

  • Netnetp’s simple linear transformation using mobile host

    Time:2020-11-19

    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 […]

  • 4. Logical regression algorithm of machine learning

    Time:2020-11-14

    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 […]

  • Hybrid model of har-rv-j and recurrent neural network (RNN) for forecasting and trading high frequency volatility of large stock index

    Time:2020-11-13

    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 high-frequency fluctuations, most of them only evaluate the prediction based on statistical error. In fact, this […]

  • Tensorflow course (1) — linear model

    Time:2020-11-11

    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: […]

  • Tensorflow tutorial (first one) — linear regression

    Time:2020-11-7

    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 […]

  • Tensorflow tutorial (first three) — Logical Regression

    Time:2020-11-4

    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 / […]

  • Algorithm engineering lion 5. Exponential distribution family

    Time:2020-10-27

    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 […]