Monday, October 16, 2017

Creating a Simple Bot with Dialogflow (Formerly Api.ai)

Dialogflow (formerly api.ai) is kind of a framework from Google which is used to interact with your product by building engaging voice and text-based conversational interfaces powered by AI.


Here are the simple steps to build a weatherbot which will fetch the realtime weather from Yahoo. Dialogflow interacts with Yahoo Weather by means of an Python API deployed in Heroku (with GitHub).

  1. Open https://dialogflow.com/ and click sign up.
  2. Sign in with your Google Account.
  3. Once logged in, click on create Agent 


    4. Enter the name of the bot and click save
    5. Goto Intents and click Create Intent



6. Enter the intent name as weather-intent and enter the text under “User says” as required. This will be text which would be considered as input or recognized from your speech. Enter "yahooWeatherForecast" under action name (This is the action name in our python code available in Github). Click “Save”


8. If you don’t have an account in heroku, you will be asked to Signup
9. After Signup, you will be asked for Appname and choose region.
10. Enter a Appname and click “Deploy App”

11. Enter https://weatherbotdemo.herokuapp.com/webhook in the browser, you should get as “Method Not Allowed” if the app is successfully deployed. We will get this error since GET is not allowed.

12. Enter the webhook URL under fulfillment in Dialogflow and click Save.

13. Click on Intents in Dialogflow and select “Use webhook” under fulfillment. Click Save.

14.  Enter the text in try it now as "how is weather in location_name ?"




Thursday, October 5, 2017

Introduction to Data Science and Machine learning

Data science :


  • Data means facts and statistics collected together for reference or analysis.
  • Science means Systematic study of the structure and behavior of the physical and natural world through observation and experiment.

Data + Science = Data Science is nothing but extracting the knowledge and insights from the collected data in either structured or unstructured form.

Now you might think that Data Science is similar to Data Mining , which is the term which we are very familiar with for quite long time. The answer is “NO”. Data Science by itself contains Data Mining but Data Mining is not equivalent to Data Science.


Img Src : https://goo.gl/nTTGS2



Machine Learning :



As the name suggests, Machine Learning (ML) is nothing but training a Program to perform better with the experience. It’s like the more you make the machine to practice , the more efficient it would be.

Tom Mitchell defined Machine Learning as “A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.”

A simple example would be the recommendations in Online sites. Let’s say you are trying to buy a new iPad, then you are most likely to buy a cover for it. So the cover for your iPad will be shown in the recommendations.

But you should keep in mind that, it’s not always possible to train a machine with the set of expected inputs/results. There are different types of Machine Learning to make the machines learn or to train it ;)

Machine Learning is done with the help of Data Science. Machine Learning algorithms learn from Data, so basically we are implementing Data science in ML.

Does Machine Learning is another term for Artificial Intelligence ? My answer would be “NO”. Machine Learning is a part of Artificial Intelligence which works well with Data Science.

The different Machine Learning Categories are,

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

Machine Learning & DataScience are the current buzz words in industry which has given birth to new kids like Chatbots, IOT (Google Home, Amazon Alexa...) etc.,etc.,

What is oAuth 2.0 ?

Almost every one of us is using services of Google, Microsoft, Facebook, Apple etc., every day, either directly or indirectly. We see in mos...