Skip to content

Instantly share code, notes, and snippets.

View mbednarski's full-sized avatar

Mateusz Bednarski mbednarski

View GitHub Profile
from __future__ import print_function, division
import random
import numpy as np
import gym
import time
from sklearn.neighbors import NearestNeighbors
import logging
from __future__ import print_function, division
import itertools as iter
import random
import numpy as np
import gym
import time
from sklearn.neighbors import NearestNeighbors
from __future__ import print_function, division
import itertools as iter
import random
import numpy as np
import gym
from gym import wrappers
from sklearn.kernel_approximation import RBFSampler
from __future__ import print_function, division
import gym
import numpy as np
import matplotlib as plt
import logging
import matplotlib.pyplot as plt
logging.disable(logging.CRITICAL)
np.seterr('raise')
from __future__ import print_function, division
import gym
import numpy as np
import matplotlib as plt
import logging
import matplotlib.pyplot as plt
logging.disable(logging.CRITICAL)
np.seterr('raise')
from __future__ import print_function, division
import gym
import numpy as np
import matplotlib as plt
import logging
import matplotlib.pyplot as plt
logging.disable(logging.CRITICAL)
import click
import pandas as pd
def get_featues(dframe):
return dframe[['x0', 'x1', 'x2', 'x3']]
def get_label(dframe):
return dframe['y']
import click
import matplotlib
matplotlib.use('agg')
import seaborn as sns
import sys
sys.path.append('src')
from src.data import read_raw_data, preprocess_data, get_featues, get_label
def test_raw_shape():
dframe = read_raw_data()
assert dframe.shape == (150, 5)
def test_get_features_shape():
dframe = read_raw_data()
import pickle
import sys
from sklearn.ensemble import RandomForestClassifier
sys.path.append('src')
from data import get_featues, get_label