Hi Edward,
Once I figure out how to print the AIC and k values, I will send them
along. If you have a script example of this, it will save me some
time [I've been working on this for an hour or so now without any luck].
Doug
On Jun 25, 2007, at 9:01 AM, Edward d'Auvergne wrote:
> Hi,
>
> Would you be able to print the AIC and k values as well? k is the
> number of parameters in the model. The places where the chi-squared
> value increases rather than decreases is because of a collapse in
> model complexity. If you plot the chi2, AIC, and k values verses
> iteration number, like I did in my thesis in figures 7.3 and 7.4
> (http://eprints.infodiv.unimelb.edu.au/archive/00002799/), you'll see
> what is happening there. The plots should help in figuring out
> exactly what is happening.
>
> Regards,
>
> Edward
>
>
> On 6/25/07, Douglas Kojetin <douglas.kojetin@xxxxxxxxx> wrote:
>> Update: I figured out the problem. I needed to use the 'opt'
>> directory for the results.read() call, not 'aic':
>>
>> #--start of GOOD code
>> import glob
>> runs = glob.glob('prolate/round_*')
>>
>> # Loop over the runs.
>> for name in runs:
>> print name
>> run.create(name, 'mf')
>> results.read(run=name, file='results', dir=name+'/opt')
>> chisq=self.relax.data.chi2[name]
>> print "%s: %1.10f" % (name, chisq)
>> #--end
>>
>> Here is the list of chi2 values. I used 30 decimal points for the
>> chi2 values -- let me know if you would like something different.
>>
>> """
>> prolate/round_1: 785.330531871414336819725576788187
>> prolate/round_2: 786.656854782415166482678614556789
>> prolate/round_3: 784.104495289329975094005931168795
>> prolate/round_4: 783.543316702498373160779010504484
>> prolate/round_5: 786.500523476859029869956430047750
>> prolate/round_6: 784.433290432082458210061304271221
>> prolate/round_7: 786.264734828735640803643036633730
>> prolate/round_8: 785.887140331052023611846379935741
>> prolate/round_9: 785.887140331170371609914582222700
>> prolate/round_10: 785.887140331282466831908095628023
>> prolate/round_11: 785.887140331283262639772146940231
>> prolate/round_12: 785.887140331282807892421260476112
>> prolate/round_13: 785.887140331283376326609868556261
>> prolate/round_14: 785.887140331282921579258982092142
>> prolate/round_15: 785.887140331282353145070374011993
>> prolate/round_16: 785.887140331283262639772146940231
>> prolate/round_17: 785.887140331052364672359544783831
>> prolate/round_18: 785.887140331284172134473919868469
>> prolate/round_19: 785.887140331283262639772146940231
>> prolate/round_20: 785.887140331282694205583538860083
>> prolate/round_21: 785.887140331284967942337971180677
>> prolate/round_22: 785.887140331337491261365357786417
>> prolate/round_23: 785.887140331283944760798476636410
>> prolate/round_24: 785.887140331283376326609868556261
>> prolate/round_25: 785.887140331282921579258982092142
>> prolate/round_26: 785.887140331282353145070374011993
>> prolate/round_27: 785.887140331283262639772146940231
>> prolate/round_28: 785.887140331052364672359544783831
>> prolate/round_29: 785.887140331284172134473919868469
>> prolate/round_30: 785.887140331283262639772146940231
>> prolate/round_31: 785.887140331282694205583538860083
>> """
>>
>>
>> On Jun 25, 2007, at 3:10 AM, Edward d'Auvergne wrote:
>>
>> > On 6/25/07, Douglas Kojetin <douglas.kojetin@xxxxxxxxx> wrote:
>> >> Hi Edward,
>> >>
>> >> I'm trying to write a script to calculate the chisq values for
>> each
>> >> of the prolate rounds, but I'm having some trouble as I'm not 100%
>> >> familiar with the relax subroutines.
>> >
>> > Your code is almost there. I think I know where the script failed
>> > though.
>> >
>> >
>> >> #--start
>> >> import glob
>> >> runs = glob.glob('prolate/round_*')
>> >>
>> >> # Loop over the runs.
>> >> for name in runs:
>> >> name=name+'/aic'
>> >> run.create(name, 'mf')
>> >> results.read(name)
>> >
>> > This should all be ok.
>> >
>> >> chi2=self.relax.data.chi2[run]
>> >
>> > Here the 'run' variable should be replaced by 'name'.
>> >
>> >
>> >> print "%s: %1.20f" % (name, chi2)
>> >>
>> >> #--end
>> >
>> > This should also work.
>> >
>> >
>> >> But this does not seem to work. Can someone help me with the
>> proper
>> >> code to extract chisq values from multiple runs?
>> >
>> > If the script fails with the fix, would you be able to attach a
>> print
>> > out of the error message to help in solving where the script
>> failed?
>> >
>> > Cheers,
>> >
>> > Edward
>>
>>