PySpark MCQ Solution - Part 2

PySpark MCQ Solution Part2

PySpark MCQ Solution Part2

1. The syntax given alongside is of a Binary Literal in PySpark SQL. What does the parameter num represent here?
X { 'num [ ... ]' | "num [ ... ]" }
A.Any hexadecimal number from 0 to F (correct)
B.Any integer from 0 to 9
C.Any integer from -1 to 9
D.None of these

 2. Which of these is the correct way to use a Date Literal in PySpark SQL:

  1. SELECT DATE '1997' AS col;
  2. SELECT DATE '1997-01-20' AS col;
  3. SELECT DATE '1997-01' AS col;

A.1
B.2
C.3
D.All of these (correct)

3. Which of the following can you use to process data using PySpark SQL:

  1. PySQL
  2. SQL
  3. HiveQL

a.1
b.2
c.3
d.2 and 3 (correct)

 4. You are training a K-means clustering model in PySpark 2.4.4. Which of the following parameters can be used to control the distance threshold within which a center is considered to have converged?

a.maxIterations
b.k
c.epsilon (correct)
d.seed

5. You are using the following PySpark method to perform an online update of centroids while working with a clustering model. What is the appropriate value of the decay factor to ensure that during the update, the weighted mean of the previous and new data is considered:
Method

StreamingKMeansModel(clusterCenters, clusterWeights)
a.-1
b.0
c.1 (correct)
d.2

PySpark MCQ Solution Part 2

Post a Comment

Post a Comment (0)

Previous Post Next Post