Git Product home page Git Product logo

Comments (10)

saleiva avatar saleiva commented on May 25, 2024 1

retested. Seems like yesterday we fucked up the data or something. You guys win

from camshaft.

stuartlynn avatar stuartlynn commented on May 25, 2024

Looking in to it now thanks for the heads up @saleiva

from camshaft.

javisantana avatar javisantana commented on May 25, 2024

with that amount of points and randomly distributed '2' and '1' I think is correct. Test it with two points table

from camshaft.

saleiva avatar saleiva commented on May 25, 2024

but the centers are exactly the same, that's very weird, don't you think?

from camshaft.

rochoa avatar rochoa commented on May 25, 2024

Try it with something like:

with points as (
  select (s * s) as weight, st_makepoint(s,s) as the_geom from generate_series(1,2) s
)
--select st_astext(the_geom), weight
select st_astext(cdb_crankshaft.CDB_WeightedMean(the_geom, weight)) as the_geom
from points

And play with the weight value from the CTE.

IMO it's working OK.

from camshaft.

javisantana avatar javisantana commented on May 25, 2024

@saleiva visually can be misleading (since there is snapping), did you test it matematically?

from camshaft.

saleiva avatar saleiva commented on May 25, 2024

lat/long values where the same at a quick sight

2016-06-23 12:16 GMT+02:00 javi santana [email protected]:

@saleiva https://github.com/saleiva visually can be misleading (since
there is snapping), did you test it matematically?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#79 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAIENWBrXbKYujXSQxciBE9WGRCF0UKaks5qOlzggaJpZM4I8Kgf
.

Sergio Alvarez Leiva

from camshaft.

stuartlynn avatar stuartlynn commented on May 25, 2024

@saleiva When I try it they look different . Not by much but different

screen shot 2016-06-23 at 9 47 59 am
screen shot 2016-06-23 at 9 47 46 am

from camshaft.

stuartlynn avatar stuartlynn commented on May 25, 2024

With some more tests it seams to be working . 4 points 3 on the right 1 on the left with various weightings does what you would expect it to do.

screen shot 2016-06-23 at 10 49 32 am
screen shot 2016-06-23 at 10 50 11 am
screen shot 2016-06-23 at 10 50 21 am

I think one of the reasons your not seeing a big effect in the crimes data is the weights are essentially randomly assigned so they will tend to cancel out. If you give crimes where there was an arrest weight 200 and crimes where there wasn't a weight of 1 then the map looks like this:

screen shot 2016-06-23 at 11 01 05 am

Where the blue points are the unweighted centroids and the orange points are the weighted centroids.

So I think its working ok

from camshaft.

javisantana avatar javisantana commented on May 25, 2024

FAV

from camshaft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.