Created
February 11, 2019 14:01
-
-
Save jesusjavierdediego/67c24265e15950fb5ddb3a798159f221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val df = sqlContext.createDataFrame(data).toDF("label", "features") | |
val lr = new LogisticRegression().setMaxIter(10) | |
val model = lr.fit(df) | |
val weights = model.weights | |
model.transform(df).show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment