def test_delete_experiment():
    """ Delete experiment should remove the experiment from the server. """

    name = 'test ' + str(time())
    scientist = whetlab.Experiment(access_token=default_access_token,
                                   name=name,
                                   description=default_description,
                                   parameters=default_parameters,
                                   outcome=default_outcome)

    scientist.update({'p1': 5., 'p2': 1}, 5)

    # Delete experiment
    whetlab.delete_experiment(name, default_access_token)

    # Should now be possible to create an experiment with the same name
    scientist = whetlab.Experiment(access_token=default_access_token,
                                   name=name,
                                   description=default_description,
                                   parameters=default_parameters,
                                   outcome=default_outcome)

    # Re-deleting it
    whetlab.delete_experiment(name, default_access_token)
def test_delete_experiment():
    """ Delete experiment should remove the experiment from the server. """
    
    name = 'test ' + str(time())
    scientist = whetlab.Experiment(access_token=default_access_token,
                                   name=name,
                                   description=default_description,
                                   parameters=default_parameters,
                                   outcome=default_outcome)
    
    scientist.update({'p1':5.,'p2':1},5)

    # Delete experiment
    whetlab.delete_experiment(name,default_access_token)

    # Should now be possible to create an experiment with the same name
    scientist = whetlab.Experiment(access_token=default_access_token,
                                   name=name,
                                   description=default_description,
                                   parameters=default_parameters,
                                   outcome=default_outcome)
    
    # Re-deleting it
    whetlab.delete_experiment(name,default_access_token)
def teardown_function():
    whetlab.delete_experiment('test_experiment', default_access_token)
def setup_function():
    try:
        whetlab.delete_experiment('test_experiment', default_access_token)
    except:
        pass
 def teardown(self):
     try:
         whetlab.delete_experiment(self.name, default_access_token)
     except:
         pass
 def teardown(self):
   try:
     whetlab.delete_experiment(self.name,default_access_token)
   except:      
     pass
def teardown_function():
    whetlab.delete_experiment('test_experiment',default_access_token)
def setup_function(): 
    try:
      whetlab.delete_experiment('test_experiment',default_access_token)
    except:      
      pass
from sklearn.datasets import fetch_mldata
data_set = fetch_mldata('yahoo-web-directory-topics')

train_set = (data_set['data'][:1000],data_set['target'][:1000])
validation_set = (data_set['data'][1000:],data_set['target'][1000:])

parameters = { 'C':{'min':0.01, 'max':1000.0,'type':'float'},
               'degree':{'min':1, 'max':5,'type':'integer'}}
outcome = {'name':'Classification accuracy'}
access_token = None # Either replace this with your access token or put it in your ~/.whetlab file.

import whetlab

# First remove this experiment if it already exists.
try:
    whetlab.delete_experiment("Web page classifier", access_token)
except:
    pass
scientist = whetlab.Experiment(access_token=access_token,
                               name="Web page classifier",
                               description="Training a polynomial kernel SVM to classify web pages.",
                               parameters=parameters,
                               outcome=outcome)

job = scientist.suggest()
from sklearn import svm
learner = svm.SVC(kernel='poly',**job)
learner.fit(*train_set)
accuracy = learner.score(*validation_set)
scientist.update(job,accuracy)
scientist.report()
Example #10
0
        'type': 'float'
    },
    'degree': {
        'min': 1,
        'max': 5,
        'type': 'integer'
    }
}
outcome = {'name': 'Classification accuracy'}
access_token = None  # Either replace this with your access token or put it in your ~/.whetlab file.

import whetlab

# First remove this experiment if it already exists.
try:
    whetlab.delete_experiment("Web page classifier", access_token)
except:
    pass
scientist = whetlab.Experiment(
    access_token=access_token,
    name="Web page classifier",
    description="Training a polynomial kernel SVM to classify web pages.",
    parameters=parameters,
    outcome=outcome)

job = scientist.suggest()
from sklearn import svm
learner = svm.SVC(kernel='poly', **job)
learner.fit(*train_set)
accuracy = learner.score(*validation_set)
scientist.update(job, accuracy)