<?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 Sifat Muhammad Abdullah on Medium]]></title>
        <description><![CDATA[Stories by Sifat Muhammad Abdullah on Medium]]></description>
        <link>https://medium.com/@sifat.abdullah577?source=rss-dcd50b05cc4f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Da3DJgZt1OKnYcnpntXdbg.png</url>
            <title>Stories by Sifat Muhammad Abdullah on Medium</title>
            <link>https://medium.com/@sifat.abdullah577?source=rss-dcd50b05cc4f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 19:05:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sifat.abdullah577/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[Introduction to ThunderSVM: A Fast SVM Library on GPUs and CPUs]]></title>
            <link>https://medium.com/analytics-vidhya/how-to-install-and-run-thundersvm-in-google-colab-de1fe49eef85?source=rss-dcd50b05cc4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1fe49eef85</guid>
            <category><![CDATA[support-vector-machine]]></category>
            <category><![CDATA[svm]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Sifat Muhammad Abdullah]]></dc:creator>
            <pubDate>Sun, 23 Aug 2020 16:51:39 GMT</pubDate>
            <atom:updated>2020-08-26T09:23:09.515Z</atom:updated>
            <content:encoded><![CDATA[<p>And how to run it on Google Colab …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ybu9fEJ8EG4SY9JGpycwmA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@thisisengineering?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">ThisisEngineering RAEng</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Support Vector Machine(SVM) is a machine learning algorithm used for classification and regression. It is one of the most basic ML algorithms which can be used to classify points in high dimensional space and to predict real numbers from a set of given features. If you want to know more in-depth about SVM, feel free to read the following:</p><h4>SVM in Classification</h4><ul><li><a href="https://medium.com/machine-learning-101/chapter-2-svm-support-vector-machine-theory-f0812effc72">Chapter 2 : SVM (Support Vector Machine) — Theory</a></li><li><a href="https://towardsdatascience.com/https-medium-com-pupalerushikesh-svm-f4b42800e989">Support Vector Machines(SVM) — An Overview</a></li><li><a href="https://towardsdatascience.com/support-vector-machine-simply-explained-fee28eba5496">Support Vector Machine — Simply Explained</a></li></ul><h4>SVM in Regression</h4><ul><li><a href="https://towardsdatascience.com/an-introduction-to-support-vector-regression-svr-a3ebc1672c2">An Introduction to Support Vector Regression (SVR)</a></li><li><a href="https://www.analyticsvidhya.com/blog/2020/03/support-vector-regression-tutorial-for-machine-learning/">Support Vector Regression Tutorial for Machine Learning</a></li></ul><p>In this article, we will get to see how to install and run ThunderSVM in <a href="https://colab.research.google.com/">Google Colab</a>. Let’s see what thundersvm is first…</p><h3>ThunderSVM</h3><p><a href="https://github.com/Xtra-Computing/thundersvm">ThunderSVM</a> is an open-source library which leverages GPUs and multi-core CPUs in applying SVM to solve problems in a much faster way with high efficiency. The speedup increase using <em>thundersvm</em> compared to <em>scikit-learn svm </em>in classification<em> </em>increases proportionally with the amount of data. By changing just one line of code, you can speed up your algorithm by about 70 times!</p><p>In using thundersvm, first you have to install it following the steps below.</p><h3>Installation</h3><p>To fully utilize both cpu and gpu, use the gpu runtime in google colab. First, open <a href="https://colab.research.google.com/">colab</a> and click <em>Runtime</em> &gt;&gt; <em>Change runtime type </em>from the Menubar<em>. </em>Next, click<em> GPU </em>in the<em> Hardware Accelerator </em>dropdown menu. This will activate a gpu backend for your google colab script.</p><p>CUDA Toolkit 9.0 is required to run thundersvm. We’ll install this first.</p><p>Now, execute the following lines of code one after another in the order shown below:</p><pre>1. !wget <a href="https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb">https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb</a></pre><pre>2. !ls  # Check if required cuda 9.0 amd64-deb file is downloaded</pre><pre>3. !dpkg -i cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb</pre><pre>4. !ls /var/cuda-repo-9-0-local | grep .pub</pre><pre>5. !apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub</pre><pre>6. !apt-get update</pre><pre>7. !sudo apt-get install cuda-9.0</pre><p>Next, run the following command to check if CUDA 9.0 is successfully installed:</p><pre>!nvcc --version</pre><p>After running this, if you get to see <em>Cuda compilation tools, release 9.0 </em>followed by specific version number in the last line of output, then installation is done. If you want to install it in your local computer, just run the above commands sequentially in terminal by removing the “!” for each of them. If you want to check the output results, the code for installation is available <a href="https://github.com/SifatMd/thundersvm-tutorial/blob/master/Installation_Steps.ipynb">here</a>.</p><p>Next, we’ll install thundersvm.</p><h3>Install ThunderSVM</h3><p>Run the following command to install it in google colab.</p><pre>!pip install thundersvm</pre><p>If you only want to use the cpu without the gpu in executing thundersvm, execute the following command in colab:</p><pre>!pip install thundersvm-cpu</pre><p>You can also run the above commands in the terminal of your computer removing the “!” to install in your PC.</p><p>For the cpu only version, you don’t need to install CUDA 9.0. Thundersvm will use all cores of cpu in both cases. The following steps are identical for both the cpu and gpu versions.</p><h3>Execution</h3><p>Let us run support vector classification with thundersvm in the following way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/137003a91b45fc3c462d834efde51138/href">https://medium.com/media/137003a91b45fc3c462d834efde51138/href</a></iframe><p>As we can see, apart from changing the import statement, everything else is similar to running <a href="https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html"><em>scikit-learn svm</em></a>.</p><h3>Speed-Up Evaluation</h3><p>To see the comparison of increase in speed between <em>scikit-learn svm</em> and <em>thundersvm</em>, let’s look at the code below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dea6cdf47c9e8a48c2cf9e5055b3bb72/href">https://medium.com/media/dea6cdf47c9e8a48c2cf9e5055b3bb72/href</a></iframe><p>We can already see more than 50x speedup for fitting on training data. Both prediction and scoring functions also become more than 17x faster. If we continue to increase the amount of data, the speedup increases proportionally for all the three above functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*O5AWlQGNxYvdK7JR-yCoUA.png" /></figure><p>Doubling the amount of data from 50,000 to 100,000 increased the speedup for <em>Fit</em> function from 20x to 70x. By the time we crossed 200,000 samples, <em>thundersvm</em> results in more than 120x speedup in training speed! Both <em>Score</em> and <em>Predict </em>functions also resulted in more than 20x speedup in execution time. During my use in google colab, I used the Tesla-P100 gpu. Individual rate of speedup increase may vary depending on the type of gpu.</p><p>The code for comparison of speedup and visualization can be found <a href="https://github.com/SifatMd/thundersvm-tutorial/blob/master/compare_and_visualize.ipynb">here</a>.</p><h3>Conclusion</h3><p>SVM can be really slow to run on large amounts of data. But, by using thundersvm, you can easily speed up every aspect of your code. You can use it in Linux, Windows and MacOS. Thundersvm also supports all the functionalities of LibSVM including Support Vector Regression(SVR), one-class SVMs and probabilistic SVMs. You can check it out <a href="https://thundersvm.readthedocs.io/en/latest/get-started.html">here</a> to learn more.</p><p>I hope this helps you a bit in your coding journey. All the Best! 😀</p><p>Thanks for reading! If you liked this post or have any questions/comments, please leave a comment below!</p><p>The code for this post can be found on my <a href="https://github.com/SifatMd/thundersvm-tutorial">GitHub</a> page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1fe49eef85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/how-to-install-and-run-thundersvm-in-google-colab-de1fe49eef85">Introduction to ThunderSVM: A Fast SVM Library on GPUs and CPUs</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reverse Geocoding with Geonames in Python]]></title>
            <link>https://medium.com/analytics-vidhya/reverse-geocoding-with-geonames-in-python-3b5bb176a26c?source=rss-dcd50b05cc4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b5bb176a26c</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[geocoding]]></category>
            <category><![CDATA[geopy]]></category>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Sifat Muhammad Abdullah]]></dc:creator>
            <pubDate>Wed, 20 May 2020 11:01:33 GMT</pubDate>
            <atom:updated>2020-05-22T17:00:27.259Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reverse Geocoding with GeoNames in Python</h3><h4>How to get Location names from raw Latitude/Longitude values</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQ4qk-YBzcrcvX5-wWzbWg.jpeg" /></figure><h4>What is Reverse Geocoding?</h4><p>The process of finding the name of an address or a location for a given latitude/longitude pair. It is an essential module in many location related data science applications.</p><p>I was trying to find a way to get the location names in English for a set of latitude/longitude pairs. I found some blogs using <a href="https://nominatim.org/release-docs/develop/api/Overview/"><strong>Nominatim</strong></a> which is also used by <a href="https://www.openstreetmap.org/">OpenStreetMap</a>(OSM) for geocoding and reverse-geocoding purposes. But, Nominatim returns location names in local language (for instance, for China in Chinese, Bangladesh in Bengali etc). Sure, you can easily translate them to English in python, but there is also another way using <a href="https://geopy.readthedocs.io/en/stable/#geonames"><strong>GeoNames</strong></a><strong> </strong>which is free for use and returns location names in English.</p><p>In this tutorial, we will use GeoNames class from geopy library to perform reverse-geocoding.</p><h4>Install Library</h4><p>At first, we need to install <a href="https://geopy.readthedocs.io/en/stable/"><strong>geopy</strong></a> library from terminal with the following command.</p><pre>pip install geopy</pre><p>Now, our coding part starts.</p><h4><strong>Import Class</strong></h4><p>We just need to import one class for this tutorial.</p><pre>from geopy.geocoders import GeoNames</pre><h4><strong>Initialization</strong></h4><p>In order to initialize GeoNames, we have to do the following:<br>1. Create a new user account <a href="https://www.geonames.org/login">here</a>.<br>2. In the logged in state, go to this <a href="https://www.geonames.org/manageaccount">link</a> to activate free web services.<br>3. Click “Click here to enable” link below the page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*SqtHKhU4d2eC-9R0a34eWw.png" /></figure><p>So, our account has been granted free web services from GeoNames.</p><p>Now, we initialize by providing our GeoNames account username in place of ‘your_username’ like the following:</p><pre>geo = GeoNames(username=’your_username&#39;)</pre><h4>Find Location Name</h4><p>Next, we enter latitude, longitude values to get the desired location info.</p><pre>latitude, longitude = 23.765328, 90.358641 #enter any value here<br>location = geo.reverse(query=(latitude, longitude), exactly_one=False, timeout=5) <br># timeout: Time, in seconds, to wait for the geocoding service to    # respond. In case of timeout error, increase it&#39;s value.</pre><p>The above code will return a list type object. We can do the following to get name of the location:</p><pre>location_name = location[0]</pre><p>Thus, in only a few lines of code, we can get the location name of a particular address.</p><h4><strong>Free Data Sources</strong></h4><p>GeoNames also open sourced their<a href="https://www.geonames.org/datasources/"> Data Sources</a> on several countries. One can easily download these according to one’s needs.</p><h4><strong>Limitations</strong></h4><p>Although GeoNames is free for general purpose use, it does have some <a href="http://www.geonames.org/export/#terms">limitations</a>. There are hourly and daily limits per application(identified by username). So, with one username, we can perform a certain number of requests(function calls). For <a href="http://www.geonames.org/export/credits.html">reverse-geocoding</a>, we can perform about 333 requests in one hour. If you want to use for <a href="http://www.geonames.org/commercial-webservices.html">commercial</a> purposes, you can purchase credits too. But for small scale projects, the free version is good enough.</p><h4><strong>Conclusion</strong></h4><p>We can now easily find our desired location names from given latitude/longitude pairs. For ease of use, here is the final code.</p><pre># import class<br>from geopy.geocoders import GeoNames</pre><pre># initialize with your username<br>geo = GeoNames(username=’your_username’)</pre><pre># get location information<br>latitude, longitude = 23.765328, 90.358641 #enter your desired value<br>location = geo.reverse(query=(latitude, longitude), exactly_one=False, timeout=5)</pre><pre># get location name<br>location_name = location[0]</pre><pre># print location name<br>print(location_name)</pre><p>I hope you find this article helpful :) .</p><p>All the Best!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b5bb176a26c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/reverse-geocoding-with-geonames-in-python-3b5bb176a26c">Reverse Geocoding with Geonames in Python</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>