Ok, now I'm confused.

For future reference, you call a 2D function a function that is defined
> over the 2 dimensional space e.g. has 2 variables,
>

Correct, and that would be f = f(x,y), exactly what I'm looking for (a 2D
regression).


> hence the example in the page is a 2D example.
>

No, the example in the page is f = f(x), a function defined over the 1
dimensional space, i.e. has 1 variable. Hence the example is 1D. (Now, the
graph of a function of one variable is a curve in the 2 dimensional space).


> What you need would be a 3D function. In Machine Learning, we usually call
> these independent dimensions features. So you would say that a single
> training example will have 2,3,4 or 5 features.
>

ok


> Then you need to construct your matrix X as a matrix DxF, where D is each
> data point and F is each feature.
>
> For example
>
> X=np.random.rand(20,2) #Creates a skeleton structure with 2 features and
> 20 training points.
>

So if I understand, to predict f = f(x,y) I would have:

X =
[x0, y0]
[x1, y1]
...
[xn, yn]

and

y = [f(x0,y0), f(x1,y1), ..., f(xn,yn)]

It make sense. Thanks for your answer!

-fernando




> Cheers
>
> Leon
>
>
>
> On Wed, Jan 23, 2013 at 2:58 PM, Fernando Paolo <[email protected]> wrote:
>
>> If I'm not wrong, this is fitting a model of the form f(x) = y
>> (univariate regression, 1d). I want to fit a model of the form f(x,y) = z
>> (bivariate regression, 2d).
>>
>> Cheers,
>> -fernando
>>
>>
>> Sent from my iPhone
>>
>> On Jan 22, 2013, at 9:31 PM, Leon Palafox <[email protected]> wrote:
>>
>> This example is a 2D regression isn't it?
>>
>>
>> http://scikit-learn.org/dev/modules/gaussian_process.html#an-introductory-regression-example
>>
>>
>>
>>
>> On Wed, Jan 23, 2013 at 2:25 PM, Fernando Paolo <[email protected]>wrote:
>>
>>> Hello,
>>>
>>> I'm new to scikit-learn, and wonder if it is possible to perform 2D
>>> Gaussian Process Regression? In other words, I would like to perform a 2d
>>> kriging interpolation of spatial data (e.g., some geophysical field), where
>>> each data point is represented as (x,y,z) = (lon,lat,var). I can't figure
>>> this out from the example given in the website.
>>>
>>> Thanks so much,
>>> -fernando
>>>
>>>
>>> --
>>> Fernando Paolo
>>> Institute of Geophysics & Planetary Physics
>>> Scripps Institution of Oceanography
>>> University of California, San Diego
>>>
>>> web: fspaolo.net
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>> MVPs and experts. ON SALE this month only -- learn more at:
>>> http://p.sf.net/sfu/learnnow-d2d
>>> _______________________________________________
>>> Scikit-learn-general mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>>
>>>
>>
>>
>> --
>> Leon Palafox, M.Sc
>> PhD Candidate
>> Iba Laboratory
>> +81-3-5841-8436
>> University of Tokyo
>> Tokyo, Japan.
>>
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnnow-d2d
>>
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnnow-d2d
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>>
>
>
> --
> Leon Palafox, M.Sc
> PhD Candidate
> Iba Laboratory
> +81-3-5841-8436
> University of Tokyo
> Tokyo, Japan.
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>


-- 
Fernando Paolo
Institute of Geophysics & Planetary Physics
Scripps Institution of Oceanography
University of California, San Diego

web: fspaolo.net
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to