1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 07:30:12 +01:00

Advertise support for Scala in Codehilite

This commit is contained in:
Jorge 2020-01-21 20:15:41 -08:00 committed by Martin Donath
parent 611c8404ce
commit 5cc68d4a04

View File

@ -915,6 +915,27 @@ module Finity
end
```
### Scala
```scala
// Every record of this DataFrame contains the label and
// features represented by a vector.
val df = sqlContext.createDataFrame(data).toDF("label", "features")
// Set parameters for the algorithm.
// Here, we limit the number of iterations to 10.
val lr = new LogisticRegression().setMaxIter(10)
// Fit the model to the data.
val model = lr.fit(df)
// Inspect the model: get the feature weights.
val weights = model.weights
// Given a dataset, predict each point's label, and show the results.
model.transform(df).show()g
```
### XML
``` xml