Skip to content

Instantly share code, notes, and snippets.

Working from home

Julien-Charles Lévesque jclevesque

Working from home
View GitHub Profile
View least_rectangle_regression.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
# import the necessary packages
import argparse
import datetime
import imutils
import time
import cv2
import collections
# construct the argument parser and parse the arguments
jclevesque /
Created Oct 17, 2014
Python wrapper for budgeted svm toolbox
# -*- coding: utf-8 -*-
import os
import re
import subprocess
class BudgetSVMToolbox:
Wrapper around the budgetsvm library as provided by the its authors.
Requires two executables, budgetsvm-train and budgetsvm-predict.
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!