<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by arahman on Medium]]></title>
        <description><![CDATA[Stories by arahman on Medium]]></description>
        <link>https://medium.com/@airdipu?source=rss-836ac75ee032------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TQR-FRfoBDiW0WXXMXBGFA.jpeg</url>
            <title>Stories by arahman on Medium</title>
            <link>https://medium.com/@airdipu?source=rss-836ac75ee032------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 04:53:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@airdipu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Measuring Correlation Between Continuous and Discrete Data: Methods and Insights]]></title>
            <link>https://medium.com/@airdipu/measuring-correlation-between-continuous-and-discrete-data-methods-and-insights-7900097e2047?source=rss-836ac75ee032------2</link>
            <guid isPermaLink="false">https://medium.com/p/7900097e2047</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[correlation]]></category>
            <category><![CDATA[statistical-analysis]]></category>
            <dc:creator><![CDATA[arahman]]></dc:creator>
            <pubDate>Sun, 12 Oct 2025 14:29:41 GMT</pubDate>
            <atom:updated>2025-10-12T14:29:41.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0EOtUGk8nPBNYyE6H_hJeA.png" /><figcaption>Methods for correlating continuous and discrete data</figcaption></figure><p>In data analysis, understanding the relationship between variables is crucial, but not all variables are created equal. While continuous variables like temperature, income, or voice pitch can take any value within a range, discrete variables such as mood, education level, or product categories are limited to specific values or labels. This difference raises an important question: <strong>how do you measure correlation when one variable is continuous and the other is discrete?</strong></p><p>Traditional correlation measures like Pearson’s correlation work well for two continuous variables, but they may fail or mislead when one variable is categorical. Fortunately, statisticians have developed several methods tailored for these scenarios, allowing analysts to uncover meaningful relationships even in mixed-type datasets.</p><p>In this post, we’ll explore the most widely used methods for correlating continuous and discrete variables, when to use each method, and practical tips for applying them to real-world data. By the end, you’ll have a clear roadmap for analyzing mixed-type data without losing interpretability or statistical rigor.</p><p>The choice of method depends primarily on the type of discrete variable (binary, nominal, or ordinal) and the properties of the continuous variable.</p><ol><li><strong>Point-Biserial Correlation</strong> (Discrete variable is binary, and the continuous variable is approximately normally distributed.)</li><li><strong>Biserial Correlation</strong> (Binary discrete variable represents an underlying continuous variable that has been dichotomised.)</li><li><strong>Correlation Ratio (Eta Coefficient)</strong> (Discrete variable has more than two categories (nominal), and the continuous variable is numerical.)</li></ol><p>But there have other options as well by converting the data into their counterpart data.</p><p><strong>Converting Discrete to Continuous</strong></p><p>Discrete variable (especially ordinal) can be treated as continuous if the categories have a meaningful numeric order s.t.sad=1, neutral=2, happy=3 then it’s possible to use standard correlation measures like: Pearson correlation (if the continuous variable is normally distributed), Spearman rank correlation (if non-normal).</p><p>This is possible if the discrete variable is ordinal, not purely nominal. Assigning arbitrary numbers to nominal categories ( happy=1, sad=2, neutral=3) can give misleading results if there’s no intrinsic order.</p><p><strong>Converting Continuous to Discrete</strong></p><p>It is possible to do bin or categorise continuous variables into discrete categories. Methods include:</p><ul><li><strong>Equal-width bins</strong>: Divide the continuous range into n equal intervals.</li><li><strong>Quantile bins</strong>: Divide the data so that each bin has roughly the same number of samples.</li></ul><p>Once the continuous variable is discretised, then it is possible to use <strong>Chi-square tests</strong> (for two discrete variables), <strong>Cramer’s V</strong> or <strong>Correlation Ratio</strong> (Eta) for multi-class comparisons. Also by treating it as ordinal data, Spearman’s correlation is possible to apply.</p><p>Discretisation reduces information and may weaken correlation signals and choice of bins can strongly influence results.</p><p>So, to convert discrete to continuous could be a good choice but need to take precautions depending on the scenario.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7900097e2047" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing PyTorch on Raspberry Pi 5]]></title>
            <link>https://medium.com/@airdipu/installing-pytorch-on-raspberry-pi-5-13619131db79?source=rss-836ac75ee032------2</link>
            <guid isPermaLink="false">https://medium.com/p/13619131db79</guid>
            <category><![CDATA[raspberry-pi-5]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[arahman]]></dc:creator>
            <pubDate>Tue, 18 Mar 2025 20:36:55 GMT</pubDate>
            <atom:updated>2025-03-18T20:36:55.501Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DGi_VpP0rSuvv1GJuiowQ.jpeg" /></figure><p>We need to install PyTorch for doing various task in Python. Since the Raspberry Pi 5 runs <strong>ARM architecture</strong>, installing PyTorch requires a special version. Here’s how we can install PyTorch in Raspberry Pi 5:</p><p>We will follow below steps for installing PyTorch step by step. For the whole process, I will continue to use<strong> bash</strong> in Raspberry Pi 5.</p><h3>Step 1: Update System</h3><p>Before installing PyTorch, we need to make sure that our system is fully updated. For updating, we need to run this command in bash:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><h3>Step 2: Install Dependencies</h3><p>Before installing PyTorch, we need to install some dependencies to avoid the version and dependencies problem. Using the below code, we can install dependencies for installing PyTorch.</p><pre>sudo apt install -y python3-pip libopenblas-dev libblas-dev libatlas-base-dev liblapack-dev</pre><h3>Step 3: Create Virtual Environment</h3><p>We need to create a <strong>virtual environment</strong> because Raspberry Pi 5 follows <strong>PEP 668</strong>, which restricts system-wide pip installations. We need to use the below code to create and activate a virtual environment for the PyTorch.</p><pre>python3 -m venv pytorch_env</pre><p>and to activate this created virtual environment, we need to activate it using:</p><pre>source pytorch_env/bin/activate</pre><h3>Step 4: Install PyTorch</h3><h4>For Python 3.9+ (Raspberry Pi OS 64-bit)</h4><p>If the system is Python 3.9+ for Pi Os 64 bit (we selected this system in the time of installing the OS in Raspberry Pi 5), then we need to use this below code for PyTorch installation.</p><pre>pip3 install torch torchvision torchaudio --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu</pre><h4>For Raspberry Pi OS 32-bit (Legacy)</h4><p>If the system is <strong>32-bit OS</strong>, then we need to use this below code for PyTorch installation.</p><pre>pip3 install torch torchvision torchaudio --no-cache-dir --index-url https://www.piwheels.org/simple</pre><h3>Step 5: Verify Installation</h3><p>Now, we need to check if we install PyTorch correctly or not. For that reason, we need to run Python and check PyTorch using the below code in bash:</p><pre>python3 -c &quot;import torch; print(torch.__version__); print(&#39;CUDA available:&#39;, torch.cuda.is_available())&quot;</pre><ul><li>If it prints a <strong>PyTorch version</strong>, installation was <strong>successful</strong>.</li><li><strong>CUDA should be False</strong> at this point.</li></ul><h3>Optional: Install OpenCV with PyTorch</h3><p>If using PyTorch for <strong>computer vision</strong>, install OpenCV:</p><pre>pip3 install opencv-python</pre><p>At last, we can deactivate the virtual environment using the code:</p><pre>deactivate</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13619131db79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wavelet Transformation in Machine Learning]]></title>
            <link>https://medium.com/@airdipu/wavelet-transformation-in-machine-learning-81d9d7155bf1?source=rss-836ac75ee032------2</link>
            <guid isPermaLink="false">https://medium.com/p/81d9d7155bf1</guid>
            <category><![CDATA[wavelet-transformation]]></category>
            <category><![CDATA[signal]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[feature-extraction]]></category>
            <dc:creator><![CDATA[arahman]]></dc:creator>
            <pubDate>Sat, 01 Jun 2024 10:58:41 GMT</pubDate>
            <atom:updated>2024-06-01T10:58:41.640Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMw9HlvVnGtyjlF7bS1fSA.png" /><figcaption>Wavelet Transformation of a sample signal.</figcaption></figure><p>This series of wavelet transformations is intended to explain the concept for purposes related to machine learning and various other contexts. This introduction will provide an overview of wavelet transformation.</p><p><strong>What is Wavelet?</strong></p><p>Wavelets are mathematical functions used for analyzing, processing, and representing data, particularly for signals and images. They are an effective technique for breaking down complex data into simpler components at various scales or resolutions. This is particularly beneficial in areas such as signal processing, image compression, and time-frequency analysis.</p><p>A wavelet is an oscillation that resembles a wave and has an amplitude that starts at zero, fluctuates in value, and repeats itself one or more times. Wavelets have been classified according on the quantity and orientation of their pulses. Wavelets are capable of multi-resolution analysis, which is the examination of data at several scales or resolutions. This helps identify both large- and small-scale features in an image or signal.</p><p><strong>Wavelet Transform (WT)</strong></p><p>WT can converts a signal or image into a set of coefficients to represent the signal or image at different scale. There are two types of WT: one is Continuous Wavelet Transform (CWT) and another one is Discrete Wavelet Transform (DWT).</p><p>CWT is used for a continuous analysis of the signal, which involves scaling and translating a mother wavelet (A mother wavelet is a prototype function used to generate wavelets at different scales and translations. Commonly used mother wavelets are <em>Haar wavelet</em>, <em>Daubechies wavelets</em>, and <em>Morlet wavelet</em>) across the signal and calculating the correlation between the wavelet and the signal at each point.</p><p>DWT is used for discrete analysis and is particularly useful for digital signal processing. It involves decomposing a signal into a set of orthogonal wavelet coefficients. DWT is widely used in applications like image compression.</p><p><strong>Applications</strong></p><p>There are a lot of applications and among them few are given below:</p><ul><li>Signal Processing: Denoising, compression, and feature extraction from signals.</li><li>Image Processing: Image compression, denoising, and enhancement.</li><li>Time-Frequency Analysis: Analyzing non-stationary signals where both time and frequency information are needed.</li><li>Data Compression: Efficiently compressing data by capturing important features while discarding redundant information.</li></ul><p><strong>Advantages</strong></p><p>Wavelets provide both time and frequency localization, making them more effective than traditional Fourier transforms for analyzing transient or non-stationary signals. It can be computed efficiently, making them suitable for real-time applications.</p><p>In summary, wavelets are versatile mathematical tools used for decomposing and analyzing data across different scales, providing insights that are not easily obtainable with traditional methods. Their ability to localize features in both time and frequency domains makes them particularly useful for handling complex, real-world signals and images.</p><p><strong>References</strong></p><ol><li><a href="https://en.wikipedia.org/wiki/Wavelet">https://en.wikipedia.org/wiki/Wavelet</a></li><li>Ali N. Akansu, Richard A. Haddad. <a href="https://www.sciencedirect.com/book/9780120471416/multiresolution-signal-decomposition">Multiresolution Signal Decomposition (Second Edition)</a>, 2001.</li><li>Valentina Emilia Balas, Vijender Kumar Solanki and Raghvendra Kumar. <a href="https://www.sciencedirect.com/book/9780128213261/an-industrial-iot-approach-for-pharmaceutical-industry-growth">An Industrial IoT Approach for Pharmaceutical Industry Growth</a>, 2020</li><li>Arts, L.P.A., van den Broek, E.L. The fast continuous wavelet transformation (fCWT) for real-time, high-quality, noise-resistant time–frequency analysis. <em>Nat Comput Sci</em> <strong>2</strong>, 47–58 (2022). <a href="https://doi.org/10.1038/s43588-021-00183-z">https://doi.org/10.1038/s43588-021-00183-z</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81d9d7155bf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use SSHFS to Mount Drive in macOS using macFUSE]]></title>
            <link>https://medium.com/@airdipu/use-sshfs-to-mount-drive-in-macos-using-macfuse-563be8eac634?source=rss-836ac75ee032------2</link>
            <guid isPermaLink="false">https://medium.com/p/563be8eac634</guid>
            <category><![CDATA[sshfs]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[mount]]></category>
            <dc:creator><![CDATA[arahman]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 10:46:58 GMT</pubDate>
            <atom:updated>2024-02-26T10:46:58.558Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>If you often work with different file systems or need to get access of data from a different platform from your macOS device, you need to mount the drive in your local device to read and write data easily.</p><p><strong>What is macFUSE?</strong></p><p>Well, macOS FUSE or filesystem in user space, is an open-source software for the integration of various file systems into macOS by providing access and work with non-native file systems.</p><p><strong>Procedure</strong></p><p>To use macFUSE, first of all you need to install macFUSE from the <a href="https://osxfuse.github.io/">link</a>. It’s better to install the stable version of macFUSE along with the file system SSHFS (we will try for the SSHFS file system in here).</p><p>The steps for the mount of the drive are:</p><p>&gt; Install OSXFuse and SSHFS from the <a href="https://osxfuse.github.io/">link</a>.</p><p>&gt; Need to change the security to install third -party apps from your settings.</p><p>&gt; To check the installation happens correctly, try this code in the terminal:</p><pre>sshfs --version</pre><p>You will get return as,</p><pre>SSFHS version 2.5 (OSXFUSE SSHFS 2.5.0)<br>FUSE library version: 2.9.9<br>fuse: no mount point</pre><p>&gt; After the installation, you need to create a folder in your home directory where you need to mount the drive. For example, <em>mkdir mount_data/</em></p><p>&gt; You need to copy paste below code in your terminal to mount the drive:</p><pre>sshfs name@your_server:/home/.. mount_data/</pre><p>You will find your data in the folder <em>mount_data/.</em></p><p>If there have any problem after mounting the drive for example showing, that “macFUSE giving mount_macfuse: mount point … is itself on a macFUSE volume”, you need to unmount the folder and then need to mount again. To unmount the drive you need to enter this code:</p><pre>umount mount_data/</pre><p>If it’s showing error again the you need to try:</p><pre>diskutil umount force mount_data/</pre><p>Conclusion</p><p>Using the above information you can configure a SSHFS mount from a linux environment to your macOS with a minimal configuration although it is not an optimal solution for a production deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=563be8eac634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reynolds Transport Theorem to Partial Differential Equation (PDE)]]></title>
            <link>https://medium.com/@airdipu/reynolds-transport-theorem-to-partial-differential-equation-pde-84fbc76022a3?source=rss-836ac75ee032------2</link>
            <guid isPermaLink="false">https://medium.com/p/84fbc76022a3</guid>
            <dc:creator><![CDATA[arahman]]></dc:creator>
            <pubDate>Sun, 22 Oct 2023 12:42:15 GMT</pubDate>
            <atom:updated>2023-10-22T12:42:15.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*ToUY7zelZXVBUqQ-i-jeIQ.png" /><figcaption>Reynolds Transport Theorem</figcaption></figure><p><strong>Reynolds–Transport Theorem to Partial Differential Equation (PDE)</strong></p><p><strong>Reynolds–Transport Theorem</strong> is one of the method for creating partial differential equations, which are crucial for explaining natural and industrial processes. The Reynolds-Transport Theorem is a fundamental concept in fluid dynamics and continuum mechanics. It allows us to connect the time rate of change of a physical quantity (like mass, momentum, energy, etc.) within a control volume to the net flow of that quantity across the control volume boundaries.</p><p>This theorem is essential because it provides a systematic way to analyze and describe the behavior of fluid systems, which is crucial in various fields including engineering, meteorology, oceanography, and more.</p><p>Let’s consider an arbitrary physical quantity <em>u </em>occupying at the time <em>t = 0</em> in the domain Ω_<em>0</em> ⊂ R(n). Let this domain move with time i.e.</p><blockquote>Φ: [0, T]×Ω_0 →R(n)</blockquote><p>and define</p><blockquote><em>Ω_t :={x = Φ(t, y): y∈ Ω_0}</em>.</blockquote><p>Here, the domain <em>Ω_0</em> at time<em> t = 0</em> is called <em>reference configuration</em> and the map <em>t → x := Φ(t, y)</em> describes the <em>trajectory</em> of the <em>point y ∈ Ω_0</em>. With the help of the reference configuration <em>Ω_0</em>, we have two possibilities to identify an element <em>x of Ω_t</em>:</p><p>i) If we use the spatial coordinate <em>x</em> and the time <em>t</em>, we use the <em>Eulerian description</em>.</p><p>ii) If we use the original position <em>y</em> and the time <em>t</em>, we use the <em>Lagrangian description</em>.</p><p>We can define the velocity of he particle at point <em>x = Φ(t, y) </em>by</p><blockquote><em>v(t, x) = v(t, Φ(y, t)) := ∂/∂t (Φ(t, y))</em>.</blockquote><p>The total mass <em>M</em> of the quantity <em>u</em> inside the domain <em>Ω_t</em> is the integration of <em>u(t, x)</em> over <em>Ω_t</em>.</p><p>The Reynolds transport theorem provides an integral relation between the change of the total mass <em>M_t</em> and the local changes of the density <em>u</em> and the transportation velocity <em>v</em> in an arbitrary domain <em>Ω_t ⊂ R(n)</em>.</p><p>For an example (Traffic on a highway), let <em>u</em> be the density of vehicles on a highway. Then the flux <em>q</em> is given by <em>q = u · v</em>, where<em> v</em> is the velocity of the vehicles.</p><p>We assume, that he vehicles travel — independent of the density — all with a constant velocity <em>a</em>. Then</p><p><em>q = au</em><br>and we obtain the linear transport or advection equation</p><blockquote><em>∂_t u + a∂_x u = 0</em></blockquote><p>where u : R+ × R → R, (t, x) → u(t, x). This equation is a <em>linear, first order partial differential equation (PDE)</em>.</p><p>Let’s consider another example called sugar in the coffee. Let <em>u</em> be the concentration of sugar in a cup of coffee. How to model the flux of the sugar?</p><p>When the sugar dissolves in the coffee, it moves from regions of high concentration to regions of lower concentration, this effect is known as <em>diffusion</em>. Therefore it seems reasonable to model the flux to be proportional to the negative gradient of the concentration,</p><blockquote><em>q := −κ </em><strong><em>grad</em></strong><em> u</em></blockquote><p>where <em>κ &gt; 0</em> is the diffusion constant. The above relation is also known as Fick’s law of diffusion. Plugging this into the transport equation <em>∂_t u + div q = 0</em> leads to</p><blockquote>∂_t u − κ ∆ u = 0 .</blockquote><p>This is a linear, second order PDE called <em>diffusion or heat equation</em>.</p><p>In simpler terms, the Reynolds-Transport Theorem helps us understand how things like mass, momentum, and energy move and change within a defined area, which is incredibly useful when studying fluid flow and related phenomena.</p><p><strong>References:</strong> Evans, Blackledge, Yardly Numerical Methods for Partial Differential Equations, Springer 1999.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84fbc76022a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>