Questions tagged [sigmoid]

A sigmoid function is a mathematical function having an "S" shape (sigmoid curve). Often, sigmoid function refers to the special case of the logistic function defined by the formula S ( t ) = 1 / (1 + e^-t)

Sigmoid function (Wikipedia)

256 questions
0
votes
1 answer

Teaching a fully connected feed-forward neural network XOR function

I'm trying to teach my multilayer neural network the XOR function. I have a network with architecture [2, 2, 1]. I define the loss as sum of square errors (I know it's not ideal, but I need it like that). If I set the activation function for all…
Zlatan Sičanica
  • 315
  • 2
  • 11
0
votes
1 answer

Java Sigmoid method returns Incorrect Results

I wrote out a sigmoid function in java that works fine when dealing with single numbers but when given an array fails after the first data entry. Here's some data to Illustrate my problem (with output rounded to 3 digits). Input | Correct Output…
Fraser
  • 3
  • 3
0
votes
1 answer

sigmoid() or tanh() activation function in linear system with neural network

I am trying to build a Neural Network to study one problem with a continuous output variable. A schematic representation of the neural network used is described below Schematic representation of neural network: input layer size = 1; hidden layer…
0
votes
1 answer

Simple non-linear boundary with sigmoid neuron for OR function

I would like to compute a non linear boundary with sigmoid neurons with an input layer and output layer. The neuron has 2 inputs x1, x2 and a bias. I am trying to compute this. How is this done. For the perceptron if w*x +b >= 0 for…
Tinniam V. Ganesh
  • 1,979
  • 6
  • 26
  • 51
0
votes
2 answers

Sigmoid always returns 1?

Consider the following: def sigmoid(inSig): return 1.0/(1.0+np.exp(-inSig)) def classifyVector(inX, weights): prob = sigmoid(sum(inX*weights)) if prob > 0.5: return 1.0 else: return 0.0 My understanding is that the sigmoid result…
swabygw
  • 813
  • 1
  • 10
  • 22
0
votes
1 answer

Automatically finding starting values for a sigmoid curve

I have ~10.000 of vectors and I want to fit a sigmoid curve to each of them; in each case, I need to define starting parameters for fitting, so I want to find these parameters automatically. On stackexchange, there are discussed strategies of…
0
votes
0 answers

Neural network for iris data set

Background: I'm writing in Python a three-layer neural network using mini-batch stochastic gradient descent specifically designed to identify between three classes of iris plants from the famous iris data set. The input layer has four neurons, one…
0
votes
1 answer

Deal with errors in parametrised sigmoid function in python

I am trying to convert a set of numbers into sigmoids: actualarray = { 'open_cost_1':{ 'cost_matrix': [ {'a': 24,'b': 56,'c': 78}, {'a': 3,'b': 98,'c':1711}, {'a': 121,'b': 12121,'c': 12989121}, …
Dhruv Ghulati
  • 2,976
  • 3
  • 35
  • 51
0
votes
1 answer

sigmoid function in vb

Can anyone code a simple sigmoid function in vb.net? I have tried and I don't think it works. If anyone could suggest any improvements and/or fixes, I would be very happy. Thanks! Function sigmoid(inputs As Single) Dim finish As New…
0
votes
1 answer

neural net sigmoid function "takes exactly 1 argument (2 given)"

trying to forward propagate some data through a neural net import numpy as np import matplotlib.pyplot as plt class Neural_Network(object): def __init__(self): #Define Hyperparameters self.inputLayerSize = 2 self.outputLayerSize…
mleafer
  • 825
  • 2
  • 7
  • 15
0
votes
9 answers

Calculate the sigmoid function

I am learning about machine learning from coursera. I am trying to calculate the sigmoid function and i have the below code: function g = sigmoid(z) %SIGMOID Compute sigmoid functoon % J = SIGMOID(z) computes the sigmoid of z. % You need to…
user6658936
  • 111
  • 1
  • 3
  • 10
0
votes
2 answers

estimate the slope of the straight part in boltzmann curve

I was working with one dataset and found the curve to be sigmoidal. i have fitted the curve and got the equation A2+((A1-A2)/1+exp((x-x0)/dx)) where: x0 : Mid point of the curve dx : slope of the curve I need to find the slope and midpoint in…
pkt
  • 53
  • 12
0
votes
0 answers

How to make python add small numbers accurately

I am running some experiments which require use of the following function: import math def sigmoid(x): return 1.0 / (1.0 + math.exp(-x)) The function returns a number from 0.0 to 1.0 (see https://en.wikipedia.org/wiki/Sigmoid_function). If I…
Siato
  • 355
  • 1
  • 5
  • 13
0
votes
1 answer

Delta component doesnt show in weight learning rule of sigmoid activation MLP

As a basic proof of concept, in a network that classifies K classes with input x, bias b, output y,S samples, weights v and t teacher signal in which t(k) equals 1 if the matching sample is under k class. Variables Let x_(is) represent the i_(th)…
-1
votes
1 answer

How to start sigmoid from origin?

Desired graph There are several different implementations of sigmoid function in Python, but all of them started from negative x coordinate axis. But how to start it from x=0?