Skip to content

Update Lab 2 - RDD, DataFrame, ML pipeline, and parallelization.md #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lab 2 - RDD, DataFrame, ML pipeline, and parallelization.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ Starting from this lab, you need to use *as many DataFrame functions as possible
### Logistic regression for document classification

5. Construct another test dataset for the [machine learning pipeline for document classification example](#example-machine-learning-pipeline-for-document-classification) with three test document samples: `"pyspark hadoop"`; `"spark a b c"`; `"mapreduce spark"` and report the prediction probabilities and the predicted labels for these three sample.
[Answer:
(4, spark hadoop) --> prob=[0.8551194341387968,0.14488056586120324], prediction=0.000000
(5, spark a b c) --> prob=[0.017552839599023443,0.9824471604009766], prediction=1.000000
(6, mapreduce spark) --> prob=[0.8551194341387968,0.14488056586120324], prediction=0.000000]

## 5. Additional ideas to explore (*optional*)

Expand Down