This file contains hidden or 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 | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
def smooth(scalars, weight): | |
last = scalars[0] | |
smoothed = list() | |
for point in scalars: | |
smoothed_val = last * weight + (1-weight)*point |
This file contains hidden or 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
''' | |
Convert videos to .gif files. | |
@date: 28.02.2018 | |
@author: Todor Davchev | |
''' | |
import argparse | |
import os |
This file contains hidden or 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
class QPoptimizer(object): | |
def __call__(self, feature_num, learner, expert): | |
w = cp.Variable(feature_num) | |
obj_func = cp.Minimize(cp.norm(w)) | |
constraints = [(expert-learner) @ w >= 2] | |
prob = cp.Problem(obj_func, constraints) | |
prob.solve() |
This file contains hidden or 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
for t in range(T): | |
exp_feat += gamma**t * (trajectory[t, :] - goal)**2 |
OlderNewer