spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <>
Subject [GitHub] spark pull request: [SPARK-9910][ML]User guide for train validatio...
Date Wed, 26 Aug 2015 00:54:08 GMT
Github user jkbradley commented on a diff in the pull request:
    --- Diff: docs/ ---
    @@ -801,6 +801,173 @@ jsc.stop();
    +## Example: Model Selection via Train Validation Split
    +In addition to  `CrossValidator` Spark also offers
for hyper-parameter tuning.
    +It randomly splits the input dataset into train and validation sets based on ratio passed
as parameter
    +and use evaluation metric on the validation set to select the best model.
    +The use is similar to `CrossValidator`, but simpler and less computationally expensive.
    +`TrainValidationSplit` takes an `Estimator`, a set of `ParamMap`s, and an
    +It begins by splitting the dataset into two parts using *trainRatio* parameter
    +which are used as separate training and test datasets. For example with `$trainRatio=0.75$`
    +`TrainValidationSplit` will generate training and test dataset pair where 75% of the
data is used for training and 25% for validation.
    +Similarly to `CrossValidator`, `TrainValidationSplit` also iterates through the set of
    +For each combination of parameters, it trains the given `Estimator` and evaluates it
using the given `Evaluator`.
    +The `ParamMap` which produces the best evaluation metric is selected as the best option.
    +`TrainValidationSplit` finally fits the `Estimator` using the best `ParamMap` and the
entire dataset.
    +`TrainValidationSplit` only evaluates each combination of parameters once as opposed
to k times in
    + case of `CrossValidator`. It is therefore less expensive, but will not produce as reliable
    +<div class="codetabs">
    +<div data-lang="scala">
    --- End diff --
    Use this instead:
    <div data-lang="scala" markdown="1">
    That helps when, e.g., you put links inside the code tabs (which will likely be done in
the future as docs expand).

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message