Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Skip to content

Input Files and Code for: Machine learning can accurately assign geologic basin to produced water samples using major geochemical parameters

Metadata Updated: July 6, 2024

As more hydrocarbon production from hydraulic fracturing and other methods produce large volumes of water, innovative methods must be explored for treatment and reuse of these waters. However, understanding the general water chemistry of these fluids is essential to providing the best treatment options optimized for each producing area. Machine learning algorithms can often be applied to datasets to solve complex problems. In this study, we used the U.S. Geological Survey’s National Produced Waters Geochemical Database (USGS PWGD) in an exploratory exercise to determine if systematic variations exist between produced waters and geologic environment that could be used to accurately classify a water sample to a given geologic province. Two datasets were used, one with fewer attributes (n = 7) but more samples (n = 58,541) named PWGD7, and another with more attributes (n = 9) but fewer samples (n = 33,271) named PWGD9. The attributes of interest were specific gravity, pH, HCO3, Na, Mg, Ca, Cl, SO4, and total dissolved solids. The two datasets, PWGD7 and PWGD9, contained samples from 20 and 19 geologic provinces, respectively. Outliers across all attributes for each province were removed at a 99% confidence interval. Both datasets were divided into a training and test set using an 80/20 split and a 90/10 split, respectively.
Random forest, Naïve Bayes, and k-Nearest Neighbors algorithms were applied to the two different training datasets and used to predict on three different testing datasets. Overall model accuracies across the two datasets and three applied models ranged from 23.5% to 73.5%. A random forest algorithm (split rule = extratrees, mtry = 5) performed best on both datasets, producing an accuracy of 67.1% for a training set based on the PWGD7 dataset, and 73.5% for a training set based on the PWGD9 dataset. Overall, the three algorithms predicted more accurately on the PWGD7 dataset than PWGD9 dataset, suggesting that either a larger sample size and/or fewer attributes lead to a more successful predicting algorithm. Individual balanced accuracies for each producing province ranged from 50.6% (Anadarko) to 100% (Raton) for PWGD7, and from 44.5% (Gulf Coast) to 99.8% (Sedgwick) for PWGD9. Results from testing the model on recently published data outside of the USGS PWGD suggests that some provinces may be lacking information about their true geochemical diversity while others included in this dataset are well described. Expanding on this effort could lead to predictive tools that provide ranges of contaminants or other chemicals of concern within each province to design future treatment facilities to reclaim wastewater. We anticipate that this classification model will be improved over time as more diverse data are added to the USGS PWGD.

Access & Use Information

Public: This dataset is intended for public access and use. License: No license information was provided. If this work was prepared by an officer or employee of the United States government as part of that person's official duties it is considered a U.S. Government Work.

Downloads & Resources

Dates

Metadata Created Date June 1, 2023
Metadata Updated Date July 6, 2024

Metadata Source

Harvested from DOI EDI

Additional Metadata

Resource Type Dataset
Metadata Created Date June 1, 2023
Metadata Updated Date July 6, 2024
Publisher U.S. Geological Survey
Maintainer
@Id http://datainventory.doi.gov/id/dataset/ed1e898c99516c6c21d947a71f6ca959
Identifier USGS:60ec47c6d34e3bf20b41756f
Data Last Modified 20210726
Category geospatial
Public Access Level public
Bureau Code 010:12
Metadata Context https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld
Metadata Catalog ID https://datainventory.doi.gov/data.json
Schema Version https://project-open-data.cio.gov/v1.1/schema
Catalog Describedby https://project-open-data.cio.gov/v1.1/schema/catalog.json
Harvest Object Id ad10eb77-ad9c-4996-ba58-80f1fe47f36e
Harvest Source Id 52bfcc16-6e15-478f-809a-b1bc76f1aeda
Harvest Source Title DOI EDI
Metadata Type geospatial
Old Spatial -112.15118408104,25.774766586665,-77.082824707442,48.614464422854
Publisher Hierarchy White House > U.S. Department of the Interior > U.S. Geological Survey
Source Datajson Identifier True
Source Hash 3b129491678a804e7286398fdbf39eb6feb9c5931cc52f2edd700024f6663120
Source Schema Version 1.1
Spatial {"type": "Polygon", "coordinates": -112.15118408104, 25.774766586665, -112.15118408104, 48.614464422854, -77.082824707442, 48.614464422854, -77.082824707442, 25.774766586665, -112.15118408104, 25.774766586665}

Didn't find what you're looking for? Suggest a dataset here.