You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that i bump into some unknown mistake after i run the model and tried to display the result with p.plotBestModelResults(plotInitialConditions=True,indices=range(10));
I didn't get any plot back. Instead, it returned with
maxLogLikelihoodName: Warning: Only 9 of 9 fits have been performed.
maxLogLikelihoodName: bestIndex > maxIndex. Returning None.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-14-204fc9c0e868> in <module>
1 plt.figure(figsize=(20,2))
----> 2 a = p.plotBestModelResults(plotInitialConditions=True,indices=range(10));
3
4 for i in range(len(a[0])):
5 a[0][i].plot(RNAtheoreticalData[0], RNAtheoreticalData[1+i],linewidth=1)
~/SirIsaac/SirIsaac/fittingProblem.py in plotBestModelResults(self, modelName, maxIndex, verbose, **kwargs)
750 m = self.getBestModel(modelName=modelName,maxIndex=maxIndex,
751 verbose=verbose)
--> 752 return self.plotModelResults(m,**kwargs)
753
754
~/SirIsaac/SirIsaac/fittingProblem.py in plotModelResults(self, model, filename, indices, plotFittingData, outOfSampleData, **kwargs)
711
712 # plot model results
--> 713 plots = m.plotResults(fittingData,indepParamsList,
714 plotFittingData=plotFittingData,
715 outOfSampleData=outData,**kwargs)
AttributeError: 'NoneType' object has no attribute 'plotResults'
<Figure size 1440x144 with 0 Axes>
Sorry that this error message is not very clear. By default, SirIsaac does not return a "best" model until it has found 3 models with more parameters that have a lower Bayesian likelihood than the model with the maximum likelihood. The maxIndex argument controls this behavior (as you can read about in the documentation for the function maxLogLikelihoodName).
One way around this is to call plotBestModelResults with the keyword argument maxIndex=-1, which will plot the model with the maximum likelihood, without the check. Another way is to give it the keyword argument modelName with the name of the model you want to plot (e.g. modelName='Model 7'). The "best" thing to do is to increase the number of models to be fit until you find the peak in the Bayesian likelihood using the default maxIndex.
Hope that helps. Let me know if you have other questions.
bcdaniels
changed the title
bestIndex > maxIndex. Returning None.
"bestIndex > maxIndex. Returning None." error message should include more detail
Jun 15, 2023
Hi,Professor Daniels,
It seems that i bump into some unknown mistake after i run the model and tried to display the result with
p.plotBestModelResults(plotInitialConditions=True,indices=range(10));
I didn't get any plot back. Instead, it returned with
It seems that i run
successfully.
Could you give me any hint on what may go wrong and how to fix it?
Thank you for your time!
Sincerely,
Yu
A detailed code and error file is attached here:
mRNA-sigmoidal.pdf
The text was updated successfully, but these errors were encountered: