PROJECT CASE STUDY · ENVIRONMENTAL MACHINE LEARNING & GEOSPATIAL ANALYTICS

Predictive Modeling for Salmon Spawning Habitat Suitability

Using environmental data, geographic information systems, and machine learning to identify stream conditions associated with salmon spawning and support habitat restoration planning.

Project scope: 212 stream segments · 24 environmental variables · British Columbia, Canada

The Challenge

Salmon populations depend on suitable freshwater environments for spawning and early development. Changes in stream conditions, surrounding land use, and watershed characteristics can affect the availability and quality of these habitats.

For organizations working on salmon conservation and habitat restoration, identifying stream segments with potentially favorable spawning conditions is a complex analytical challenge.

Suitable habitat is influenced by numerous interacting environmental factors, including stream geometry, water temperature, terrain, vegetation, land cover, precipitation, and surrounding human activity.

These characteristics are commonly represented in different geospatial datasets with varying formats, coordinate systems, spatial resolutions, and geographic coverage.

Working with a Canadian hydrology consulting partner, Digital Maddox helped investigate whether environmental characteristics could be used to identify patterns associated with observed salmon spawning and highlight stream segments worthy of further investigation.

The objective was to develop a data-driven approach for evaluating spawning habitat suitability and supporting decisions about where additional field investigation or restoration planning might be most valuable.

The Solution

Digital Maddox developed a geospatial data processing and machine learning workflow that combined environmental information from multiple sources into a consistent analytical dataset.

The approach integrated stream characteristics, terrain information, land cover, climatic conditions, and other environmental variables with records of observed salmon spawning presence or absence.

A Random Forest machine learning model was trained to identify relationships between these environmental characteristics and the observed spawning records.

Once trained, the model could generate predictive scores for stream segments based on their environmental characteristics.

These scores provided a way to identify areas whose conditions resembled those associated with observed spawning, including locations where spawning had not been recorded.

Rather than replacing field surveys or ecological expertise, the model was designed to provide additional analytical evidence for investigating potential habitat suitability.

Technical Implementation

Environmental and Geospatial Data Integration

One of the most important aspects of the project was bringing together heterogeneous environmental and geographic information.

The input data represented different types of information and were collected or published using different spatial structures and resolutions.

Digital Maddox performed geospatial data transformation, normalization, validation, and integration to produce a consistent dataset suitable for machine learning.

This work included associating environmental measurements with individual stream segments and ensuring that the resulting variables could be compared and analyzed together.

The resulting analytical dataset contained 212 stream segments and 24 environmental features.

These features represented characteristics such as:

  • Stream channel geometry and bankfull width.
  • Water temperature and climatic conditions.
  • Terrain gradient and surrounding topography.
  • Forest, cropland, barren land, and other land-cover characteristics.
  • Precipitation and watershed conditions.
  • Road density and indicators of surrounding development.
  • Stream confinement and other channel characteristics.

Combining these variables into a common analytical framework made it possible to evaluate relationships across environmental datasets that would otherwise be difficult to compare directly.

Machine Learning Model Development

A Random Forest classification model was developed to investigate relationships between environmental variables and observed salmon spawning.

The dataset contained 180 segments with recorded spawning presence and 32 classified as absence.

The model used an ensemble of 500 decision trees to evaluate the environmental characteristics associated with these observations.

Random Forest was selected as a practical method for evaluating nonlinear relationships and interactions among multiple environmental variables without requiring a predefined mathematical relationship between each predictor and spawning presence.

The modeling workflow included preprocessing, missing-value handling, cross-validation, and analysis of model predictions.

Model Validation and Interpretation

To evaluate the model, the workflow used stratified cross-validation and classification performance metrics.

Exploratory cross-validation produced a receiver operating characteristic area under the curve (ROC-AUC) of approximately 0.89, indicating promising discrimination between the recorded presence and absence classes within the available dataset.

Model interpretation methods were also used to examine the relative influence of environmental characteristics and investigate the conditions associated with predicted spawning presence.

Because the dataset was relatively small and geographically related observations may share similar environmental characteristics, the results were treated as exploratory. Additional validation across independent watersheds would be needed before interpreting the model’s performance as evidence of reliable geographic transferability.

Predictive Habitat Suitability Analysis

The trained model generated predictive probabilities for individual stream segments based on their environmental characteristics.

These probabilities could be used to compare stream segments and identify locations whose characteristics were similar to those associated with documented spawning.

Of particular interest were segments where the model indicated relatively favorable environmental conditions despite an absence of recorded spawning.

Such discrepancies can help generate hypotheses about habitat limitations, data completeness, connectivity, or other factors that warrant further investigation.

The analysis also incorporated environmental feature interpretation to support the examination of potentially influential habitat characteristics.

Importantly, predicted probabilities were treated as model-based indicators, not direct measurements of ecological suitability or guarantees of successful habitat restoration.

Results and Capabilities

Riparian Condition Assessment image of one of the areas.

The project demonstrated the application of geospatial data engineering and machine learning to environmental habitat analysis.

Key outcomes and capabilities included:

Integrated Environmental Dataset
Environmental and geographic information from multiple sources was transformed into a consistent, machine-learning-ready dataset spanning 212 stream segments and 24 predictors.

Predictive Spawning Analysis
A Random Forest model was developed to estimate the relationship between stream environmental characteristics and observed salmon spawning records.

Environmental Factor Assessment
Model interpretation methods helped identify variables associated with differences in observed spawning conditions, supporting additional ecological investigation.

Candidate Habitat Identification
Predictive analysis highlighted stream segments whose environmental characteristics appeared favorable relative to the training observations, including locations where spawning was not recorded.

Geospatial Decision Support
The modeling workflow provided a foundation for incorporating predictive results into GIS-based analysis, habitat investigations, and restoration planning.

Reusable Analytical Approach
The underlying combination of spatial data integration, environmental feature engineering, and machine learning can be adapted to other ecological and natural-resource modeling problems.

Engineering Considerations

A significant lesson from this project is that environmental machine learning depends as much on the quality and consistency of the underlying geospatial data as it does on the predictive algorithm.

Environmental datasets often represent different geographic scales, resolutions, measurement methods, and periods of observation.

Combining those datasets without accounting for their differences can introduce misleading relationships into a model.

Careful spatial harmonization, feature validation, and consistent treatment of missing values are therefore essential parts of the modeling process.

Another important consideration is distinguishing statistical association from ecological causation.

A machine learning model can identify patterns associated with spawning observations, but those relationships do not necessarily establish which environmental changes would cause salmon populations to return.

Likewise, high cross-validation performance within one dataset does not guarantee similar results in an entirely different watershed.

By treating the predictive model as a decision-support tool rather than a substitute for field-based ecological assessment, the approach provides useful information while recognizing the limitations of the available data.

Broader Applications

The methods used in this project extend beyond salmon habitat modeling.

Similar geospatial machine learning workflows can support environmental and natural-resource applications such as:

  • Wildlife Habitat Suitability: Identifying geographic conditions associated with species presence and potential habitat.
  • Ecological Restoration Planning: Evaluating environmental conditions to help prioritize locations for field assessment and restoration.
  • Watershed Management: Analyzing relationships among terrain, land cover, hydrological conditions, and environmental observations.
  • Conservation Planning: Combining multiple spatial datasets to identify candidate areas for conservation initiatives.
  • Environmental Risk Assessment: Investigating geographic patterns associated with environmental vulnerability or ecosystem change.
  • Land Suitability Analysis: Evaluating geographic and environmental criteria for natural-resource management and land-use decisions.

These applications illustrate how geospatial data engineering and predictive analytics can turn complex environmental datasets into information that supports more informed planning.

Applying AI and GIS to Environmental Challenges

Digital Maddox combines expertise in geographic information systems, spatial data engineering, machine learning, and environmental analytics to develop custom solutions for complex geographic problems.

Our work includes integrating heterogeneous environmental datasets, developing predictive models, analyzing spatial patterns, and connecting analytical results to practical decision-making workflows.

Whether your organization is investigating wildlife habitat, evaluating restoration opportunities, managing natural resources, or exploring predictive environmental modeling, Digital Maddox can help design and implement a solution suited to your objectives and available data.

Contact Digital Maddox to discuss your project.