File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
examples/src/main/scala/org/apache/spark/examples/ml Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ object LinearRegressionWithElasticNetExample {
2929 def main (args : Array [String ]): Unit = {
3030 val conf = new SparkConf ().setAppName(" LinearRegressionWithElasticNetExample" )
3131 val sc = new SparkContext (conf)
32- val sqlCtx = new SQLContext (sc)
32+ val sqlContext = new SQLContext (sc)
3333
3434 // $example on$
3535 // Load training data
36- val training = sqlCtx .read.format(" libsvm" )
36+ val training = sqlContext .read.format(" libsvm" )
3737 .load(" data/mllib/sample_linear_regression_data.txt" )
3838
3939 val lr = new LinearRegression ()
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ object LogisticRegressionSummaryExample {
3030 def main (args : Array [String ]): Unit = {
3131 val conf = new SparkConf ().setAppName(" LogisticRegressionSummaryExample" )
3232 val sc = new SparkContext (conf)
33- val sqlCtx = new SQLContext (sc)
34- import sqlCtx .implicits ._
33+ val sqlContext = new SQLContext (sc)
34+ import sqlContext .implicits ._
3535
3636 // Load training data
37- val training = sqlCtx .read.format(" libsvm" ).load(" data/mllib/sample_libsvm_data.txt" )
37+ val training = sqlContext .read.format(" libsvm" ).load(" data/mllib/sample_libsvm_data.txt" )
3838
3939 val lr = new LogisticRegression ()
4040 .setMaxIter(10 )
You can’t perform that action at this time.
0 commit comments