Skip to content

Instantly share code, notes, and snippets.

View FedericoV's full-sized avatar

Federico Vaggi FedericoV

View GitHub Profile
@FedericoV
FedericoV / gist:6098092
Last active December 20, 2015 08:09
Build Attempt on Windows
D:\Coding Projects\sklearn\sklearn\feature_selection\selector_mixin.py:7: DeprecationWarning: sklearn.feature_selection.selector_mixin.SelectorMixin has been renamed sklearn.feature_selection.from_model._LearntSelectorMixin, and this alias will be removed in version 0.16
DeprecationWarning)
D:\Coding Projects\sklearn\sklearn\pls.py:7: DeprecationWarning: This module has been moved to cross_decomposition and will be removed in 0.15
"removed in 0.15", DeprecationWarning)
EE................FF...FFSS..............S..............................................E....E.................................SSS.........E.......................D:\Coding Projects\sklearn\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarning: Cannot inspect object <functools.partial object at 0x00000000084B5B88>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),
...................................................................................................................................
Volume in drive D is Storage
Volume Serial Number is C827-0D77
Directory of D:\Coding Projects\sklearn\sklearn\svm
07/28/2013 12:05 PM <DIR> .
07/28/2013 12:05 PM <DIR> ..
07/28/2013 11:16 AM 28,069 base.py
07/28/2013 11:41 AM 23,435 base.pyc
07/28/2013 11:16 AM 2,627 bounds.py
------------------------- OpenOpt 0.505 -------------------------
solver: ralg problem: unnamed type: DFP
iter objFunVal log10(maxResidual)
0 2.944e+06 0.60
Traceback (most recent call last):
File "/home/federico/Systems_Biology/Projects/p53_modeling/Code/dfp_2.py", line 34, in <module>
r = p.solve('nlp:ralg', plot=1, iprint = 10)
File "/home/federico/anaconda/lib/python2.7/site-packages/openopt-0.505-py2.7.egg/openopt/kernel/baseProblem.py", line 245, in solve
return runProbSolver(self, *args, **kwargs)
@FedericoV
FedericoV / gist:6592288
Last active December 23, 2015 06:09
Inference of Parameters of an Ordinary Differential Equation using SciPy and nlopt
import numpy as np
from scipy.integrate import odeint
from scipy.optimize import leastsq
import nlopt
def michelis_menten(y, t, *args):
Vmax = args[0][0]
km = args[0][1]
St = args[0][2]
P = y[0]
@FedericoV
FedericoV / gist:6607139
Created September 18, 2013 10:13
Assimulo and sensitivity
from assimulo.solvers import CVode
from assimulo.problem import Explicit_Problem
from scipy.integrate import odeint
from scipy.optimize import fmin_l_bfgs_b
import numpy as np
import nlopt
import matplotlib.pyplot as plt
@FedericoV
FedericoV / gist:6607867
Created September 18, 2013 11:30
Subclassing Explicit_Problem
from assimulo.solvers import CVode
from assimulo.problem import Explicit_Problem
import numpy as np
class MyProblem(Explicit_Problem):
def __init__(self, y0):
Explicit_Problem.__init__(self,y0=y0)
self.text = "Test"
#Define the rhs
@FedericoV
FedericoV / gist:6607904
Created September 18, 2013 11:34
Assimulo Experiments 3
from assimulo.solvers import CVode
from assimulo.problem import Explicit_Problem
import numpy as np
class MyProblem(Explicit_Problem):
def __init__(self, y0):
Explicit_Problem.__init__(self,y0=y0)
self.text = "Test"
#Define the rhs
@FedericoV
FedericoV / gist:6638875
Created September 20, 2013 15:02
Assimulo vs odeint comparison
exp_sim.iter = 'Newton'
exp_sim.discr = 'BDF'
exp_sim.rtol = 1e-4
exp_sim.atol = 1e-4
#exp_sim.pbar = [1,1,1] #pbar is used to estimate the tolerances for the parameters
exp_sim.report_continuously = True #Need to be able to store the result using the interpolate methods
exp_sim.sensmethod = 'SIMULTANEOUS' #Defines the sensitvity method used
exp_sim.suppress_sens = True
exp_sim.verbosity = 50
@FedericoV
FedericoV / gist:7132880
Created October 24, 2013 07:42
SymPy Autowrap generated function
!******************************************************************************
!* Code generated with sympy 0.7.3 *
!* *
!* See http://www.sympy.org/ for more information. *
!* *
!* This file is part of 'autowrap' *
!******************************************************************************
REAL*8 function autofunc(Gal, empty, fullbound_RE, fullbound_closed_RE, k_base_synt_p53, k_bindleft_p53_RE, k_bindright_p53_RE, k_deg_p53, k_max_synt_p53, k_sat_p53, k_transclosed, k_transhalf, k_transopen, k_unbindleft_p53_RE, k_unbindright_p53_RE, leftbound_RE, p53, rightbound_RE)
implicit none
@FedericoV
FedericoV / gist:7234206
Created October 30, 2013 15:06
Sample Notebook
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{