Cloud Computing for Science and Engineering by Ian Foster & Dennis B. Gannon

Cloud Computing for Science and Engineering by Ian Foster & Dennis B. Gannon

Author:Ian Foster & Dennis B. Gannon
Language: eng
Format: epub
Publisher: The MIT Press


The logistic regression model has appended several new columns to the data frame, including one called prediction. To test our prediction success rate, we compare the prediction column with the results column.

numSuccesses = predictionsDf.where(\

"""(prediction = 0 AND results = 'Fail') OR \

(prediction = 1 AND (results = 'Pass' OR \

results = 'Pass w/ Conditions'))""").count()

numInspections = predictionsDf.count()

print("There were %d inspections and there were %d predictions"\

%(numInspections,numSuccesses))

print("This is a %2.2f sucess rate"\

%(float(numSuccesses) / float(numInspections) * 100))



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.