## Tinkering with multiple machine learning algorithms and methods to predict Google’s New York City Taxi Fare Prediction challenge.

In this article,i will be using different machine learning techniques to predict fare_amount.

Note: RMSE(Sq. root(mean_squared_error)) will be used to measure score for our model(s).

### Blueprint to Polynomial Regression

WTF is a polynomial?

polylinear. Adjective. (not comparable) (mathematics) Involving many linear functions.

Alright then,let’s get started!

• Import required libraries.
```# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd```
• import the data into a dataframe dataset.Slice the data into X and y.

### Face Feature(s) Detection with OpenCV

```import cv2

cap = cv2.VideoCapture(0)

while True:
ret, img = cap.read()
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x, y, w, h) in faces:
cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)
roi_gray = gray[y:y+h, x:x+w]
roi_color = img[y:y+h, x:x+w]

roi_gray,
scaleFactor=1.6,
minNeighbors=35,
minSize=(25, 25),
)

for (x, y, w, h) in smile:
print("Smile Detected")
cv2.rectangle(roi_color, (x, y), (x + w, y + h), (255, 255, 0), 2)

for (ex, ey, ew, eh) in eyes:
cv2.rectangle(roi_color, (ex, ey), (ex + ew, ey + eh), (0, 255, 0), 2)

cv2.imshow('img', img)
k = cv2.waitKey(30) & 0xff
if k == 27:
break

cap.release()
cv2.destroyAllWindows()```

^ The above script detects facial features such as face,eyes and smile.There are tons of pre-trained haarcascades available for OpenCV that you can use to detect objects such as Moving cars, traffic signs etc.