aboutsummaryrefslogtreecommitdiff
path: root/mllib/src
diff options
context:
space:
mode:
authorFeynman Liang <fliang@databricks.com>2015-08-04 18:13:18 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-08-04 18:13:18 -0700
commit629e26f7ee916e70f59b017cb6083aa441b26b2c (patch)
tree8fa86de60a521e2341e283bfe6e31344533c2836 /mllib/src
parent7c8fc1f7cb837ff5c32811fdeb3ee2b84de2dea4 (diff)
downloadspark-629e26f7ee916e70f59b017cb6083aa441b26b2c.tar.gz
spark-629e26f7ee916e70f59b017cb6083aa441b26b2c.tar.bz2
spark-629e26f7ee916e70f59b017cb6083aa441b26b2c.zip
[SPARK-9609] [MLLIB] Fix spelling of Strategy.defaultStrategy
jkbradley Author: Feynman Liang <fliang@databricks.com> Closes #7941 from feynmanliang/SPARK-9609-stategy-spelling and squashes the following commits: d2aafb1 [Feynman Liang] Add deprecated backwards compatibility aa090a8 [Feynman Liang] Fix spelling
Diffstat (limited to 'mllib/src')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala2
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/BoostingStrategy.scala2
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala8
3 files changed, 8 insertions, 4 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala b/mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala
index e817090f8a..dbd8d31571 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala
@@ -163,7 +163,7 @@ private[ml] trait DecisionTreeParams extends PredictorParams {
oldAlgo: OldAlgo.Algo,
oldImpurity: OldImpurity,
subsamplingRate: Double): OldStrategy = {
- val strategy = OldStrategy.defaultStategy(oldAlgo)
+ val strategy = OldStrategy.defaultStrategy(oldAlgo)
strategy.impurity = oldImpurity
strategy.checkpointInterval = getCheckpointInterval
strategy.maxBins = getMaxBins
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/BoostingStrategy.scala b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/BoostingStrategy.scala
index 9fd30c9b56..50fe2ac53d 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/BoostingStrategy.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/BoostingStrategy.scala
@@ -90,7 +90,7 @@ object BoostingStrategy {
* @return Configuration for boosting algorithm
*/
def defaultParams(algo: Algo): BoostingStrategy = {
- val treeStrategy = Strategy.defaultStategy(algo)
+ val treeStrategy = Strategy.defaultStrategy(algo)
treeStrategy.maxDepth = 3
algo match {
case Algo.Classification =>
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
index ada227c200..de2c784809 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
@@ -178,14 +178,14 @@ object Strategy {
* @param algo "Classification" or "Regression"
*/
def defaultStrategy(algo: String): Strategy = {
- defaultStategy(Algo.fromString(algo))
+ defaultStrategy(Algo.fromString(algo))
}
/**
* Construct a default set of parameters for [[org.apache.spark.mllib.tree.DecisionTree]]
* @param algo Algo.Classification or Algo.Regression
*/
- def defaultStategy(algo: Algo): Strategy = algo match {
+ def defaultStrategy(algo: Algo): Strategy = algo match {
case Algo.Classification =>
new Strategy(algo = Classification, impurity = Gini, maxDepth = 10,
numClasses = 2)
@@ -193,4 +193,8 @@ object Strategy {
new Strategy(algo = Regression, impurity = Variance, maxDepth = 10,
numClasses = 0)
}
+
+ @deprecated("Use Strategy.defaultStrategy instead.", "1.5.0")
+ def defaultStategy(algo: Algo): Strategy = defaultStrategy(algo)
+
}