Re: UDF for gradient ascent

2016-11-26 Thread Meeraj Kunnumpurath
One thing I noticed inside the UDF is that original column names from the data frame have disappeared and the columns are called col1, col2 etc. Regards Meeraj On Sat, Nov 26, 2016 at 7:31 PM, Meeraj Kunnumpurath < mee...@servicesymphony.com> wrote: > Hello, > > I have a dataset of features on

UDF for gradient ascent

2016-11-26 Thread Meeraj Kunnumpurath
Hello, I have a dataset of features on which I want to compute the likelihood value for implementing gradient ascent for estimating coefficients. I have written a UDF that compute the probability function on each feature as shown below. def getLikelihood(cfs : List[(String, Double)], df: