appel@cui.unige.ch (APPEL Ron) (02/07/91)
I am looking for a public domain program, doing the following: Given: a discrete representation of a hill shaped 2D curve, find: the best fitting gaussian curve. Thanks for giving me some pointers as to where I can find that program. #################################################################### Ron D. Appel e-mail: appel@cih.hcuge.ch Unite d'Imagerie Numerique Centre d'Informatique Hospitaliere Hopital Cantonal Universitaire de Geneve 24, rue Micheli-du-Crest ### CH-1211 Geneve 4 ######## Switzerland ############### tel.: 41-22-229254 ################### fax : 41-22-227073 ########################## ####################################################################
toms@fcs260c2.ncifcrf.gov (Tom Schneider) (02/12/91)
Sorry if this posting occurs twice. Something was odd about the listed newsgroups and I think it didn't go out the first time. In article <4907@cui.unige.ch> appel@cih.hcuge.ch (APPEL Ron) writes: >I am looking for a public domain program, doing the following: > >Given: a discrete representation of a hill shaped 2D curve, >find: the best fitting gaussian curve. > >Thanks for giving me some pointers as to where I can find that program. One solution that might help is to calculate the mean and standard deviation of your distribution. This immediately defines a gaussian which will fit your data. I don't know whether or not it is the best fitting curve (Hey Jeff Haemer: what do you say?? :-), but it obviously will fit the data very well if your data DO have a gaussian distribution! You can determine if your fit is good by a chi-square test between a histogram of your data and the gaussian from the mean and standard deviation. I have placed a program called genhis in an archive for you. You can obtain it by anonymous ftp from ncifcrf.gov in directory pub/delila. The program is in Pascal: genhis.p, and has an example parameter file: genhisp. (Both files are compressed, so are called genhis.p.Z and genhisp.Z in the archive.) The program probably can be automatically translated to C if you do not have a Pascal compiler. You give genhis raw numbers and it generates a histogram, calculates mean, standard deviation and makes a graph for you. It was written by Gary Stormo. Documentation is in comments in the program code itself. I use this tool all the time; it is extremely useful! >#################################################################### >Ron D. Appel e-mail: appel@cih.hcuge.ch >Unite d'Imagerie Numerique >Centre d'Informatique Hospitaliere >Hopital Cantonal Universitaire de Geneve >24, rue Micheli-du-Crest ### >CH-1211 Geneve 4 ######## >Switzerland ############### >tel.: 41-22-229254 ################### >fax : 41-22-227073 ########################## >#################################################################### Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov