Skip to main content

This library presents available functions to use Artificial Neural Netwroks (ANN) and Random Forest (RF) trained models to make predictions of the maximum roof acceleration (PFA_max) and the maximum roof drift ratio (rDR_max) in reinforced concrete wall buildings.

Project description

ML prediction - RC Wall buildings

Note: This is a README file adapted from the available GitHub repository at https://github.com/carlosantr/Wall_ML_Prediction

This repository presents the trained ML models of the paper "Machine Learning based evaluation of roof drifts and accelerations of RC wall buildings during ground motions". Artificial Neural Netwroks (ANN) and Random Forest (RF) are available to make predictions of the maximum roof acceleration (PFA_max) and the maximum roof drift ratio (rDR_max) in reinforced concrete wall buildings. This repository presents the trained models, prediction functions (please see the function documentation in the .py file) and examples for multiple and individual prediction modes. You can use the prediction functions in your own project with two different ways:

  1. Install the open-source library distributed through Python Package index (PyPi) using the command "pip install wall_ml_prediction" in your local command prompt (Anaconda prompt is recommended). Once the installation is done, you can call the prediction functions in your projects with the command "from wall_ml_prediction.predict import prediction_ML_walls_individual" or ""from wall_ml_prediction.predict import prediction_ML_walls_multiple". Then, use freely the functions to make predictions of PFA_max or rDR_max using the trained ML models (i.e. RF and ANN).

  2. Download this repository and locate the files (in some cases you will need to unzip the downloaded file from the repository) in the same path of your project. Then, call the functions from the predict.py file as follows "from predict import prediction_ML_walls_individual" or ".predict import prediction_ML_walls_multiple". Then, use freely the functions to make predictions of PFA_max or rDR_max using the trained ML models (i.e. RF and ANN).

For further information about the input data required by the functions, please see the documentation in the predict.py file in this repository. The abovementioned documentation is presented below:

Individual prediction mode:
  • WI: Wall Index
  • T1: Fundamental period
  • H_Tcr: Stiffness Index
  • Ar: Mean wall aspect ratio
  • ALR_G: Average axial load ratio for gravity loads
  • AI: Arias Intensity
  • Sa: Spectral acceleration
  • Sv: Spectral velocity
  • var_predict: Is a optional variable, and must be a list with the output values to predict (i.e. ["PFA_max", "rDR_max"], ["PFA_max"] or ["rDR_max"])
  • model_predict: Is an optional variable, and must be a list with the Machine Learning models to do the predictions (i.e. ["RF", "ANN"], ["RF"] or ["ANN"])
Multiple prediction mode:
  • X must be a dataframe with the next columns (each row is a prediction): WI: Wall Index T1: Fundamental period H_Tcr: Stiffness Index Ar: Mean wall aspect ratio ALR_G: Average axial load ratio for gravity loads AI: Arias Intensity Sa: Spectral acceleration Sv: Spectral velocity
  • The columns must have exactly the same name (i.e., X.columns = ['WI', 'T1', 'H_Tcr', 'Ar', 'ALR_G', 'AI', 'Sa', 'Sv'])
  • var_predict: Is a optional variable, and must be a list with the output values to predict (e.g. ["PFA_max", "rDR_max"], ["PFA_max"] or ["rDR_max"])

IMPORTANT NOTE:

  • The functions are expected to be used with input data in the range presented in Table 1 of the paper. If you use out-of-range values, the predictions could be worst. Be careful about the data you input to the prediction functions.
  • For the second case (downloading directly from the repository), you have to accomplish with the dependencies requirements in your python environment (Scikit-Learn: write in console: pip install --user scikit-learn==1.2.1, Joblib: write in console: pip install --user joblib==1.4.2, Keras: wite in console: pip install --user keras==3.5.0, and Tensorflow: write in console: pip install --user tensorflow==2.17.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wall_ml_prediction-1.0.1.tar.gz (22.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wall_ml_prediction-1.0.1-py3-none-any.whl (22.9 MB view details)

Uploaded Python 3

File details

Details for the file wall_ml_prediction-1.0.1.tar.gz.

File metadata

  • Download URL: wall_ml_prediction-1.0.1.tar.gz
  • Upload date:
  • Size: 22.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for wall_ml_prediction-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ee1ea0def5f62186751d0d45bc67e8533a826609b3af09378ffac25b6c33cb0e
MD5 314e6f3cd2972edbdf865246085eb2f6
BLAKE2b-256 d79f76271ef4bf76a7851105d6d63a8c50a5a4517ecd326a940530f29ffeb23c

See more details on using hashes here.

File details

Details for the file wall_ml_prediction-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wall_ml_prediction-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 849a0df4071f8856bba51b523155b15159e2d383d51d42bd286e512fee84d60e
MD5 e37a6315d565a20330581206916b9e65
BLAKE2b-256 d62060a98146e1b2ff762990bd5f7809fdabe3a91eaa98cd30536aa140f9eef6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page