Skip to main content

Posts

  BS:1 Hidden Markov Models (HMMs): HMMs are statistical models where the system being modeled is assumed to be a Markov process with hidden states. The "hidden" aspect comes from our inability to directly observe the states. Instead, we have access to a set of observable variables that provide some information about the hidden states. In our case, the observable variables are sound data, and the hidden states represent the underlying process (like phonemes in speech) that generated these sounds. Here's a breakdown of what I did: 1️⃣ I created random 'sound' data sequences, intended to mimic the variations we encounter in actual speech patterns. This is the kind of data we need when working with Hidden Markov Models in a speech recognition context. 2️⃣ I employed the hmmlearn Python library to train a Gaussian Hidden Markov Model on this sound data. The aim here is to uncover the 'hidden' states that generate the observed sound data - a crucial step in any...
Recent posts

Summary of my recent publication titled "Performance Evaluation of Lumped Conceptual Rainfall-Runoff Genie Rural (GR) Hydrological Models for Streamflow Simulation"

 As a hydrologist, I recently conducted a study to evaluate the performance of three lumped conceptual rainfall-runoff models, GR4J, GR5J, and GR6J, in estimating runoff in a sub-basin of the Bharathapuzha river basin in Kerala. Our findings showed that the GR4J model performed better than the GR5J and GR6J models in estimating streamflow. During the validation period, the NSE and R values were better than those during the calibration period for all three GR models. While the PBIAS values during the calibration period were better than those during the validation period for all three GR models, all three models showed a negative value of PBIAS in both calibration and validation periods, indicating an overestimation of streamflow by the models. Furthermore, we found that the GR4J model overestimated streamflow the least in both the calibration and validation periods. In addition, the GR4J and GR6J models outperformed the GR5J model in terms of NSE, PBIAS, and R values. Overall, our e...

Summary of "Trend Analysis and Forecasting of Streamflow in the Upper Narmada Basin using Random Forest (RF) and Long Short-Term Memory (LSTM) Models"

Summary of my EGU 2023 General Assembly Presentation: In our study, we investigated change point detection, trend analysis, and streamflow forecasting for Upper Narmada Basin We presented our findings at the EGU 2023 General Assembly, covering the following key points: Overview of Results: 1. Change Point Detection: Consistent change points detected by Pettitt's test and SNHT Significant alterations in streamflow levels were identified for each river station 2. Trend Analysis: Annual, seasonal, and monthly trends were analyzed using MK, MMK tests, and Sen's Slope method No significant trends were found using MK and MMK tests for annual data Varying patterns observed depending on the location and specific streamflow metric (average, maximum, or minimum) for seasonal and monthly data 3. Seasonal and Monthly Streamflow: Barmanghat: significant increasing trend in average and maximum streamflows in January before the change point Belkedi: the significant decreasing trend for maximu...

VBA Code for Calculating Nash-Sutcliffe Efficiency

The Nash-Sutcliffe Efficiency (NSE) is a statistical measure widely used in hydrology to evaluate the predictive performance of models. It is a dimensionless value that ranges from negative infinity to 1, with values closer to 1 indicating better model performance. The VBA code provided above calculates the NSE using two input ranges, one for observed values and the other for simulated values. The function first calculates the mean of the observed values and then uses it to compute the numerator and denominator of the NSE formula. The numerator sums the squared differences between the observed and simulated values, while the denominator sums the squared differences between the observed values and their mean. The function then subtracts the quotient of the numerator and denominator from 1 to obtain the NSE value. This VBA code can be used to calculate the NSE for a wide range of hydrological models in Microsoft Excel. It is a useful tool for model calibration and validation, as it allow...

How to convert daily streamflow data into monthly, yearly streamflow data Using python

Hydrological Data Analysis: 001 Hydrological data analysis often involves working with time series data. In hydrology, streamflow is a critical parameter that is monitored and analyzed regularly. Streamflow data is usually recorded daily, but for many applications, it is useful to have the data aggregated into monthly or yearly values. In this blog post, we will explore how to convert daily streamflow data into monthly and yearly values using Python. Importing the Required Libraries Before we start working on the data, we need to import the necessary libraries. We will be using the Pandas library for data manipulation and the Matplotlib library for visualization. We can import these libraries using the following code Loading the Data The first step is to load the daily streamflow data into a Pandas data frame. We assume that the data is stored in a CSV file named "streamflow_data.csv" and that the data has two columns: "Date" and "Streamflow". We can use t...

Understanding AR, MA, ARMA, and ARIMA Models for Time Series Analysis

Time series analysis is a popular method for forecasting future values based on past observations. There are several models used in time series analysis, including the autoregressive (AR), moving average (MA), autoregressive moving average (ARMA), and autoregressive integrated moving average (ARIMA) models. In this post, we'll briefly explain each model and its differences. Autoregressive (AR) Model The AR model assumes that the value of a variable at a given time point is a linear combination of its past values, plus some random error. The order of the AR model, denoted as p, refers to the number of past values used to predict the current value. For example, an AR(1) model uses only the most recent past value to predict the current value, while an AR(2) model uses the two most recent past values. The equation for an AR(p) model can be written as: y(t) = c + a1y(t-1) + a2y(t-2) + ... + ap*y(t-p) + e(t) where y(t) is the current value of the time series, y(t-i) is the value of the t...

Standard Precipitation Index

Standard Precipitation Index (SPI) SPI is used to characterize meteorological drought on a range of timescales. On short timescales, the SPI is closely related to soil moisture, while at longer timescales, the SPI can be related to groundwater and reservoir storage. The SPI can be compared across regions with markedly different climates. It quantifies observed precipitation as a standardized departure from a selected probability distribution function that models the raw precipitation data. The raw precipitation data are typically fitted to a gamma or a Pearson Type III distribution, and then transformed into a normal distribution Key Strength of SPI   • Uses precipitation only: it can characterize drought or abnormal wetness at different times scale which corresponds to the time availability of different water resources (eg: soil moisture, snowpack, river discharge, reservoir storage)   • Less complex to calculate than PDSI Key Limitation of SPI   • As a me...