Skip to content

Commit

Permalink
Removed need for user to write a config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
duvenaud committed Apr 1, 2013
1 parent a802709 commit f29549f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -58,7 +58,6 @@ latex/*.pdf

*~

config.py
temp/
sexy_results/
sandpit/
Expand All @@ -67,6 +66,7 @@ scratch/
source/temp.m
source/temp_data.mat
source/.metadata/
source/cblparallel/config.py
.metadata/
Link to source
test_results/
Expand Down
14 changes: 14 additions & 0 deletions source/config.py
@@ -0,0 +1,14 @@


#MATLAB_LOCATION = "/misc/apps/matlab/matlabR2011b/bin/matlab"
MATLAB_LOCATION = "matlab"
#GPML_PATH = '/home/dkd23/fear_gpml/'
GPML_PATH = 'gpml/'
COLOR_SCHEME = 'dark'
USERNAME = 'dkd23'
#LOCATION = 'local'
REMOTE_GPML_PATH = '/home/mlg/dkd23/fear_gpml/'
RESULTS_PATH = '/scratch/gpss_raw_results'
LOCAL_TEMP_PATH = '/home/dkd23/git/gp-structure-search/temp'
REMOTE_TEMP_PATH = '/users/dkd23/temp'
D1_RESULTS_PATH = '/scratch/Dropbox/results/8-Feb 1d-scaled-definitive/'
6 changes: 3 additions & 3 deletions source/experiment.py
Expand Up @@ -14,6 +14,7 @@
nax = np.newaxis
import os
import random
import re
import scipy.io

import flexiblekernel as fk
Expand All @@ -23,10 +24,9 @@
import utils.latex
import cblparallel
from cblparallel.util import mkstemp_safe
from config import *
import job_controller as jc # This might be a good, if hacky, place to switch to an MIT controller.
import job_controller as jc
import utils.misc
import re


PERIOD_HEURISTIC = 10; # How many multiples of the smallest interval between points to initialize periods to.
FROBENIUS_CUTOFF = 0.01; # How different two matrices have to be to be considered different.
Expand Down
8 changes: 4 additions & 4 deletions source/postprocessing.py
Expand Up @@ -22,7 +22,7 @@
import re


def parse_all_results(folder=config.D1_RESULTS_PATH, save_file='kernels.tex', one_d=False):
def parse_all_results(folder, save_file='kernels.tex', one_d=False):
"""
Creates a list of results, then sends them to be formatted into latex.
"""
Expand All @@ -42,7 +42,7 @@ def parse_all_results(folder=config.D1_RESULTS_PATH, save_file='kernels.tex', on
utils.latex.table(''.join(['../latex/tables/', save_file]), rownames, colnames, entries)


def gen_all_results(folder=config.RESULTS_PATH):
def gen_all_results(folder):
"""Look through all the files in the results directory"""
file_list = sorted([f for (r,d,f) in os.walk(folder)][0])
#for r,d,f in os.walk(folder):
Expand All @@ -53,7 +53,7 @@ def gen_all_results(folder=config.RESULTS_PATH):
yield files.split('.')[-2], best_tuple


def make_all_1d_figures(folder=config.D1_RESULTS_PATH, save_folder='../figures/decomposition/', max_level=None, prefix='', rescale=True):
def make_all_1d_figures(folder, save_folder='../figures/decomposition/', max_level=None, prefix='', rescale=True):
"""Crawls the results directory, and makes decomposition plots for each file.
prefix is an optional string prepended to the output directory
Expand Down Expand Up @@ -99,7 +99,7 @@ def make_all_1d_figures(folder=config.D1_RESULTS_PATH, save_folder='../figures/d
else:
print "Cannnot find file %s" % results_file

def make_all_1d_figures_all_depths(folder=config.D1_RESULTS_PATH, max_depth=10, prefix=''):
def make_all_1d_figures_all_depths(folder, max_depth=10, prefix=''):
make_all_1d_figures(folder=folder)
for level in range(max_depth+1):
make_all_1d_figures(folder=folder, max_level=level, prefix=prefix)
Expand Down

0 comments on commit f29549f

Please sign in to comment.