This article is about Machine Learning prediction using data collected from a website and google trend. It is a toy example that assumes a correlation between the keyword “coffee” search on Google and the historical price of coffee. The example shows how to combine different sources of data in a library called Prophet to make multivariate future predictions (Figure 1 shows the final output of the learning exercise). To get the data from this website I used Selenium and Pytrend to access the information from Google trend. The full code implementation can be found here on my GitHub account.

Figure 1. Price prediction graph of the coffee price up to 2022


Figure 1. KNN how it works

The k-nearest neighbours’ algorithm (kNN) is a non-parametric machine learning method used for classification and regression. It is non-parametric because the model does not learn any parameters to make correct predictions. Instead, it will look at closest training examples (the number of examples depends on the k selected by the user) in feature space. When used for classification, the output is a class group. An object is classified by a plurality vote of its neighbours, with the item being assigned to the class most common among its k nearest neighbours. When used for regression, the output is the average of…

The whole concept of machine learning is figuring out ways in which we can teach a computer to perform a task without needing to provide explicit instructions.

Fig.1 Classify Wine Brand using Machine Learning.

For example, we might want to instruct a machine to recognise the brand of a bottle of wine. The first step would be to enter a wine shop with some lab tools and write down wine characteristics for all the bottles of wine. …

Guido Salimbeni

Data Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store