09.10.2023 Views

Advanced Data Analytics Using Python_ With Machine Learning, Deep Learning and NLP Examples ( 2023)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7

Analytics at Scale

for future in as_completed(future_

array):

if self.big:

howbig1, pred1,

prob1,pred_big1,prob_

big1 = future.result()

pred = pred + pred1

pred_big = pred_big +

pred_big1

prob = prob + prob1

prob_big = prob_big +

prob_big1

howbig = howbig +

howbig

else:

pred1, prob1 = future.

result()

pred = pred + pred1

prob = prob + prob1

if self.big:

if howbig > .65:

pred, prob = pred_big, prob_

big

resp.status = falcon.HTTP_200

res = math.exp(pred)-1

if res < 0.1:

res = 0.1

if prob < 0.1 :

prob = 0.1

177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!