sigmoid function:

trainSet:

input:

output:

model:

loss:

cost funcation:

gradient descent: