1

They give you the current values of the model parameters $a$ and $b$, and a new data point $(x,y)$, and they request to perform one training step with gradient descent using the data point, and returning the updated values for $a$ and $b$. The problem with your code is that the sign of the learning rate is wrong in the parameter update. If you change it to ...


1

Firstly, when you have an imbalanced dataset accuracy is not a good metric to be using (see https://en.wikipedia.org/wiki/Precision_and_recall#Imbalanced_data). You should consider what the ultimate use-case of this model is and what metric is properly capturing the performance of the model considering that use case. For example, when classifying the ...


1

I suppose that you want to fit a logistic function to your data. A general form of logistic function is : $$y(x)=a+\frac{b}{1+c\: e^{-p\:x}}$$ So they are four parameters $a,c,b,p$ to optimize. The usual method is a non-linear regression calculus. This is an iterative process which requires 'guessed' initial values for the parameters to start the iteration. ...


Only top voted, non community-wiki answers of a minimum length are eligible