This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the necessary packages | |
import argparse | |
import datetime | |
import imutils | |
import time | |
import cv2 | |
import collections | |
# construct the argument parser and parse the arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn.ensemble import GradientBoostingClassifier as GBC | |
import pandas as pd | |
import math | |
# Load training data | |
print('Loading training data.') | |
data_train = np.loadtxt( 'training.csv', delimiter=',', skiprows=1, converters={32: lambda x:int(x=='s'.encode('utf-8')) } ) | |
# Pick a random seed for reproducible results. Choose wisely! |