Skip to content

Instantly share code, notes, and snippets.

@jesusjavierdediego
Created February 11, 2019 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesusjavierdediego/67c24265e15950fb5ddb3a798159f221 to your computer and use it in GitHub Desktop.
Save jesusjavierdediego/67c24265e15950fb5ddb3a798159f221 to your computer and use it in GitHub Desktop.
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