| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> hm <1> the yield statement is basically exactly such a facility, except it returns a generator, and I need a list. <1> `Cinder`: have you looked at /Dive into Python/? <0> not yet Oo <1> diveintopython.com, if I remember right. <0> i've been looking for a downable version of does Guido's python tutorial <1> there's also python.org/doc/tut, the excellent brief tutorial. <1> oh, let's see... <2> davidmccabe: the yield statement returns the next value in the sequence, not a generator <0> .org, you were close :P <1> Loge: well, you know what I mean. <3> http://sportsbybrooks.com/maui18.jpg z- un cangrejo! <1> http://docs.python.org/download.html <3> damn chanel switching <3> :P <1> there's your download, `Cinder`.
<3> nevermind that, python rox <1> ouch. that page hasn't been updated to the new look and feel. <1> it has broken links, too :( <0> aw <0> lol <1> `Cinder`: the website has just been overhauled. appearently there's some mess yet from that. <0> icic <0> well thanks david (and everyone else), i'll be back in a bit just have some reading to do ^^ <4> davidmccabe: what's wrong with list(somegenerator()) <5> anyone know where to look if i want to minimize the value of a function that takes 4 parameters? <6> emes: What do you mean by "minimize the value of a function"? <5> f(a,b,c,d) returns a float > 0, i want to find the a,b,c,d that produces the lowest value <1> I think maybe he means "find the values of the parameters that will yield the lowest return value for the function". <1> emes: you pull out your old calculus textbook. python is not a CAS. <2> emes: sniff around http://scipy.org/ <5> davidmccabe: i'm 16, i don't have an old calculus textbook :) <1> oh, bummer. <1> emes: do you want to do it for one particular function, or do you want your program to do it for functions in general? <4> in the general case that's a very hard problem <6> Why not change the function to take *args, and use min() <1> TML: reread the question. <5> aren't there libraries that do this? <5> i'm not looking to do the calculus <4> TML: he doesn't want min(a,b,c,d), he wants the best a,b,c,d to get small values for f(a,b,c,d) <6> davidmccabe: Clearly I missed something. :) <6> oh <1> emes: it's an analytic problem. solving it programmatically is extremely hard. <4> emes: not really, because as I said, it's very difficult in general. If your functions can be restricted (e.g. linear only) it gets much easier <1> the folks on #math might be of more help. <1> what kind of function is it? <5> logistic <7> is there a way to get the python ini file thingy to not put the things back in the file in random order <5> well <5> ((a/(1+b*exp(c*x[i])) + d)-y[i])^2 <5> to be exact <1> ah, ok. <1> so it isn't reading from a database or something ;P <5> i don't care if the computer has to keep cycling for 10 minutes before it finds the answer <1> oh, so you want to just brute force it? <2> Monte Carlo sim might be an option <5> that would work <1> that's easy, but it comes with no guaranties. <1> there might be minimums outside of the range of values you test. you can't be sure without doing some algebra on it. <5> i don't have a range of values to test <1> if you know the range of reasonable values, then brute force will work. <5> well, actually i do <1> is the function continuous? <5> for a,b and d <1> but it's not continous for c? <4> he has ranges for a,b, and d <4> but not c <5> c could be a very large number <1> or you don't have a reasonable range for c? <1> oh. <1> if you don't have a range of reasonable numbers, you have to use analysis. a computer (short of something like mathematica which does the analysis for you) can only find it by testing values, but it can't test an infinite number of values. <4> well, if c is very large, and b is positive, then the function reduces to (d-y[i])^2 which is fairly easy to minimize <1> what I want to know is whether it's continuous. <1> what is y[i]? <4> davidmccabe: for any particular query, a constant, if I'm reading it right <5> hmm <1> oh. then it's just a parabola. you can minimize that with high school algebra.
<8> Do you have a lot of different (x,y) pairs that you want to fit simultaneously? <4> e.g. he has a list of points x,y for which he wants to get minimums a/b/c/d <5> i should have said that i'm summing from i = 0 to n ((a/(1+b*exp(c*x[i])) + d)-y[i])^2 <1> ahhh. <4> still, in that case you minimize the terms <5> where n is the number of data points <9> hello <4> so you can treat (i.e. minimize) each data point separately <5> maybe i should just call up my friend with a TI-89 and ask him to do it :P <1> nah. you'll learn more if you don't. <8> WalterMundt, I think he wants to choose one (a,b,c,d) and use the same values for all (x[i], y[i]) pairs... this looks like a chi-squared fit, I think. <4> heatsink: ahha, possibly true <8> except it's not normalized. <1> emes: the people on #math are wonderful. <5> davidmccabe: problem is I don't have time :( <10> I just installed FC-4 last night. It only has Python 2.4.1 on it <10> if only ISO <10> 's could be updated before you download 'em :) <5> RadSurfer: try a distribution that starts by installing the latest version :P <10> I wanted FC-4 I <10> I've heard lots of good things about it. <10> Whats the proper procedure of putting scripts in my PATH so they can be launched directly? <1> put them in your PATH. <11> RadSurfer, http://www.python.org/download/releases/2.4.3/rpms/ <--- these are actually for 2.4.2, but stay tuned <11> RadSurfer, sources for 2.4.3: http://www.python.org/download/releases/2.4.3/ <10> thank you. <12> hm. slashdot.org has gone off the deepend. <10> now what? <10> not the dreaded 3 0... yikes <10> can do without that queer pink <11> 3 0? <10> birthday on Slashdot <10> this is interesting: 1st hd-dvd now on sale. <10> so glad I'm using Linux again. <13> Jerub: it's an April Fools joke :) <13> Jerub: but /. seems like that everyday <10> wonder if thats true: <10> " Our marketing department has done extensive research over the last 3 quarters and discovered that our audience is strangely disproportionately skewed towards males. Like, 98.3% males to be precise." <10> I dont think most males would like their current motif <14> hey guys <14> does anyone know of a good curve fit package? <14> basically, I need something to help me identify changes in trends in data <15> dweb: http://users.rcn.com/python/download/matfunc.htm <14> pythy I'll check it out <13> RadSurfer: what distro you using ? <15> dweb: "polyfit(points, degree) and ratfit(points, degree) create polynomial and rational polynomial approximations (curve-fits) of the specified degree (defaults to 2) for a given set of x,y values" <16> I built a python module using swig that uses some minutes to calculate some data. Now I do a wxpython GUI for it. How can I run it as a background process? I think then I could somehow access a global variable from the C function to display a progress bar. Is this possible somehow? <16> Using daemon() in the C function? <17> does anybody knows how to do something when I implement copy action in windows? <14> pythy, how would I know which degree to use? <15> Personally, I try to avoid the third degree. <14> pythy, so what's the most likely degree for finding turning points in a trend <15> "does anybody knows how to do something when I implement copy action" > kode4u: Sure! Just let me know when you implement it, and I can think of several things I can do. <15> dweb: Try the third degree. <17> Pythy, I wanna replace `\r\n` in the text which in clipboard to `,`, I'v known how to control clipboard, but I still wanna my python script can keep track of system copy event, so that I do not need to 'copy -> run script -> copy run script...' <15> kode4u: You can run it in the background, and have it poll the clipboard, looking for text containing any \r\n's <14> Pythy, ok <17> Pythy, I'v done that. I just dont know how to do something when I copy something. <14> what do people use as an ide for windows these days? <14> I used to be only a linux user <14> I haven't programmer on windows before... <14> programmed <15> I use a bare-bones program called Leo: http://webpages.charter.net/edreamleo/front.html <17> Pythy, could you help me? <15> I just did. <15> Kode4u: Whenever you copy some text containing \r\n's to the clipboard---from any application, not just that Python application---it will be noticed & changed by the Python program. <17> Pythy, Hmmm, sorry I still can't understand your mean. Could send me some examples or documents? <15> kode4u: Which part was unclear to you? <18> i if have a catch all exceptions block, where would i get the type and details of the exception it caught <15> except ValueError, err_o: print err_o.__cl***__.__name__, err_o, err_.args <15> except ValueError, err_o: print err_o.__cl***__.__name__, err_o, err_o.args <17> Pythy, Could you receive my script file? I need to do sth when i copy sth in MS Windows enviroment. You'v given me any advice about the matter? <15> ?>minipasteit@kode4u
Return to
#python or Go to some related
logs:
mp3support xmms #linux PORTAGE_BINHOST binhosts #sdl #math #kernel #web #math #web autofs suse (files nis does not provide any mounts
|
|