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

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

On Sat, May 29, 2021 at 4:20 AM Donovan Cameron <sault.don@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

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

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 :slight_smile:

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, <neteler@osgeo.org> wrote:

On Sat, May 29, 2021 at 4:20 AM Donovan Cameron <sault.don@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

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

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 grass-user-bounces@lists.osgeo.org On Behalf Of Saulteau Don
Sent: lørdag 29. mai 2021 21:13
To: GRASS user list grass-user@lists.osgeo.org
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 :slight_smile:

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, <neteler@osgeo.org> wrote:

On Sat, May 29, 2021 at 4:20 AM Donovan Cameron <sault.don@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

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