[SPARK-2550][MLLIB][APACHE SPARK] Support regularization and intercept in pyspark's linear methods

Related to Jira Issue: [SPARK-2550](https://issues.apache.org/jira/browse/SPARK-2550?jql=project%20%3D%20SPARK%20AND%20resolution%20%3D%20Unresolved%20AND%20priority%20%3D%20Major%20ORDER%20BY%20key%20DESC)
Either way - this if-else code is now repeated 3 times (twice here, once for regression). Might be worth refactoring into a getUpdater function?—
Sent from Mailbox

On Tue, Aug 5, 2014 at 7:48 AM, Michael Giannakopoulos
<notifications@github.com> wrote:

>>          sc = data.context
>> +        if regType is None:
> Xiangrui suggested to keep Scala code as simple as possible and only to throw the `IllegalArgumentException` from there. I tried with pattern matching and by creating enumerations however the result was complicated and I ended up adding more classes to the scala and to python code.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/apache/spark/pull/1775/files#r15795902