From the below code what is the most appropriate next step in ML process

0 votes
From the below code. what is the most appropriate next step in ML process?

val uniionRatingsRDD = ratingsRDD.union(newRatingsRDD)
val model = (new ALS.setRank(20).setIterations(10).run(unionRatingsRDD))

1. val predictionsForTestRDD = model.predict(ratingsRDD)
2. val model = ratingsRDD.split(userid,20)
3.val splits = ratingsRDD.randomSplit(Array(0.8,0.2),0L)
4. val topRecsForUser = model.recommendProducts(userid,5)
Nov 24, 2020 in Apache Spark by ritu
• 980 points
76 views

1 answer to this question.

0 votes
Hi@ritu,
The most appropriate step according to me is to do random split of your data set. After that you can train your model. So that it can find accurate parameters.
answered Nov 25, 2020 by MD
• 95,140 points

Related Questions In Apache Spark

0 votes
1 answer

2)What will be printed when the below code is executed ?

Hi, @Ritu, List(5,100,10) is printed. The take method returns the first n elements in ...READ MORE

answered Nov 23, 2020 in Apache Spark by Gitika
• 65,870 points
80 views
0 votes
1 answer

What will be printed when the below code is executed ?

Option a) List(5,100,10) The take method returns the first n elements in an ...READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,870 points
71 views
0 votes
1 answer

What class is declared in the blow code?

Option D: String class READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,870 points
95 views
0 votes
1 answer

What will be printed when the below code is executed?

Option D)  runtime error READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,870 points
188 views
0 votes
1 answer

What will be printed when the below code is executed?

Option b) .List(0,3,5) The takeOrdered method returns the smallest n elements in a ...READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,870 points
138 views
+1 vote
3 answers

What is the difference between rdd and dataframes in Apache Spark ?

Comparison between Spark RDD vs DataFrame 1. Release ...READ MORE

answered Aug 27, 2018 in Apache Spark by shams
• 3,660 points
35,279 views
0 votes
1 answer

What is the difference between persist() and cache() in apache spark?

Hi, persist () allows the user to specify ...READ MORE

answered Jul 3, 2019 in Apache Spark by Gitika
• 65,870 points
2,222 views
0 votes
1 answer

What is the advantage of having immutability in design for Scala programming language?

Hi, Scala uses immutability by default in most ...READ MORE

answered Jul 24, 2019 in Apache Spark by Gitika
• 65,870 points
144 views
0 votes
1 answer

What is pageRank in graphX??

Hi@akhtar, The PageRank algorithm outputs a probability distribution ...READ MORE

answered Jul 21, 2020 in Apache Spark by MD
• 95,140 points
286 views
0 votes
1 answer

What is the difference between spark streaming and spark structured streaming?

Hi@akhtar Generally, Spark streaming  is used for real time ...READ MORE

answered Feb 4, 2020 in Apache Spark by MD
• 95,140 points
1,041 views