Select to view content in your preferred language

ArcGIS Pro 3.0.2: What is the function of the “unique ID field” while working with OLS?

788
5
Jump to solution
03-31-2024 02:00 AM
JamalNUMAN
Legendary Contributor

ArcGIS Pro 3.0.2: What is the function of the “unique ID field” while working with OLS?

 

I couldn’t figure out the function of the “unique ID field” while working with OLS

 

Clip_211.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
1 Solution

Accepted Solutions
EricKrause
Esri Regular Contributor

Hi @JamalNUMAN,

Requiring a Unique ID field is an older design pattern that is not used in more recent tools.  In fact, the Generalized Linear Regression tool (with Gaussian model type) does the same thing as the OLS tool, and it does not require a Unique ID field.

The idea behind the Unique ID field is that it gets copied to the output features, so you can join the output results back to the input (or vice versa).  For example, if you have a selection, the output features will not have the same Object IDs as the input, so some other field needs to be used to match input/output.

In more recent tools, each Object ID from the input is copied to a "Source ID" field of the output features.  This serves the same purpose (being able to match output to input) but does not require that you provide a field.

View solution in original post

5 Replies
EdwardGause
Occasional Contributor
I am pretty sure it is just to optimize the algorithm by allowing the code to jump to a record of data like an index read. I feel like it comes more into play when they are calculating all the other statistics to validate if the model is a good model, but I understand why you think its not needed for the linear regression which would just need to put the data into the Matrix and then calculate an Inverse Matrix and the Transposition to then do the math, all of which would be outside of the original dataset you read in to load the Matrix. I never wrote this kind of code, but where I feel like they would use the unique id is after they did the linear regression algorithm, and then they go back through the dataset to calculate the other statistics you see in their OLS report like the Jarque Bera Statistic (if I miss spelled it sorry) just to name one.
Robert “Edward” Gause, GISP | Director of Information Services | HTC | p 843-369-8483 | www.htcinc.net | This is life. Connet with it.
EricKrause
Esri Regular Contributor

Hi @JamalNUMAN,

Requiring a Unique ID field is an older design pattern that is not used in more recent tools.  In fact, the Generalized Linear Regression tool (with Gaussian model type) does the same thing as the OLS tool, and it does not require a Unique ID field.

The idea behind the Unique ID field is that it gets copied to the output features, so you can join the output results back to the input (or vice versa).  For example, if you have a selection, the output features will not have the same Object IDs as the input, so some other field needs to be used to match input/output.

In more recent tools, each Object ID from the input is copied to a "Source ID" field of the output features.  This serves the same purpose (being able to match output to input) but does not require that you provide a field.

JamalNUMAN
Legendary Contributor

Then how is it possible that this field is not required when working with GWR?

 

Clip_1019.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
EricKrause
Esri Regular Contributor

GWR is a relatively recent tool (there is also an older version that is now deprecated), so it creates a Source ID field on the output features rather than require and input Unique ID field.

JamalNUMAN
Legendary Contributor

Even the Cook's D is not calculated in OLS

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos