Skip to content

Commit 2a7d7ce

Browse files
committed
nowrap
1 parent 7f57e5b commit 2a7d7ce

File tree

10 files changed

+101
-86
lines changed

10 files changed

+101
-86
lines changed

classification.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ <h2 id="logit">Logistic Regression</h2>
959959
</div>
960960
<div class="tab-pane active" id="java_14">
961961
<div class="code" style="text-align: left;">
962-
<pre class="prettyprint lang-java"><code>
962+
<pre class="prettyprint lang-java"><code style="white-space: preserve nowrap;">
963963
public class LogisticRegression {
964964
public static LogisticRegression fit(double[][] x, int[] y, double lambda, double tol, int maxIter);
965965
}
@@ -1296,7 +1296,7 @@ <h2 id="neural-network">Multilayer Perceptron Neural Network</h2>
12961296
significantly exceeds the needed free parameters. There are two general
12971297
approaches for avoiding this problem: The first is to use cross-validation
12981298
and similar techniques to check for the presence of over-fitting and
1299-
optimally select hyper-parameters such as to minimize the generalization
1299+
optimally select hyperparameters such as to minimize the generalization
13001300
error. The second is to use some form of regularization, which emerges
13011301
naturally in a Bayesian framework, where the regularization can be
13021302
performed by selecting a larger prior probability over simpler models;
@@ -1576,7 +1576,7 @@ <h2 id="svm">Support Vector Machines</h2>
15761576
var x = zip.drop(0).toArray();
15771577
var y = zip.column(0).toIntArray();
15781578
var kernel = new GaussianKernel(8.0);
1579-
var model = OneVersusRest.fit(x, y, (x, y) -> SVM.fit(x, y, kernel, 5, 1E-3));
1579+
var model = OneVersusRest.fit(x, y, (x, y) -> SVM.fit(x, y, kernel, new SVM.Options(5)));
15801580
</code></pre>
15811581
</div>
15821582
</div>
@@ -1658,7 +1658,7 @@ <h2 id="cart">Decision Trees</h2>
16581658
</div>
16591659
<div class="tab-pane active" id="java_24">
16601660
<div class="code" style="text-align: left;">
1661-
<pre class="prettyprint lang-java"><code>
1661+
<pre class="prettyprint lang-java"><code style="white-space: preserve nowrap;">
16621662
public class DecisionTree {
16631663
public static DecisionTree fit(Formula formula, DataFrame data, SplitRule rule, int maxDepth, int maxNodes, int nodeSize);
16641664
}
@@ -1700,7 +1700,7 @@ <h2 id="cart">Decision Trees</h2>
17001700
<div class="tab-content">
17011701
<div class="tab-pane" id="scala_25">
17021702
<div class="code" style="text-align: left;">
1703-
<pre class="prettyprint lang-scala"><code>
1703+
<pre class="prettyprint lang-scala"><code style="white-space: preserve nowrap;">
17041704
smile> cart("V1" ~, zip)
17051705
[main] INFO smile.util.package$ - Decision Tree runtime: 0:00:00.754375
17061706
res22: DecisionTree = n=7291
@@ -1734,7 +1734,7 @@ <h2 id="cart">Decision Trees</h2>
17341734
</div>
17351735
<div class="tab-pane active" id="java_25">
17361736
<div class="code" style="text-align: left;">
1737-
<pre class="prettyprint lang-java"><code>
1737+
<pre class="prettyprint lang-java"><code style="white-space: preserve nowrap;">
17381738
smile> import smile.data.formula.*
17391739
smile> DecisionTree.fit(Formula.lhs("V1"), zip)
17401740
$232 ==> n=7291
@@ -1768,7 +1768,7 @@ <h2 id="cart">Decision Trees</h2>
17681768
</div>
17691769
<div class="tab-pane" id="kotlin_25">
17701770
<div class="code" style="text-align: left;">
1771-
<pre class="prettyprint lang-kotlin"><code>
1771+
<pre class="prettyprint lang-kotlin"><code style="white-space: preserve nowrap;">
17721772
>>> import smile.data.formula.*
17731773
>>> cart(Formula.lhs("V1"), zip)
17741774
res160: smile.classification.DecisionTree = n=7291

faq.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h2 class="question" id="link-with-smile">Link with Smile</h2>
292292
some clustering algorithms, Gaussian Process regression, MLP, etc.).
293293
By default, Smile includes OpenBLAS for macOS, Windows, and Linux:</p>
294294
<div class="code" style="text-align: left;">
295-
<pre class="prettyprint"><code>
295+
<pre class="prettyprint"><code style="white-space: preserve nowrap;">
296296
libraryDependencies ++= Seq(
297297
"org.bytedeco" % "javacpp" % "1.5.11" classifier "macosx-arm64" classifier "macosx-x86_64" classifier "windows-x86_64" classifier "linux-x86_64",
298298
"org.bytedeco" % "openblas" % "0.3.28-1.5.11" classifier "macosx-arm64" classifier "macosx-x86_64" classifier "windows-x86_64" classifier "linux-x86_64",

feature.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ <h3 id="tree-shap">TreeSHAP</h3>
614614
smile&gt; smile.sort.QuickSort.sort(importance, fields);
615615

616616
smile&gt; for (int i = 0; i &lt; importance.length; i++) {
617-
...&gt; System.out.format("%-15s %12.4f%n", fields[i], importance[i]);
618-
...&gt; }
617+
System.out.format("%-15s %12.4f%n", fields[i], importance[i]);
618+
}
619619
CHAS 86870.7977
620620
ZN 140436.2962
621621
RAD 150921.6370
@@ -636,8 +636,8 @@ <h3 id="tree-shap">TreeSHAP</h3>
636636
smile&gt; smile.sort.QuickSort.sort(shap, fields);
637637

638638
smile&gt; for (int i = 0; i &lt; shap.length; i++) {
639-
...&gt; System.out.format("%-15s %12.4f%n", fields[i], shap[i]);
640-
...&gt; }
639+
System.out.format("%-15s %12.4f%n", fields[i], shap[i]);
640+
}
641641
CHAS 0.0486
642642
ZN 0.0535
643643
RAD 0.0622

llm.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ <h2 id="llama" class="title">Llama 3</h2>
248248
call <code>chat()</code> method to generate conversation responses.</p>
249249

250250
<ul class="nav nav-tabs">
251-
<li class="active"><a href="#java_1" data-toggle="tab">Java</a></li>
251+
<li class="active"><a href="#java_2" data-toggle="tab">Java</a></li>
252252
</ul>
253253
<div class="tab-content">
254-
<div class="tab-pane active" id="java_1">
254+
<div class="tab-pane active" id="java_2">
255255
<div class="code" style="text-align: left;">
256-
<pre class="prettyprint lang-java"><code>
256+
<pre class="prettyprint lang-java"><code style="white-space: preserve nowrap;">
257257
// List of conversational dialogs, where each dialog is a list of messages.
258258
Message[][] dialogs = {
259259
{

0 commit comments

Comments
 (0)