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 25, 2020 in Apache Spark by ritu
• 960 points
1,234 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,460 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,770 points
773 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,770 points
1,456 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,770 points
990 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,770 points
2,398 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 28, 2018 in Apache Spark by shams
• 3,670 points
43,073 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,770 points
3,576 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,770 points
757 views
0 votes
1 answer

What is the work of Yield Keyword in Scala?

Hey, Used with a loop, yield produces a value for ...READ MORE

answered Jul 26, 2019 in Apache Spark by Gitika
• 65,770 points
933 views
0 votes
1 answer

What is pageRank in graphX??

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

answered Jul 22, 2020 in Apache Spark by MD
• 95,460 points
1,167 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,460 points
3,778 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP