@@ -959,7 +959,7 @@ <h2 id="logit">Logistic Regression</h2>
959
959
</ div >
960
960
< div class ="tab-pane active " id ="java_14 ">
961
961
< 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; " >
963
963
public class LogisticRegression {
964
964
public static LogisticRegression fit(double[][] x, int[] y, double lambda, double tol, int maxIter);
965
965
}
@@ -1296,7 +1296,7 @@ <h2 id="neural-network">Multilayer Perceptron Neural Network</h2>
1296
1296
significantly exceeds the needed free parameters. There are two general
1297
1297
approaches for avoiding this problem: The first is to use cross-validation
1298
1298
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
1300
1300
error. The second is to use some form of regularization, which emerges
1301
1301
naturally in a Bayesian framework, where the regularization can be
1302
1302
performed by selecting a larger prior probability over simpler models;
@@ -1576,7 +1576,7 @@ <h2 id="svm">Support Vector Machines</h2>
1576
1576
var x = zip.drop(0).toArray();
1577
1577
var y = zip.column(0).toIntArray();
1578
1578
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) ));
1580
1580
</ code > </ pre >
1581
1581
</ div >
1582
1582
</ div >
@@ -1658,7 +1658,7 @@ <h2 id="cart">Decision Trees</h2>
1658
1658
</ div >
1659
1659
< div class ="tab-pane active " id ="java_24 ">
1660
1660
< 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; " >
1662
1662
public class DecisionTree {
1663
1663
public static DecisionTree fit(Formula formula, DataFrame data, SplitRule rule, int maxDepth, int maxNodes, int nodeSize);
1664
1664
}
@@ -1700,7 +1700,7 @@ <h2 id="cart">Decision Trees</h2>
1700
1700
< div class ="tab-content ">
1701
1701
< div class ="tab-pane " id ="scala_25 ">
1702
1702
< 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; " >
1704
1704
smile> cart("V1" ~, zip)
1705
1705
[main] INFO smile.util.package$ - Decision Tree runtime: 0:00:00.754375
1706
1706
res22: DecisionTree = n=7291
@@ -1734,7 +1734,7 @@ <h2 id="cart">Decision Trees</h2>
1734
1734
</ div >
1735
1735
< div class ="tab-pane active " id ="java_25 ">
1736
1736
< 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; " >
1738
1738
smile> import smile.data.formula.*
1739
1739
smile> DecisionTree.fit(Formula.lhs("V1"), zip)
1740
1740
$232 ==> n=7291
@@ -1768,7 +1768,7 @@ <h2 id="cart">Decision Trees</h2>
1768
1768
</ div >
1769
1769
< div class ="tab-pane " id ="kotlin_25 ">
1770
1770
< 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; " >
1772
1772
> > > import smile.data.formula.*
1773
1773
> > > cart(Formula.lhs("V1"), zip)
1774
1774
res160: smile.classification.DecisionTree = n=7291
0 commit comments