Skip to content

Commit

Permalink
update docs for 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
haifengl committed Mar 3, 2023
1 parent cc5ebad commit 724568f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 44 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ following to your project pom.xml file.
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
```

For NLP, use the artifactId smile-nlp.

For Scala API, please use
```
libraryDependencies += "com.github.haifengl" %% "smile-scala" % "3.0.0"
libraryDependencies += "com.github.haifengl" %% "smile-scala" % "3.0.1"
```

For Kotlin API, add the below into the `dependencies` section
of Gradle build script.
```
implementation("com.github.haifengl:smile-kotlin:3.0.0")
implementation("com.github.haifengl:smile-kotlin:3.0.1")
```

For Clojure API, add the following dependency to your project or build file:
```
[org.clojars.haifengl/smile "3.0.0"]
[org.clojars.haifengl/smile "3.0.1"]
```

Some algorithms rely on BLAS and LAPACK (e.g. manifold learning,
Expand Down Expand Up @@ -113,7 +113,7 @@ Or you may simply include `smile-mkl` module in your project, which includes
MKL binaries. With `smile-mkl` module in the class path, Smile will
automatically switch to MKL.
```
libraryDependencies += "com.github.haifengl" %% "smile-mkl" % "3.0.0"
libraryDependencies += "com.github.haifengl" %% "smile-mkl" % "3.0.1"
```

## Shell
Expand Down Expand Up @@ -149,11 +149,7 @@ to enter Kotlin REPL.
## Model Serialization
Most models support the Java `Serializable` interface (all classifiers
do support `Serializable` interface) so that you can use them in Spark.
For reading/writing the models in non-Java code, we suggest [XStream]
(https://github.com/x-stream/xstream) to serialize the trained models.
XStream is a simple library to serialize objects to XML and back again.
XStream is easy to use and doesn't require mappings (actually requires
no modifications to objects). [Protostuff](http://code.google.com/p/protostuff/)
[Protostuff](http://code.google.com/p/protostuff/)
is a nice alternative that supports forward-backward compatibility
(schema evolution) and validation. Beyond XML, Protostuff supports many
other formats such as JSON, YAML, protobuf, etc.
Expand All @@ -169,7 +165,7 @@ To use SmilePlot, add the following to dependencies
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-plot</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
```

Expand Down
18 changes: 0 additions & 18 deletions web/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -2108,24 +2108,6 @@ <h2 id="export">Export Data and Models</h2>
<p>This method is in the Scala API <code>smile.write</code> object and serialize the model to Java
serialization format. This is handy if you want to use a model in Spark.</p>

<p>Alternatively, you can also use</p>
<ul class="nav nav-tabs">
<li class="active"><a href="#scala_26" data-toggle="tab">Scala</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="scala_26">
<div class="code" style="text-align: left;">
<pre class="prettyprint lang-scala"><code>
write.xstream(model, file)
</code></pre>
</div>
</div>
</div>

<p>which uses XStream library to serialize the model (actually any objects) to XML file.</p>

<p>To read the model back, you can use <code>read(file)</code> or <code>read.xstream(file)</code>, correspondingly.</p>

<p>You can also save a <code>DataFrame</code> to an ARFF file with the method
<code>write.arff(data, file)</code>. The ARFF file keeps the data type information.
If you prefer the plain csv text file, you may use the methods <code>write.csv(data, file)</code> or
Expand Down
19 changes: 5 additions & 14 deletions web/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ <h2 class="question" id="link-with-smile">Link with Smile</h2>
&lt;dependency&gt;
&lt;groupId&gt;com.github.haifengl&lt;/groupId&gt;
&lt;artifactId&gt;smile-core&lt;/artifactId&gt;
&lt;version&gt;3.0.0&lt;/version&gt;
&lt;version&gt;3.0.1&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>If you're using Gradle, add the following line into your build
file's <code>dependencies</code> section:</p>
<pre><code>
implementation("com.github.haifengl:smile-core:3.0.0")
implementation("com.github.haifengl:smile-core:3.0.1")
</code></pre>

<p>If you're using SBT, add the following line into your build file:</p>
<pre><code>
libraryDependencies += "com.github.haifengl" % "smile-core" % "3.0.0"
libraryDependencies += "com.github.haifengl" % "smile-core" % "3.0.1"
</code></pre>

<p>For Scala API,</p>
<pre><code>
libraryDependencies += "com.github.haifengl" %% "smile-scala" % "3.0.0"
libraryDependencies += "com.github.haifengl" %% "smile-scala" % "3.0.1"
</code></pre>

<p>Some algorithms rely on BLAS and LAPACK (e.g. manifold learning,
Expand Down Expand Up @@ -74,7 +74,7 @@ <h2 class="question" id="link-with-smile">Link with Smile</h2>
includes MKL binaries. With `smile-mkl` module in the class path, Smile
will automatically switch to MKL.</p>
<pre><code>
libraryDependencies += "com.github.haifengl" % "smile-mkl" % "3.0.0"
libraryDependencies += "com.github.haifengl" % "smile-mkl" % "3.0.1"
</code></pre>

<h2 class="question" id="model-serialization">Model serialization</h2>
Expand All @@ -85,15 +85,6 @@ <h2 class="question" id="model-serialization">Model serialization</h2>
<p>This method is in the Scala API <code>smile.write</code> object and serialize the model to Java
serialization format. This is handy if you want to use a model in Spark.</p>

<p>Alternatively, you can also use</p>
<pre class="prettyprint lang-scala"><code>
write.xstream(model, file)
</code></pre>

<p>which uses XStream library to serialize the model (actually any objects) to XML file.</p>

<p>To read the model back, you can use <code>read(file)</code> or <code>read.xstream(file)</code>, correspondingly.</p>

<h2 class="question" id="data-format">Data Format</h2>
<p class="answer">
Most Smile algorithms take simple <code>double[]</code> as input. So you can use your favorite methods
Expand Down
3 changes: 3 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<div class="news" style="margin-bottom: 20px;">
<h5>Latest News</h5>
<ul class="list-unstyled">
<li><a href="https://github.com/haifengl/smile/releases/tag/v3.0.1">Smile 3.0.1 Released!</a>
<span class="small">(Mar 3, 2023)</span></li>

<li><a href="https://github.com/haifengl/smile/releases/tag/v3.0.0">Smile 3.0.0 Released!</a>
<span class="small">(Dec 15, 2022)</span></li>

Expand Down
2 changes: 1 addition & 1 deletion web/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ <h2 id="notebook">Notebooks</h2>
the <code>notebooks</code> directory.</p>

<pre class="prettyprint lang-scala"><code>
import $ivy.`com.github.haifengl::smile-scala:3.0.0`
import $ivy.`com.github.haifengl::smile-scala:3.0.1`

import scala.language.postfixOps
import org.apache.commons.csv.CSVFormat
Expand Down

0 comments on commit 724568f

Please sign in to comment.