Development of a Synthetic Enhanced Decision Engineering System
Developing a Synthetically Enhanced Decision Engineering System
The Starting Point
I started a while back with the development of SynthCCD, the announcement post gives the reasons behind creating it. I wanted to be able to use synthetic data for my presentations. As I continued to develop the software, I started finding other uses for the program. I’ve added a generator in this that enables me to generate phone volume data. I built that so I could create call handling data that I could use in volume forecasting and staffing model development.
When I started building the first datasets, I focused on data that looked like what I would find in a CAD system. I had two options at the outset. The first was Mostly AI. The challenge with that was two-fold. The first challenge was learning to use the platform. They were very helpful with that when I reached out to them, so I recommend them to people that want something quick. I also love their documentation. However, for what I needed, I had to ‘seed’ data to train the generator. On the surface, that is not a problem. I can sanitize the data to ensure that I do not expose any sensitive data. I’ve been doing that for years anyway. The data that was returned didn’t feel realistic. As I have developed SynthCCD, I’ve understood that was a deficiency on the part of the person describing the data to their generators. Yup you guessed it….. ME!
The second approach was using the faker library in Python. This was good for names of calltakers and dispatchers, in fact I still use it for those, but it was challenging for two separate features. The first is the elapsed time between events. It can generate random numbers, but there is no distribution or pattern. I switched to NumPy random generators and those have worked well for me once I learned how to identify the distributions found in the real world, and isolate the parameters that give me the right data shape. When I first did this, I ended up with normal distributions everywhere emulating data where the normal distribution doesn’t exist. Again, operator error!
The other challenge was addresses. You can use fake.address() to generate a fake address, then I would take the address components apart, but there were a few challenges. The first is that the address included the city, state, and postal code, but the state and the postal code didn’t add up. Imagine getting an address in Virginia with a postal code like 81303. I could create a list of addresses, but I had to truncate the addresses, using fake.unique.street_address() to get only parts of the address and then cast them into the same geographic area, or just leave out a city, state, and postal code entirely. That was the 2nd iteration of the generator. My concern with this generator was the realism factor. With a small number of addresses in a list, there is a danger of oversaturation. Granted, in a synthetic dataset that may not be an issue, but I wanted to have as much “realism” as I could generate.
In the next iteration, I found the Overpass API from Opem Street Map and worked out how to leverage it. Now, I can insert a real city, county, etc. and I can get real addresses for the jurisdiction. This allows me to increase the realism available in the exported data set. The only concern that I have with this is that I may create mismatches and other jurisdictional issues. For example, if the generator gives me an address of 39780 W. 347th St., Osawatomie KS. 66064, for a data set from the town of Osawatomie, KS, then I have a jurisdictional issue. While the mailing address is listed as Osawatomie, the address is not within the city limits of the city. So, the police department for the town would not respond to a call at that location. Instead, that address would be served by the Miami County, KS Sheriff’s Office. Likewise, if I create a data set for Coffeyville, KS and I get a row for a Commercial Burglary at 1406 Velma Dr., I have an issue with a mismatch between the address and the problem nature. In that case, the address is a residence and more than likely will not have any commercial enterprise operating out of it. For the reader’s benefit, I know both of these addresses personally. While this is a good starting point and unless someone knows the boundaries of the jurisdiction well, they wouldn’t know the details. I suppose that I could stop here.
Most recently, I’ve added the cross street, ensured that the latitude and longitude are in place, and a flag to indicate whether or not an address was validated prior to the call moving from call handling to incident handling and dispatch. I have also added a slight time penalty for calls at addresses that were not validated. That should reflect the time taken to try and validate the address, confirm that the address override is really the address for response, and trying to find the address during the response. I still want to verify that my hunches hold up to scrutiny.
However, at the same time, I recently tried to create a smaller data set that I could add to my Obsidian vault so I could use them as basis for creating notes that will allow me to create a reporting engine in the future. I was unable to create it because I couldn’t access the API. So, I had a thought. Could I create a synthetic town or city where I could ensure that addresses, problem types, and all jurisdictions will match up properly? After a little bit of research, I figured out that I could use a similar structure, with different libraries, and create a synthetic population center to use for synthetic data generation.
As an additional benefit, I realized that I could use this to create a dataset that conforms to the published NENA standards. Since the datasets that I generate are meant for research and reporting in public safety, adherence to NENA GIS standards makes perfect sense. This will, after I write the software, allow me to have a proper standards compliant jurisdiction for the dataset. After I started sketching out the details, I realized that I also need to create file that allow for persistence and expansion of the dataset.
My original intent was to create one town that I could use for my own work. After I started looking at libraries and standards, I realized that I could make this into something that I could develop into a larger project. That project would be to create synthetic generators to emulate as many parts of a centre as possible. I think that I can do this for different parts of the process and then create experimental modules that facilitate research into centres while reducing data exposure. Reducing exposure while increasing utility enhances security and data management policiies, while allowing work ot continue. Additionally, synthetic data can be used to check real data, just as real data can be used to check that synthetic data is accurate. When the two are in alignment, then blended data comprised of real and synthetic data can be used to fill in gaps, enhance options, and allow research to move forward.
Ultimately, I want to keep research and development moving forward, but I also want to protect the privacy and security attached to real data from centres. I think that I can keep doing this and that SynthGIS is the next piece of that puzzle.