mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Advertise support for Scala in Codehilite
This commit is contained in:
parent
611c8404ce
commit
5cc68d4a04
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user