perceptron

plot decision boundary matplotlib

空扰寡人 提交于 2019-12-17 10:46:47
问题 I am very new to matplotlib and am working on simple projects to get acquainted with it. I was wondering how I might plot the decision boundary which is the weight vector of the form [w1,w2], which basically separates the two classes lets say C1 and C2, using matplotlib. Is it as simple as plotting a line from (0,0) to the point (w1,w2) (since W is the weight "vector") if so, how do I extend this like in both directions if I need to? Right now all I am doing is : import matplotlib.pyplot as

Data Encoding for Training in Neural Network

放肆的年华 提交于 2019-12-14 03:38:12
问题 I have converted 349,900 words from a dictionary file to md5 hash. Sample are below: 74b87337454200d4d33f80c4663dc5e5 594f803b380a41396ed63dca39503542 0b4e7a0e5fe84ad35fb5f95b9ceeac79 5d793fc5b00a2348c3fb9ab59e5ca98a 3dbe00a167653a1aaee01d93e77e730e ffc32e9606a34d09fca5d82e3448f71f 2fa9f0700f68f32d2d520302906e65ce 1c9b32ff1b53bd892b87578a11cbd333 26a10043bba821303408ebce568a2746 c3c32ff3481e9745e10defa7ce5b511e I want to train a neural network to decrypt a hash using just simple architecture

neural network code explanation

纵然是瞬间 提交于 2019-12-12 03:53:01
问题 The following is an implementation of a simple Perceptron supplied in a blog. input = [0 0; 0 1; 1 0; 1 1]; numIn = 4; desired_out = [0;1;1;1]; bias = -1; coeff = 0.7; rand('state',sum(100*clock)); weights = -1*2.*rand(3,1); iterations = 10; for i = 1:iterations out = zeros(4,1); for j = 1:numIn y = bias*weights(1,1)+... input(j,1)*weights(2,1)+input(j,2)*weights(3,1); out(j) = 1/(1+exp(-y)); delta = desired_out(j)-out(j); weights(1,1) = weights(1,1)+coeff*bias*delta; weights(2,1) = weights(2

Neural Networks normalizing output data

允我心安 提交于 2019-12-11 03:14:41
问题 I have a training data for NN along with expected outputs. Each input is 10 dimensional vector and has 1 expected output.I have normalised the training data using Gaussian but I don't know how to normalise the outputs since it only has single dimension. Any ideas? Example: Raw Input Vector: -128.91, 71.076, -100.75,4.2475, -98.811, 77.219, 4.4096, -15.382, -6.1477, -361.18 Normalised Input Vector: -0.6049, 1.0412, -0.3731, 0.4912, -0.3571, 1.0918, 0.4925, 0.3296, 0.4056, -2.5168 The raw

decision boundary of perceptron too small

故事扮演 提交于 2019-12-11 00:42:50
问题 I am trying to plot the decision boundary of a perceptron algorithm and am really confused about a few things. My input instances are in the form [(x1,x2),target_Value], basically a 2-d input instance and a 2 class target_value [1 or 0]. My weight vector hence is in the form: [w1,w2] Now I have to incorporate an additional bias parameter w0 and hence my weight vector becomes a 3x1 vector? is it 1x3 vector? I think it should be 1x3 since a vector has only 1 row and n columns. Now let's say I

Clarification on bias of a perceptron

青春壹個敷衍的年華 提交于 2019-12-08 06:37:55
问题 Isn't it true that if a bias is not present, a line passing through origin should be able to linearly separate the two data sets?? But the most popular answer in this -->> question says y ^ | - + \\ + | - +\\ + + | - - \\ + | - - + \\ + ---------------------> x stuck like this I am confused about it. Do you mean the origins in figure above are somewhere in middle of x-axis and y-axis? Can somebody please help me and clarify this? 回答1: Alright, so perhaps the original ASCII graph was not 100%

Advice for algorithm choice

最后都变了- 提交于 2019-12-07 01:59:30
问题 I have to do a project that tries to scan the shape of the vehicles and detect what type of vehicle it is , the scanning will performed with a sensors called “vehicle scanner” they are just 50 beams of lights, each beam with receptor and emission as it is shown in the picture: I get from the sensors the raw sate of each beam (block or unblock) and with that continuous scanning we can create a probably very low res image of the vehicle. My question is what algorithms/technique I can use to

Advice for algorithm choice

梦想的初衷 提交于 2019-12-05 06:04:13
I have to do a project that tries to scan the shape of the vehicles and detect what type of vehicle it is , the scanning will performed with a sensors called “vehicle scanner” they are just 50 beams of lights, each beam with receptor and emission as it is shown in the picture: I get from the sensors the raw sate of each beam (block or unblock) and with that continuous scanning we can create a probably very low res image of the vehicle. My question is what algorithms/technique I can use to detect and identify the shape of the vehicle, we want to count the wheels, and if we can, try to identify

Intuition for perceptron weight update rule

偶尔善良 提交于 2019-12-04 19:12:09
问题 I am having trouble understanding the weight update rule for perceptrons: w(t + 1) = w(t) + y(t)x(t) . Assume we have a linearly separable data set. w is a set of weights [w0, w1, w2, ...] where w0 is a bias. x is a set of input parameters [x0, x1, x2, ...] where x0 is fixed at 1 to accommodate the bias. At iteration t , where t = 0, 1, 2, ..., w(t) is the set of weights at iteration t . x(t) is a misclassified training example. y(t) is the target output of x(t) (either -1 or 1). Why does

Parameter Tuning for Perceptron Learning Algorithm

自古美人都是妖i 提交于 2019-12-03 05:12:04
问题 I'm having sort of an issue trying to figure out how to tune the parameters for my perceptron algorithm so that it performs relatively well on unseen data. I've implemented a verified working perceptron algorithm and I'd like to figure out a method by which I can tune the numbers of iterations and the learning rate of the perceptron. These are the two parameters I'm interested in. I know that the learning rate of the perceptron doesn't affect whether or not the algorithm converges and