Thursday, November 19, 2015

IBM WATSON: Part 1

Hello there and welcome to my first blog post, in a new series, highlighting the amazing power of the Supercomputer: Watson!

First of all, what is Watson?

Watson, simply put, is an intelligent, NLQA (Natural Language Question Answering) system developed by IBM. It has the capability to answer questions posed to it in natural language. Watson has enough cognitive ability to learn about any topic, with a "corpus" of knowledge fed into Watson by humans. Such corpora include Healthcare, Travel and Cooking - its current 3 main uses. Watson is also continuously trained by professionals in the area that he is trying to learn.

Examples of an NLQA system could be Siri, Google Now, Sirius, or Cortana to name of a few.

However,  Google, Bing, Yahoo, DuckDuckGo don't fall into this category.

The difference is that NLQA systems actually extract the answers and give them to the user. However, search engines just give back results that may hold the answers, and humans have to dig into the results and find the answers themselves. Also, if you, in general, don't know what "Natural Language" is, it's what we're using right now, to talk and to communicate.

Also, in the past, Watson had an extremely difficult test, to see if it actually has the power to be the most advanced NLQA system out there.

Watson played a game of "Jeopardy!", a game show where contestants are shown clues, and they have to come up with questions as answers. Watson played against the game show's two best contestants: "Ken Jennings" and "Brad Rutter" (imagine ANY other NLQA system even trying to do that).
To everyones surprise, Watson won that game with $1,000,000.

Watson's big win actually meant and indicated that it should be put to an appropriate use elsewhere and therefore IBM decided to put it to use in Healthcare, Travel and Cooking at the moment.

You might want to know: The project manager for Watson is "David Ferrucci"
You might also want to know: Watson was built on IBM's "POWER7" Supercomputer.

Watson also has the capability to "learn", using algorithms classified under "Machine Learning". Now, what this allows Watson to do, is to make sure that it never repeats a mistake. I will take an example here. Young kids have an urge to draw on the wall. When they do it, parents usually scold them. Over time the kids link drawing on the wall with a negative outcome of their actions. Their brains don’t want the negative outcome, so they learn not to draw on the wall . Similarly Watson links mistakes with a negative outcome so, it'll learn not to make mistakes. 

Furthermore, Watson works by using these four steps, to determine the answer to a question:

1. Question Analysis - In this step, Watson will try to figure out what the question is asking for, and what the answer type (should) be.

2. Hypothesis Generation - Here, Watson creates hundreds of different possible candidate answers. These are mostly answers that are wrong by a LOT, but again, it NEEDS a lot of answers to choose from. Because later, Watson will have an extreme variety of answers to choose from, and will probably score the correct answer as correct.

3. Hypothesis and Evidence Scoring - Now, Watson will try to weigh each answer. It will downgrade wrong answers, by looking at the evidence that does NOT support the hypothesis, and upgrade correct answers, with evidence that DOES support the hypothesis.

4. Final Merging and Ranking - Finally, Watson ranks all the candidate answers, and displays the top 3 answers on the answer panel. It gives confidence scores for each candidate answer and says out the final, first ranked answer, in hopes that it is right.

This blog post was an introduction to the IBM Watson NLQA system.

I will continue to write and take you into depth on how to use Watson, and also release a few articles on how to use Watson APIs as well.

My due credits and thanks to IBMWatson.com

Monday, July 20, 2015

NSTimers

Welcome to a VERY simple blog post, also my first tutorial!

This time, I will be teaching you how to use something called an "NSTimer".

These are the very useful applications of the NSTimer:

- Repeating a block of code over and over
- Checking for updates from a web server
- Creating a timer
- Checking variables, repeatedly
- Executing a block of code after a time delay

etc.

Let's see how to create a function for the Timer (just a simple Swift function, that will print "Hello World"):

func printHelloWorld() {
    print("Hello World")
}

Next, let's see how we can start the timer:

var timer = NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: "printHelloWorld", userInfo: nil, repeats: true)

The above timer will call the "printHelloWorld" function every 2 seconds.

You can also create a timer, without starting it:

var timer = NSTimer(timeInterval: 2, target: self, selector: "printHelloWorld", userInfo: nil, repeats: true)

The above timer will take all variables into account, but to start it, you must add it to Swift's "Run Loop":

NSRunLoop.currentRunLoop().addTimer(timer, forMode: NSRunLoopCommonModes)
That will start the loop.
No matter what method you choose of starting the timer, you always end it like so:
timer.invalidate()


That's it for this simple tutorial! If you have any more questions or suggestions, please email me at: tajymany@gmail.com

Hope you learned something new and enjoyed it!

Tuesday, July 7, 2015

XCodeToIPA (Part 2) FAQ

Welcome to the FAQ for the "XCodeToIPA (Part 2)" video that I released. Whenever someone asks me a question about this video and I am able to get a working answer for them, I will also be uploading the question and answer here. Here they are:

Q: Can I remove the popup that says "dl.dropboxusercontent would like to install <appname>" after I click on "Install"?
A: Sorry, no you cannot! If you could, it would be a system vulnerability. This is due to the fact that the install button is ACTUALLY a link, and if you were to be automatically redirected to a link like that, someone could install a malicious app right onto your iDevice! If the popup stays, however, then you can just "Deny" the app from being put onto your device. So, Apple decided to keep the popup there with force.

Thursday, July 2, 2015

First Post!

Welcome to my Blog. This is my first post, explaining what I will be writing & sharing in this blog!

1) I will be putting up written, article versions of some of my short videos (on iOS, Mac, and Swift)
2) Basic & Advanced Swift tutorials
3) Information about technology, that were not fit for a video
4) I will even make some posts on how to create games in Swift!

Hope you enjoy!

You can mail me at: tajymany@gmail.com