How to use the latitude/longitude of points when using scikit-learn's Gaussian Process Regression?










0















I'm trying to interpolate some data from air monitoring stations.



Almost each record have an air quality value and their latitude, longitude. But there are some records lacking values.
For example, the data just like this:



116° 42° 10
117° 43° missing
120° 20° 1000


I want to use the scikit-learn's GPR (GaussianProcessRegressor) to interpolate the missing values.



I know that the 2-D data can be processed like the last answer in this problem
Python - Kriging (Gaussian Process) in scikit_learn



My problem is that: I shouldn't use the latitude and longitude to do this task directly, beacause the earth is a sphere so the latitude/longitude is not an usual flat 2-D grid.



I want to ask how to define the distance function between points when using the scikit-learn's GPR, or should I just project these lat/lon points to flat and use them? I hadn't try this because the precesion loss during projection made me sad :(



Thx for any suggestion :)



ps. The distance between two lat/lon points can be calculate by Haversine formula like Calculate distance between two latitude-longitude points? (Haversine formula)










share|improve this question
























  • Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

    – DatHydroGuy
    Nov 16 '18 at 8:50











  • Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

    – 龚世泽
    Nov 16 '18 at 9:19
















0















I'm trying to interpolate some data from air monitoring stations.



Almost each record have an air quality value and their latitude, longitude. But there are some records lacking values.
For example, the data just like this:



116° 42° 10
117° 43° missing
120° 20° 1000


I want to use the scikit-learn's GPR (GaussianProcessRegressor) to interpolate the missing values.



I know that the 2-D data can be processed like the last answer in this problem
Python - Kriging (Gaussian Process) in scikit_learn



My problem is that: I shouldn't use the latitude and longitude to do this task directly, beacause the earth is a sphere so the latitude/longitude is not an usual flat 2-D grid.



I want to ask how to define the distance function between points when using the scikit-learn's GPR, or should I just project these lat/lon points to flat and use them? I hadn't try this because the precesion loss during projection made me sad :(



Thx for any suggestion :)



ps. The distance between two lat/lon points can be calculate by Haversine formula like Calculate distance between two latitude-longitude points? (Haversine formula)










share|improve this question
























  • Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

    – DatHydroGuy
    Nov 16 '18 at 8:50











  • Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

    – 龚世泽
    Nov 16 '18 at 9:19














0












0








0








I'm trying to interpolate some data from air monitoring stations.



Almost each record have an air quality value and their latitude, longitude. But there are some records lacking values.
For example, the data just like this:



116° 42° 10
117° 43° missing
120° 20° 1000


I want to use the scikit-learn's GPR (GaussianProcessRegressor) to interpolate the missing values.



I know that the 2-D data can be processed like the last answer in this problem
Python - Kriging (Gaussian Process) in scikit_learn



My problem is that: I shouldn't use the latitude and longitude to do this task directly, beacause the earth is a sphere so the latitude/longitude is not an usual flat 2-D grid.



I want to ask how to define the distance function between points when using the scikit-learn's GPR, or should I just project these lat/lon points to flat and use them? I hadn't try this because the precesion loss during projection made me sad :(



Thx for any suggestion :)



ps. The distance between two lat/lon points can be calculate by Haversine formula like Calculate distance between two latitude-longitude points? (Haversine formula)










share|improve this question
















I'm trying to interpolate some data from air monitoring stations.



Almost each record have an air quality value and their latitude, longitude. But there are some records lacking values.
For example, the data just like this:



116° 42° 10
117° 43° missing
120° 20° 1000


I want to use the scikit-learn's GPR (GaussianProcessRegressor) to interpolate the missing values.



I know that the 2-D data can be processed like the last answer in this problem
Python - Kriging (Gaussian Process) in scikit_learn



My problem is that: I shouldn't use the latitude and longitude to do this task directly, beacause the earth is a sphere so the latitude/longitude is not an usual flat 2-D grid.



I want to ask how to define the distance function between points when using the scikit-learn's GPR, or should I just project these lat/lon points to flat and use them? I hadn't try this because the precesion loss during projection made me sad :(



Thx for any suggestion :)



ps. The distance between two lat/lon points can be calculate by Haversine formula like Calculate distance between two latitude-longitude points? (Haversine formula)







python scikit-learn geolocation interpolation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 8:41







龚世泽

















asked Nov 16 '18 at 8:24









龚世泽龚世泽

11




11












  • Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

    – DatHydroGuy
    Nov 16 '18 at 8:50











  • Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

    – 龚世泽
    Nov 16 '18 at 9:19


















  • Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

    – DatHydroGuy
    Nov 16 '18 at 8:50











  • Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

    – 龚世泽
    Nov 16 '18 at 9:19

















Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

– DatHydroGuy
Nov 16 '18 at 8:50





Using this (stackoverflow.com/questions/43240915/…) post as a guide, I'd suggest that you use a geodesy package (e.g. geographiclib) to generate geodesics to measure the distance between your "unknown" point and some nearby known points. Then use inverse distance interpolation to predict a value for your unknown quantity.

– DatHydroGuy
Nov 16 '18 at 8:50













Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

– 龚世泽
Nov 16 '18 at 9:19






Thx for your method but I'm sry :( to say that I must use the GPR or kriging method beacause it's required. This method is just ok for simple situation.

– 龚世泽
Nov 16 '18 at 9:19













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333971%2fhow-to-use-the-latitude-longitude-of-points-when-using-scikit-learns-gaussian-p%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333971%2fhow-to-use-the-latitude-longitude-of-points-when-using-scikit-learns-gaussian-p%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

Evgeni Malkin