Question


[Question 4, 8 points total, including 4.1 - 4.3] This question is about understanding data representation and input/output i
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

In Spark we've many forms of vectors to represent the string in

For this example it can be sparse(8, [1,4,5], [0.871, 1.0, 0.447]) it has a size of 8, [1,4,5] represent the indices, the rest represent the values which are non-zero

It means that the vector has

0.871 at 1st position

1.0 at 4th position

0.447 at 5th position

2.

It's helpful in computation and storage management. Such a string is used to provide clear reference.

3.

The constructor MatrixEntry represents ith row and jth column and it's corresponding value of that entry

109 is row

385 is column

0.032109 is the value/entry

row and column are of type long

value is of type double

Hence this represents to enter that particular value in a matrix which is distributed at ijth position.

comment for any clarifications!

Add a comment
Know the answer?
Add Answer to:
[Question 4, 8 points total, including 4.1 - 4.3] This question is about understanding data representation...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT