Tag: Python

Making profits during Coronavirus (COVID-19) outbreak
Coronavirus (COVID-19) outbreak brought the world economy and the stock market to their knees. Many people and most companies are fighting to survive these hard times. On the other hand, some are using this situation to make huge profits. In this experiment I demonstrated how to make over 80% gains, while the stock market is ...

Artificial Neuron learning in Python
It all starts with a single neuron! Or with a perceptron. Perceptron is a neuron’s computational model. If you link some of them together, you get to a real ‘artificial brain’ capable of learning complex stuff. When I try to explain basic AI concepts to non computer scientist, I usually start like this … You ...

The power of Visual Data Science.
When I do not deal with people, machines or numbers, I enjoy the pleasures of data visualizations. #VisualThinking #DataScience #Python

Some nice & new visualizations
I love plotting data and learning from the visualizations. Here are some new data plots of projects I was working on lately.

Market Basket Analysis – Mining Frequent Pairs in Python
Have you ever asked yourself how the store managers decide on product shelf placement in retail stores? There must be some strategy behind it, right? It can’t be just a random choice. Almost on daily basis, you receive product purchase recommendations from variety of sources where you have left your “digital fingerprint”. In many cases these ...

Bloom Filter Example in Python
The title might also have been, “how to reduce 10 Gb of data to 1 single Megabyte”. BigData is only going to get bigger in the future. Our challenge, among others, is to find efficient methods and algorithms to (quickly) deal with wast amounts of data, extract meaningful information and to find ways how to ...

Recommender System in Python
The Amazon and Netflix are making almost 50% of their revenues by recommending appropriate products (books, movies) to their users. But how do they know what to recommend to their users? Well, they use the power of the collaboration between all other items and users. btw… If you would like to go deeper into the ...

Visual Gallery
As the end of year 2016 is approaching, I decided to gather and summarize my visualizations on one page. Have a look. Visual Gallery Happy new year! Cheers! #visual #analytics #bigdata #BI #ML #datamining #mmds #plots Post by @dzhamzic. Source: Visual Gallery

Twitter API Streaming in Python
Maybe the easiest way to connect to Twitter API and to stream tweets, is using Python and Tweepy. You can install Tweepy using pip: Tweepy is an open source library and you can check the source here. Maybe, take a peak at StreamListener class and see what additional options are available. ‘Nuff said. Here’s the ...

Google’s PageRank Algorithm in Python
Have you ever asked yourself how google ranks the pages when you search something on google.com? If yes, have a look at PageRank algorithm definition. I’ll not go into much details here, but to give you an idea, the World Wide Web can be seen as a large graph, consisting of pages as nodes and ...

Anonymous Web Scraping with Python Selenium PhantomJS Xpath and TOR
Using pure selenium methods to extract data from metasearch websites is quite tricky and uses a lot of CPU resources. I have spent significant amount of time with selenium built-in methods with python and have a feeling that the development is quite tedious, time consuming and prone to bugs. Selenium’s WebElement objects are not flexible, ...

Distribute Missing Values in Pandas DataFrame Column with Python
If you want to test how Maschine Learning algorithms perform with missing values you may need a script to distribute a fixed percentage of missing values in a feature. This script randomly distributes missing values in a single data set’s column. Enjoy…

Pandas DataFrame Subsampling in Python
Written long time ago to feed some ML algorithms with data subsets because the original data set was to huge and the algorithm execution performance was too long. Have fun with the script…

Feature Scaling in Python and Pandas DataFrame
Hire is a small script that i wrote long time ago to scale some of the features in order to get better performance and better prediction results in some ML algorithms. I used Python with Pandas to read in the CSV file and process feature values. Formulas for feature scaling used in the script can be found ...

How to crawl Hotel Informations from booking using Python and Selenium
This post continues on the last one. Assuming you have the hotel list with urls from booking you can now extract addresses for each hotel. This address can be further converted to latitude and longitude since geo information that can be crawled from booking is not quite right. The script below extracts the address and hotel star ...