Team:Paris/Modeling/Implementation
From 2008.igem.org
(Difference between revisions)
(→Parameters Finder for our Example) |
(→Parameters Finder for our Example) |
||
Line 24: | Line 24: | ||
<html><pre class="codeinput"> | <html><pre class="codeinput"> | ||
- | <span class="keyword">function</span> optimal_parameters = find_FP(X_data, Y_data, initial_parameters) | + | <span class="keyword">function</span>optimal_parameters=find_FP(X_data,Y_data,initial_parameters) |
- | + | <span class="comment">%givesthe'bestparameters'involvedinf4,f5,f6,f7orf8 | |
- | </span><span class="comment">% | + | </span><span class="comment">%withFlhDC=0orFliA=0byleast-squareoptimisation |
- | + | </span> | |
- | <span class="comment">%X_data = | + | <span class="comment">%X_data=vectorofgivenvaluesof[FliA]ior[FlhDC]i(experimentally |
- | + | </span><span class="comment">%controled) | |
- | + | </span><span class="comment">%Y_data=vectorofexperimentallymeasuredvaluesf4,f5,f6,f7orf8 | |
- | + | </span><span class="comment">%correspondingoftheX_data | |
- | + | </span><span class="comment">%initial_parameters=valuesoftheparametersproposedbytheliterature | |
- | + | </span><span class="comment">%orsimplyguessed | |
- | + | </span><span class="comment">%=[beta,K->(K)/(coef),n] | |
- | + | </span> | |
- | + | <span class="keyword">function</span>output=expr_pProm(parameters,X_data) | |
- | + | <span class="keyword">for</span>k=1:length(X_data) | |
- | + | output(k)=parameters(1)*hill(X_data(k),parameters(2),parameters(3)); | |
- | + | end | |
- | + | end | |
- | + | ||
- | options = optimset(<span class="string">'LevenbergMarquardt'</span>,<span class="string">'on'</span>,<span class="string">'TolX'</span>,1e-10,<span class="string">'MaxFunEvals'</span>,1e10,<span class="string">'TolFun'</span>,1e-10,<span class="string">'MaxIter'</span>,1e4); | + | options=optimset(<span class="string">'LevenbergMarquardt'</span>,<span class="string">'on'</span>,<span class="string">'TolX'</span>,1e-10,... |
- | + | <span class="string">'MaxFunEvals'</span>,1e10,<span class="string">'TolFun'</span>,1e-10,<span class="string">'MaxIter'</span>,1e4); | |
- | + | <span class="comment">%optionsforthefunctionlsqcurvefit | |
- | optimal_parameters = lsqcurvefit( @(parameters, X_data) expr_pProm(parameters, X_data),... | + | </span> |
- | + | optimal_parameters=lsqcurvefit(@(parameters,X_data)expr_pProm(parameters,X_data),... | |
- | + | initial_parameters,X_data,Y_data,1/10*initial_parameters,10*initial_parameters,options); | |
- | + | <span class="comment">%searchforthefittestparameters,between1/10and10timestheinitial | |
- | + | </span><span class="comment">%parameters | |
- | <span class="keyword">end</span> | + | </span> |
+ | <span class="keyword">end</span> | ||
</pre></html> | </pre></html> |
Revision as of 23:00, 27 October 2008
Implementation
[Back to "Workflow on an Example"] We use Matlab for all implementations. Parameters Finder Programsthe datasThe experimental datas consist typically in two tables, X_data (various concentrations of the transcription factor) and Y_data (corresponding output values).
Parameters Finder for our ExampleWe just write here the annoted program find_FP that is used to estimate, for instance, the parameters in :
functionoptimal_parameters=find_FP(X_data,Y_data,initial_parameters) %givesthe'bestparameters'involvedinf4,f5,f6,f7orf8 %withFlhDC=0orFliA=0byleast-squareoptimisation %X_data=vectorofgivenvaluesof[FliA]ior[FlhDC]i(experimentally %controled) %Y_data=vectorofexperimentallymeasuredvaluesf4,f5,f6,f7orf8 %correspondingoftheX_data %initial_parameters=valuesoftheparametersproposedbytheliterature %orsimplyguessed %=[beta,K->(K)/(coef),n] functionoutput=expr_pProm(parameters,X_data) fork=1:length(X_data) output(k)=parameters(1)*hill(X_data(k),parameters(2),parameters(3)); end end options=optimset('LevenbergMarquardt','on','TolX',1e-10,... 'MaxFunEvals',1e10,'TolFun',1e-10,'MaxIter',1e4); %optionsforthefunctionlsqcurvefit optimal_parameters=lsqcurvefit(@(parameters,X_data)expr_pProm(parameters,X_data),... initial_parameters,X_data,Y_data,1/10*initial_parameters,10*initial_parameters,options); %searchforthefittestparameters,between1/10and10timestheinitial %parameters end |