Maximum likelihood for a linear- nonlinear model

Hi, I'm trying to build a linear/nonlinear model of a neuron membrane potential, v_m, for a given synaptic input.

v_g is obtained from a linear combination of inputs using J basis functions, B_1 . . .B_J) and a set of J weights, i.e. the function g(.) ,and the weights I can set by maximum likelihood.

i.e. v_g = g(w, B)

However, I now want to set the weights in a models of the form

v_m = f(v_g) + e

where f(.) is a non-linear function, such as a sigmoid, and e is a gaussian noise term.

Can anyone suggest a strategy?

Many thanks, MD

p.s. How the heck do you use latex script in this thing?