| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_422) on Mon Sep 09 06:20:02 UTC 2024 --> |
| <title>GradientBoostedTreesModel (Spark 3.5.3 JavaDoc)</title> |
| <meta name="date" content="2024-09-09"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="GradientBoostedTreesModel (Spark 3.5.3 JavaDoc)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":9,"i2":10,"i3":9,"i4":10,"i5":9,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.SaveLoadV1_0$.SplitData$.html" title="class in org.apache.spark.mllib.tree.model"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/spark/mllib/tree/model/InformationGainStats.html" title="class in org.apache.spark.mllib.tree.model"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html" target="_top">Frames</a></li> |
| <li><a href="GradientBoostedTreesModel.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.spark.mllib.tree.model</div> |
| <h2 title="Class GradientBoostedTreesModel" class="title">Class GradientBoostedTreesModel</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.spark.mllib.tree.model.GradientBoostedTreesModel</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>java.io.Serializable, <a href="../../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">GradientBoostedTreesModel</span> |
| extends Object |
| implements <a href="../../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></pre> |
| <div class="block">Represents a gradient boosted trees model. |
| <p> |
| param: algo algorithm for the ensemble model, either Classification or Regression |
| param: trees tree ensembles |
| param: treeWeights tree ensemble weights</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../serialized-form.html#org.apache.spark.mllib.tree.model.GradientBoostedTreesModel">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink">org.apache.spark.mllib.tree.model.TreeEnsembleModel.SaveLoadV1_0$</span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#GradientBoostedTreesModel-scala.Enumeration.Value-org.apache.spark.mllib.tree.model.DecisionTreeModel:A-double:A-">GradientBoostedTreesModel</a></span>(scala.Enumeration.Value algo, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a>[] trees, |
| double[] treeWeights)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>scala.Enumeration.Value</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#algo--">algo</a></span>()</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#computeInitialPredictionAndError-org.apache.spark.rdd.RDD-double-org.apache.spark.mllib.tree.model.DecisionTreeModel-org.apache.spark.mllib.tree.loss.Loss-">computeInitialPredictionAndError</a></span>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| double initTreeWeight, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a> initTree, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</code> |
| <div class="block">Compute the initial predictions and errors for a dataset for the first |
| iteration of gradient boosting.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#evaluateEachIteration-org.apache.spark.rdd.RDD-org.apache.spark.mllib.tree.loss.Loss-">evaluateEachIteration</a></span>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</code> |
| <div class="block">Method to compute error or loss for every iteration of gradient boosting.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html" title="class in org.apache.spark.mllib.tree.model">GradientBoostedTreesModel</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#load-org.apache.spark.SparkContext-java.lang.String-">load</a></span>(<a href="../../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#numTrees--">numTrees</a></span>()</code> |
| <div class="block">Get number of trees in ensemble.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#org:Dapache:Dspark:Dinternal:DLogging:D:Dlog__:Deq-org.slf4j.Logger-">org$apache$spark$internal$Logging$$log__$eq</a></span>(org.slf4j.Logger x$1)</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#org:Dapache:Dspark:Dinternal:DLogging:D:Dlog_--">org$apache$spark$internal$Logging$$log_</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><Double></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#predict-org.apache.spark.api.java.JavaRDD-">predict</a></span>(<a href="../../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>> features)</code> |
| <div class="block">Java-friendly version of <code>org.apache.spark.mllib.tree.model.TreeEnsembleModel.predict</code>.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><Object></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#predict-org.apache.spark.rdd.RDD-">predict</a></span>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>> features)</code> |
| <div class="block">Predict values for the given data set.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#predict-org.apache.spark.mllib.linalg.Vector-">predict</a></span>(<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> features)</code> |
| <div class="block">Predict values for a single data point using the model trained.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#save-org.apache.spark.SparkContext-java.lang.String-">save</a></span>(<a href="../../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</code> |
| <div class="block">Save this model to the given path.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#toDebugString--">toDebugString</a></span>()</code> |
| <div class="block">Print the full model to a string.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#toString--">toString</a></span>()</code> |
| <div class="block">Print a summary of the model.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#totalNumNodes--">totalNumNodes</a></span>()</code> |
| <div class="block">Get total number of nodes, summed over all trees in the ensemble.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#trees--">trees</a></span>()</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#treeWeights--">treeWeights</a></span>()</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html#updatePredictionError-org.apache.spark.rdd.RDD-org.apache.spark.rdd.RDD-double-org.apache.spark.mllib.tree.model.DecisionTreeModel-org.apache.spark.mllib.tree.loss.Loss-">updatePredictionError</a></span>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>> predictionAndError, |
| double treeWeight, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a> tree, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</code> |
| <div class="block">Update a zipped predictionError RDD |
| (as obtained with computeInitialPredictionAndError)</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class Object</h3> |
| <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="GradientBoostedTreesModel-scala.Enumeration.Value-org.apache.spark.mllib.tree.model.DecisionTreeModel:A-double:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>GradientBoostedTreesModel</h4> |
| <pre>public GradientBoostedTreesModel(scala.Enumeration.Value algo, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a>[] trees, |
| double[] treeWeights)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="computeInitialPredictionAndError-org.apache.spark.rdd.RDD-double-org.apache.spark.mllib.tree.model.DecisionTreeModel-org.apache.spark.mllib.tree.loss.Loss-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>computeInitialPredictionAndError</h4> |
| <pre>public static <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>> computeInitialPredictionAndError(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| double initTreeWeight, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a> initTree, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</pre> |
| <div class="block">Compute the initial predictions and errors for a dataset for the first |
| iteration of gradient boosting.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data:</code> - training data.</dd> |
| <dd><code>initTreeWeight:</code> - learning rate assigned to the first tree.</dd> |
| <dd><code>initTree:</code> - first DecisionTreeModel.</dd> |
| <dd><code>loss:</code> - evaluation metric.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an RDD with each element being a zip of the prediction and error |
| corresponding to every sample.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="updatePredictionError-org.apache.spark.rdd.RDD-org.apache.spark.rdd.RDD-double-org.apache.spark.mllib.tree.model.DecisionTreeModel-org.apache.spark.mllib.tree.loss.Loss-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>updatePredictionError</h4> |
| <pre>public static <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>> updatePredictionError(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,Object>> predictionAndError, |
| double treeWeight, |
| <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a> tree, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</pre> |
| <div class="block">Update a zipped predictionError RDD |
| (as obtained with computeInitialPredictionAndError)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data:</code> - training data.</dd> |
| <dd><code>predictionAndError:</code> - predictionError RDD</dd> |
| <dd><code>treeWeight:</code> - Learning rate.</dd> |
| <dd><code>tree:</code> - Tree using which the prediction and error should be updated.</dd> |
| <dd><code>loss:</code> - evaluation metric.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an RDD with each element being a zip of the prediction and error |
| corresponding to each sample.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="load-org.apache.spark.SparkContext-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>load</h4> |
| <pre>public static <a href="../../../../../../org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html" title="class in org.apache.spark.mllib.tree.model">GradientBoostedTreesModel</a> load(<a href="../../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sc</code> - Spark context used for loading model files.</dd> |
| <dd><code>path</code> - Path specifying the directory to which the model was saved.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Model instance</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="algo--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>algo</h4> |
| <pre>public scala.Enumeration.Value algo()</pre> |
| </li> |
| </ul> |
| <a name="trees--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trees</h4> |
| <pre>public <a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.html" title="class in org.apache.spark.mllib.tree.model">DecisionTreeModel</a>[] trees()</pre> |
| </li> |
| </ul> |
| <a name="treeWeights--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>treeWeights</h4> |
| <pre>public double[] treeWeights()</pre> |
| </li> |
| </ul> |
| <a name="save-org.apache.spark.SparkContext-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>save</h4> |
| <pre>public void save(<a href="../../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../org/apache/spark/mllib/util/Saveable.html#save-org.apache.spark.SparkContext-java.lang.String-">Saveable</a></code></span></div> |
| <div class="block">Save this model to the given path. |
| <p> |
| This saves: |
| - human-readable (JSON) model metadata to path/metadata/ |
| - Parquet formatted data to path/data/ |
| <p> |
| The model may be loaded using <code>Loader.load</code>. |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/spark/mllib/util/Saveable.html#save-org.apache.spark.SparkContext-java.lang.String-">save</a></code> in interface <code><a href="../../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sc</code> - Spark context used to save model data.</dd> |
| <dd><code>path</code> - Path specifying the directory in which to save this model. |
| If the directory already exists, this method throws an exception.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evaluateEachIteration-org.apache.spark.rdd.RDD-org.apache.spark.mllib.tree.loss.Loss-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evaluateEachIteration</h4> |
| <pre>public double[] evaluateEachIteration(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>> data, |
| <a href="../../../../../../org/apache/spark/mllib/tree/loss/Loss.html" title="interface in org.apache.spark.mllib.tree.loss">Loss</a> loss)</pre> |
| <div class="block">Method to compute error or loss for every iteration of gradient boosting.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - RDD of <a href="../../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression"><code>LabeledPoint</code></a></dd> |
| <dd><code>loss</code> - evaluation metric.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array with index i having the losses or errors for the ensemble |
| containing the first i+1 trees</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="org:Dapache:Dspark:Dinternal:DLogging:D:Dlog_--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>org$apache$spark$internal$Logging$$log_</h4> |
| <pre>public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()</pre> |
| </li> |
| </ul> |
| <a name="org:Dapache:Dspark:Dinternal:DLogging:D:Dlog__:Deq-org.slf4j.Logger-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>org$apache$spark$internal$Logging$$log__$eq</h4> |
| <pre>public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)</pre> |
| </li> |
| </ul> |
| <a name="predict-org.apache.spark.mllib.linalg.Vector-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>predict</h4> |
| <pre>public double predict(<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> features)</pre> |
| <div class="block">Predict values for a single data point using the model trained. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>features</code> - array representing a single data point</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>predicted category from the trained model</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="predict-org.apache.spark.rdd.RDD-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>predict</h4> |
| <pre>public <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><Object> predict(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>> features)</pre> |
| <div class="block">Predict values for the given data set. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>features</code> - RDD representing data points to be predicted</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>RDD[Double] where each entry contains the corresponding prediction</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="predict-org.apache.spark.api.java.JavaRDD-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>predict</h4> |
| <pre>public <a href="../../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><Double> predict(<a href="../../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><<a href="../../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>> features)</pre> |
| <div class="block">Java-friendly version of <code>org.apache.spark.mllib.tree.model.TreeEnsembleModel.predict</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>features</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public String toString()</pre> |
| <div class="block">Print a summary of the model.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>toString</code> in class <code>Object</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toDebugString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toDebugString</h4> |
| <pre>public String toDebugString()</pre> |
| <div class="block">Print the full model to a string.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="numTrees--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>numTrees</h4> |
| <pre>public int numTrees()</pre> |
| <div class="block">Get number of trees in ensemble.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="totalNumNodes--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>totalNumNodes</h4> |
| <pre>public int totalNumNodes()</pre> |
| <div class="block">Get total number of nodes, summed over all trees in the ensemble.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/spark/mllib/tree/model/DecisionTreeModel.SaveLoadV1_0$.SplitData$.html" title="class in org.apache.spark.mllib.tree.model"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/spark/mllib/tree/model/InformationGainStats.html" title="class in org.apache.spark.mllib.tree.model"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/spark/mllib/tree/model/GradientBoostedTreesModel.html" target="_top">Frames</a></li> |
| <li><a href="GradientBoostedTreesModel.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <script defer="defer" type="text/javascript" src="../../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../../../lib/api-javadocs.js"></script></body> |
| </html> |