|
Paul Conrad wrote: I agree. Interesting project idea, nonetheless.
Yes, looks like he's shooting for a Mathematica-type app. Very interesting, but quite involved - not sure if it's a single programmer project.
|
|
|
|
|
73Zeppelin wrote: looks like he's shooting for a Mathematica-type app
Sounds like it.
73Zeppelin wrote: Very interesting, but quite involved - not sure if it's a single programmer project.
Yep. It would be a pretty ambitious project to do by oneself.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
No, it's a team work, we are working on a new math project,
we need to do this
www.logicsims.ir
|
|
|
|
|
I'm not expecting a wodge of code handed to me on a plate (though I won't say no...), more of a string hint on where to go looking.
I have a set of data points (successive Y values evenly spaced along the X axis). This is crudely a flat line of 0, with a bump part of the way a long, and then some noise added. The bump could well have a flat top to it.
By eye, it's easy to work out where the peak of the underlying curve should be, but a lot less easy to just grab a crude maximum value and expect it to be useful.
From experience, the curve is pretty close to a gaussian that someone has sliced the top off of. I'm trying to find some method of writing / reusing / blatantly stealing a black box function I can give a series of Y values, and get the parameters (centre X, magnitude and 'sharpness') of a gaussian curve.
Can you give me any pointers to useful web pages you've found?
I'm not averse to writing my own, wiggling values and doing fit comparisons, but I'm sure someone made a wonderful algorithm with three names in the 70s that would be vastly superior.
Iain.
|
|
|
|
|
What about least squares?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
looking for something a leeeeeeeeettle more clever!
Iain.
|
|
|
|
|
Well, I never thought (never, in my naive life ) least squares weren't clever. It's traditional, old-fashioned statistics, I know, but it does its job.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I owe the inventors of least squares an apology - it is clever. But it is only a method for determining how good a fit your function is to the data - it only indirectly helps you get that function.
There's nothing wrong with good old fashioned stats, but I'm looking for something more along the lines of the nice algorithm for working out a convex hull. One of those "oh, that's neat, and about a million times faster than me throwing brute force PC guesswork at the problem".
Well, maybe I'll invent that cunning method, and retire to a comfy slippered life as a CS professor.
Iain.
|
|
|
|
|
Iain Clarke wrote: But it is only a method for determining how good a fit your function is to the data - it only indirectly helps you get that function.
It actually helps to find the parameters of the function, but you should make a 'a priory' (as already pointed out by 73Zeppelin) hypothesis about it. I supposed (wrongly) you were pretty confident it was a Gaussian shape.
Iain Clarke wrote: Well, maybe I'll invent that cunning method, and retire to a comfy slippered life as a CS professor.
Good luck, Prof.Clarke (it sounds good)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try non-parametric kernel density estimation to fit it. That way you don't have to assume a distribution a priori.
Link[^]!
|
|
|
|
|
looks promising... just need to change my question to how to do that! (or read more...)
Iain.
|
|
|
|
|
Hi Iain,
Kernel density estimation is not as complicated as it sounds. You just need the two functions from the Wikipedia article I linked to. The real problem is the choice of bandwidth, h. You can actually adjust this manually - algorithms for calculating h based on your sample can be more complicated than the density estimation itself. I always adjust h by hand (well, in most cases!).
|
|
|
|
|
Well, I'll be writing myself a dialog app with some self generated data later, and I'll see how well I've absorbed that page!
Should wake my brain up at the very least!
Iain.
|
|
|
|
|
If you need help, post here. I keep checking this forum.
|
|
|
|
|
PLZ SEND CODE. URGENTZ!!!!
Iain.
|
|
|
|
|
|
Dear All,
i have a list of edges like
(0,0),(2,0)
(2,3),(3,4)
(2,0),(2,2)
(0,0),(1,5)
(1,5),(1,10)
(3,4),(3,10)
(2,3),(1,5)
(3,4),(4,0)
(1,10),(3,10)
If you draw these edges on a Cartesian coordinate system, you visually see 3 polygons.
In mapping applications, a polygon is defined by a continuous, closed set of data points. So, output required is a a list like this.
(0,0),(2,0),(2,3),(1,5),(0,0)
(2,0),(4,0),(3,4),(2,3),(2,0)
(2,3)(3,4),(3,10),(1,10),(1,5),(2,3)
Can you please guide me how to????
Simplifying, i need to have Voronoi polygons around my points. Voronoi algorithms gave me the list of edges, but i am unable to get polygons from those edges.
Hope some one can guide!!!
|
|
|
|
|
Do you know a priori how many sides each polygon has?
Also, is this an ordered list?
|
|
|
|
|
we dont know about the no of sides, each polygon has different no of sides
what is meant by ordered list in this case? the list is totally random, just a list of all the edges, no ordering at all.
Thanks for looking into this!
ANY IDEA NOW?
|
|
|
|
|
furqan_sindhu wrote: what is meant by ordered list in this case? the list is totally random, just a list of all the edges, no ordering at all.
This is what I was trying to understand when I asked about an ordered list. If all the points are simply in a random list, how can you possibly reconstruct the polygons based only on a list of random points? The problem is that polygons can take on complicated shapes, so you need to know something about number of sides and/or which points should belong to which polygons. At the very minimum, the points should be ordered according to which polygon they belong to. Is there no way of doing this? Can't you create a polygon class that contains a list of points, for example?
|
|
|
|
|
You might want to check in "Algorithms" by Robert Sedgewick, published by Addison-Welsley. He has several algorithms, including "Convex Hull" and "Voronoi" for solutions for these problems.
Dave.
|
|
|
|
|
I'm not familiar with the book or the algorithms, but I don't think he's trying to construct the convex hull. I think he's got a randomized list of polygon edges for separate polygons and he's trying to reconstruct the component polygons from the list. A convex hull can certainly be determined given the points, but I'm not convinced that's what he wants to do.
|
|
|
|
|
My reply was more directed to his statement that he didn't know what to do with his Voronoi edges. In addition, his stated edges do NOT form three polygons. There are two missing edges one between 2,2 and 2,3, and the other between 2,0 and 4,0, both of which he filled in in the case of the polygon descriptions. He is forming a convex hull with enclosed polygons. He also probably wants to split up the polygons into triangles, but that is another topic.
Dave.
|
|
|
|
|
So the list isn't even complete? Hmmmm. Methinks he needs to put a little more forethought into this one. It helps to have the problem well-defined first!
|
|
|
|
|
oh, i had a look at your message a little late "Member 4194593".
thanks for your reply.
i think i accidentally missed those edges. my apologize!!!
i dont want to construct triangles, rather polygons. i will have a look at those alogs!
|
|
|
|
|