This post was written by Gravyty's Rich Palmer (Co-Founder/CTO), Nima Abbasi, Ph.D. (Director of Data Science), and Matt Pierce (Senior Software Engineer)
As bonafide road warriors, frontline fundraisers constantly travel to meet with donors and prospects. Tasked with building relationships at home and abroad, they prioritize locations, set anchor visits, and conduct extensive outreach to ensure full schedules.
Gravyty supports travel through a variety of solutions, including Gravyty Go! which provides monthly proactive travel suggestions, as well as on-the-fly suggestions for upcoming travel. Many of our users love forwarding their travel confirmation email (a la “TripIt”) so we can automatically send them potential donors to consider visiting and help with the outreach by drafting messages.
Sophisticated algorithms and machine learning, both subsets of artificial intelligence (AI), drive the predictive intelligence behind these products. Unlike other companies that treat similar solutions as black boxes that never allow users to see inside to understand more or evaluate decisions, Gravyty has a different approach, and philosophy. As founding members of the AI in Advancement Advisory Council (AAAC), we have committed to setting and exceeding the highest levels of ethics and transparency.
In that light, we’d like to take you ‘behind the scenes’ with the technology inside Gravyty Go!
If you’ve ever seen (or heard someone complain about) Los Angeles traffic, you know that traveling just a few miles can take a really long time. Conversely, traveling more than 100 miles in rural areas may be realistic. Either scenario is a function of population density.
To maximize a fundraiser’s potential reach while traveling, Gravyty Go! accounts for population densities. We accomplish this by clustering donors based on a variety of parameters. Each cluster is dynamically created, based on the number of donors in a fundraiser’s portfolio, the geographic area that contains these donors, and the distance a fundraiser has to travel. Clusters grow, shrink, and are added/removed as travel plans or portfolios change.
Let’s Get Technical
So how do we accomplish this? Gravyty’s team of data scientists and engineers use a technique called DBSCAN (which stands for density-based spatial clustering of applications with noise). In contrast to popular techniques that consider creating an ideal number of clusters around a central vector, otherwise known as centroid-based clustering (e.g. k-Means), density-based clustering identifies dense areas without considering a specific shape for a cluster. This also makes DBSCAN models good at identifying outliers and the number of clusters dynamically based on the data -- so we don’t need to worry about getting the number of clusters right, but rather focus on other elements of the problem.
In fact, the parameters for this technique are the maximum distance between two donors to be considered in one cluster and the minimum number of points needed in a neighborhood to define a cluster. To read more, check out the inaugural paper: “A density-based algorithm for discovering clusters in large spatial databases with noise” by Martin Ester, et al.
While the DBSCAN algorithm adequately generates clusters of donors off-the-shelf, more precise model tuning is required to fit the fundraising use-case. Sometimes clusters can be incredibly large (think a Chicago-based botanical garden and how many donors/prospects might live close by), or sparse (think about ex-pat donors living abroad). In practice, these would produce unreliable results that aren’t manageable or worth the fundraiser’s time. So, Gravyty engages in post-processing to make sure that we provide the best possible grouping decisions.
Once we have a cluster from DBSCAN, we recursively break it down into a manageable size based on both the total area of the cluster and the number of donors in the cluster. Based on our domain expertise, we then calculate the proper thresholds for these factors. For example, a fundraiser traveling cross-country will likely want to cast a wider net than a fundraiser traveling two hours to a nearby city. So, the shorter the travel, the tighter the cluster. This is one of several factors that we use to determine whether a cluster should be further broken down. Each time we subdivide a cluster, we re-run DBSCAN against the smaller subset of donors to find the optimal suggestions for fundraisers.
Taking It To A New Level
At this point, our clusters are almost finalized. But we’d like to break it down one more level. Our next step is to consider the population density of the cluster’s locales themselves. A cluster containing donors exclusively in New York City will be broken out into local neighborhoods, while a wider cluster spanning multiple towns will be broken out into cities.
This is where human art intersects with algorithmic science. We would never send a fundraiser to a series of coordinates, such as “40.714542, -73.961314,”we’d say, “We suggest you travel to Williamsburg,” which is a neighborhood in Brooklyn. Further, we’d suggest when to go and what to do. So, a message from Gravyty Go! might suggest, “Marlow and Son’s is highly rated and might be a great place for dinner,” which creates an end-to-end user experience that scales well across a donor pool.
What good is all of this if AI and machine learning don’t deliver speedy recommendations to fundraisers? Gravyty Go! prepares for this realistic expectation.
When Gravyty calculates the best donor clusters, we frequently have to find the closest point (latitude and longitude) to another given point. This is known as the nearest neighbor search. For example, we may need to find the nearest cluster to a given donor. Because this type of calculation comes up often, and some of our organizations have millions of constituents, we need to be efficient when computing it. For this reason, we take advantage of powerful geometric data structures, such as Ball Trees, to store longitude and latitude data. By building these data structures, we can then leverage them to perform nearest neighbor searches at a fraction of the time it would take without them, keeping everything running smoothly.
Creating solutions that exceed end-user expectations is a group effort. Gravyty choreographs customer needs and feedback with our data science and product teams and delivers products and new features under the guidance and support of our Customer Success team (composed mainly of former fundraisers).