Re: [GRASS-user] bayesian belief network analysis (was r.binfer)

2021-06-01 Thread Stefan Blumentrath
Hi Donovan,

If you know how to put together some Python code, you could have a look at 
PyMC3: https://docs.pymc.io/
That can be basically used like scikit-learn in r.learn.ml.

You load GRASS data into a numpy array with e.g. r.what, r.stats, v.db.select, 
or using pygrass (e.g. reading entire raster maps with raster2numpy) and create 
training and test data that that you feed into a model...

There have been some efforts to move to TensorFlow as backend in PyMC, but that 
seems to be abandoned and PyMC devs are now continuing with JAX 
(https://pymc-devs.medium.com/the-future-of-pymc3-or-theano-is-dead-long-live-theano-d8005f8a0e9b).

Cheers,
Stefan


From: grass-user  On Behalf Of Saulteau Don
Sent: lørdag 29. mai 2021 21:13
To: GRASS user list 
Subject: Re: [GRASS-user] bayesian belief network analysis (was r.binfer)

OK thanks! I'll see if I can find an old grass executable, compile in a VM with 
r.binfer in it or fallback to QGIS and OpenBugs. I thought I'd poke around 
cause I prefer analysis in GRASS over any other platform out there :)

I've started to assist indigenous nations with assertion and 
protection/preservation of their rights with GIS. Some of these analytical 
methods like fuzzy/boolean patch modelling, weighted overlays, bayesian belief 
networks (BBN) allow them to translate their oral history and ecological 
knowledge into tools that help them engage effectively and meaningfully with 
other parties such as other nations/governments and industries who have 
expressed interest in their lands and resources.

I SO wish I could code or even knew what to ask for in procurement for these 
things cause I would.

Been a lowly user, bug reporter, package maintainer and crowd funder. 
Continuing to find ways to feed back and wholly contribute into these FOSS 
communities any way I can.




Donovan
On Sat., May 29, 2021, 03:12 Markus Neteler, 
mailto:nete...@osgeo.org>> wrote:
On Sat, May 29, 2021 at 4:20 AM Donovan Cameron 
mailto:sault@gmail.com>> wrote:
>
> Evening,
>
> I'm attempting to analyze a set of layers (slope, aspect, vegetation,
> soil, etc) that have been coded/scored based on expert opinion to output
> a probability/suitability map.
>
> I'm looking to apply a bayesian belief network [1] and i've got the
> raster layers ready for the inputs and coded like seen in this figure [2].
>
> There was a grass4 module called r.binfer [3] that did this and I can't
> seem to find it with GRASS 78 - deprecated or replaced?

The latest code trace which I could find is this one:

GRASS GIS 5.5:
https://github.com/OSGeo/grass-legacy/tree/releasebranch_5_5/src/raster/r.binfer<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOSGeo%2Fgrass-legacy%2Ftree%2Freleasebranch_5_5%2Fsrc%2Fraster%2Fr.binfer=04%7C01%7C%7C7eb8abac8e6a4de10cda08d922d5c7dd%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637579124164541148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=Ce57HPAcVIfTx6w%2BMJV5wXQahQxz90U8FGREdvXxed8%3D=0>

I do not recall why the module has been abandoned in GRASS GIS 6
(maybe no particular reason and a volunteer could update it...?).

Another option might be to rely on R and use "rgrass7" to exchange
data between GRASS GIS and R.

Best,
Markus

> Searches lead me to either r.regression.multi [4] or 
> r.learn.ml<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fr.learn.ml%2F=04%7C01%7C%7C7eb8abac8e6a4de10cda08d922d5c7dd%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637579124164551146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=To5Tf1A%2FYtiovnKTSsxJAziO0rxO2KCLtlTIdxH3jYc%3D=0>
>  [5] but
> i'm not sure where to start with these to get a BBN processed thru them.
>
>
> SaultDon
>
> [1] 
> https://www.gislounge.com/gis-bayesian-belief-networks/<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gislounge.com%2Fgis-bayesian-belief-networks%2F=04%7C01%7C%7C7eb8abac8e6a4de10cda08d922d5c7dd%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637579124164551146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=LDXIFRyMkk2v9bFEdClj182JKgOJaL5NGzdgH64e0K8%3D=0>
> [2]
> https://www.sciencedirect.com/science/article/pii/S0169204618307497#f0010<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS0169204618307497%23f0010=04%7C01%7C%7C7eb8abac8e6a4de10cda08d922d5c7dd%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637579124164561143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=%2Bwhn8WEk5K9Rkulzj3XY7cv8T62cN5o53pLzQLOIMWE%3D=0>
> [3] 
> https://grass.osgeo.org/grass43/manuals/html_grass4/html/r.binfer.html<https://eur01.safelinks.protection.outlook.com/?url=https

Re: [GRASS-user] bayesian belief network analysis (was r.binfer)

2021-05-29 Thread Saulteau Don
OK thanks! I'll see if I can find an old grass executable, compile in a VM
with r.binfer in it or fallback to QGIS and OpenBugs. I thought I'd poke
around cause I prefer analysis in GRASS over any other platform out there :)

I've started to assist indigenous nations with assertion and
protection/preservation of their rights with GIS. Some of these analytical
methods like fuzzy/boolean patch modelling, weighted overlays, bayesian
belief networks (BBN) allow them to translate their oral history and
ecological knowledge into tools that help them engage effectively and
meaningfully with other parties such as other nations/governments and
industries who have expressed interest in their lands and resources.

I SO wish I could code or even knew what to ask for in procurement for
these things cause I would.

Been a lowly user, bug reporter, package maintainer and crowd funder.
Continuing to find ways to feed back and wholly contribute into these FOSS
communities any way I can.




Donovan

On Sat., May 29, 2021, 03:12 Markus Neteler,  wrote:

> On Sat, May 29, 2021 at 4:20 AM Donovan Cameron 
> wrote:
> >
> > Evening,
> >
> > I'm attempting to analyze a set of layers (slope, aspect, vegetation,
> > soil, etc) that have been coded/scored based on expert opinion to output
> > a probability/suitability map.
> >
> > I'm looking to apply a bayesian belief network [1] and i've got the
> > raster layers ready for the inputs and coded like seen in this figure
> [2].
> >
> > There was a grass4 module called r.binfer [3] that did this and I can't
> > seem to find it with GRASS 78 - deprecated or replaced?
>
> The latest code trace which I could find is this one:
>
> GRASS GIS 5.5:
>
> https://github.com/OSGeo/grass-legacy/tree/releasebranch_5_5/src/raster/r.binfer
>
> I do not recall why the module has been abandoned in GRASS GIS 6
> (maybe no particular reason and a volunteer could update it...?).
>
> Another option might be to rely on R and use "rgrass7" to exchange
> data between GRASS GIS and R.
>
> Best,
> Markus
>
> > Searches lead me to either r.regression.multi [4] or r.learn.ml [5] but
> > i'm not sure where to start with these to get a BBN processed thru them.
> >
> >
> > SaultDon
> >
> > [1] https://www.gislounge.com/gis-bayesian-belief-networks/
> > [2]
> >
> https://www.sciencedirect.com/science/article/pii/S0169204618307497#f0010
> > [3]
> https://grass.osgeo.org/grass43/manuals/html_grass4/html/r.binfer.html
> > [4] https://grass.osgeo.org/grass78/manuals/r.regression.multi.html
> > [5] https://grass.osgeo.org/grass78/manuals/addons/r.learn.ml.html
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> --
> Markus Neteler, PhD
> https://www.mundialis.de - free data with free software
> https://grass.osgeo.org
> https://courses.neteler.org/blog
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] bayesian belief network analysis (was r.binfer)

2021-05-29 Thread Markus Neteler
On Sat, May 29, 2021 at 4:20 AM Donovan Cameron  wrote:
>
> Evening,
>
> I'm attempting to analyze a set of layers (slope, aspect, vegetation,
> soil, etc) that have been coded/scored based on expert opinion to output
> a probability/suitability map.
>
> I'm looking to apply a bayesian belief network [1] and i've got the
> raster layers ready for the inputs and coded like seen in this figure [2].
>
> There was a grass4 module called r.binfer [3] that did this and I can't
> seem to find it with GRASS 78 - deprecated or replaced?

The latest code trace which I could find is this one:

GRASS GIS 5.5:
https://github.com/OSGeo/grass-legacy/tree/releasebranch_5_5/src/raster/r.binfer

I do not recall why the module has been abandoned in GRASS GIS 6
(maybe no particular reason and a volunteer could update it...?).

Another option might be to rely on R and use "rgrass7" to exchange
data between GRASS GIS and R.

Best,
Markus

> Searches lead me to either r.regression.multi [4] or r.learn.ml [5] but
> i'm not sure where to start with these to get a BBN processed thru them.
>
>
> SaultDon
>
> [1] https://www.gislounge.com/gis-bayesian-belief-networks/
> [2]
> https://www.sciencedirect.com/science/article/pii/S0169204618307497#f0010
> [3] https://grass.osgeo.org/grass43/manuals/html_grass4/html/r.binfer.html
> [4] https://grass.osgeo.org/grass78/manuals/r.regression.multi.html
> [5] https://grass.osgeo.org/grass78/manuals/addons/r.learn.ml.html
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user



--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] bayesian belief network analysis (was r.binfer)

2021-05-28 Thread Donovan Cameron

Evening,

I'm attempting to analyze a set of layers (slope, aspect, vegetation, 
soil, etc) that have been coded/scored based on expert opinion to output 
a probability/suitability map.


I'm looking to apply a bayesian belief network [1] and i've got the 
raster layers ready for the inputs and coded like seen in this figure [2].


There was a grass4 module called r.binfer [3] that did this and I can't 
seem to find it with GRASS 78 - deprecated or replaced?


Searches lead me to either r.regression.multi [4] or r.learn.ml [5] but 
i'm not sure where to start with these to get a BBN processed thru them.



SaultDon

[1] https://www.gislounge.com/gis-bayesian-belief-networks/
[2] 
https://www.sciencedirect.com/science/article/pii/S0169204618307497#f0010

[3] https://grass.osgeo.org/grass43/manuals/html_grass4/html/r.binfer.html
[4] https://grass.osgeo.org/grass78/manuals/r.regression.multi.html
[5] https://grass.osgeo.org/grass78/manuals/addons/r.learn.ml.html
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user