Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# create a sample data without the labels
sample_data_test = spark.createDataFrame([
(3.0, 'Z', 'S10', 40),
(1.0, 'X', 'E10', 20),
(4.0, 'A', 'S20', 10),
(3.0, 'A', 'S10', 20),
(4.0, 'X', 'D10', 30),
(1.0, 'Z', 'E10', 20),
(4.0, 'A', 'S10', 30),
], ['feature_1', 'feature_2', 'feature_3', 'feature_4'])
# transform the data using the pipeline
sample_data_test = model.transform(sample_data_test)
# see the prediction on the test data'features', 'rawPrediction', 'probability', 'prediction').show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.