Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
df = p_model.transform(image_df)
# 100930342_92e8746431_n.jpg not a daisy
df.select("image.origin",(1-take_one(df.probability)).alias("p_daisy")).show(truncate=False)
+---------------------------------------------------+--------------------+
|origin |p_daisy |
+---------------------------------------------------+--------------------+
|.../100930342_92e8746431_n.jpg |0.016760347798379538|
|.../10140303196_b88d3d6cec.jpg |0.9704259547739851 |
|.../100080576_f52e8ee070_n.jpg |0.9705190124824862 |
+------------------------------------------------------------------------+
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.