Who Said Ma­chine Learn­ing is Rocket Science?

If you’ve been cu­ri­ous about ma­chine learn­ing, this ar­ti­cle is a good place to start ex­plor­ing it. Apart from in­tro­duc­ing read­ers to the ba­sics, it also en­cour­ages you to learn by point­ing you in the di­rec­tion of var­i­ous on­line cour­ses and li­braries.

OpenSource For You - - For U & Me - By: Puneet Ba­tra The au­thor works as a soft­ware pro­fes­sional at Xo­ri­ant So­lu­tions. He is al­ways keen to learn new tech­nolo­gies and share his knowl­edge with oth­ers. He can be reached at puneet­ba­tra29@gmail.com.

All of a sud­den, ev­ery­one has started talk­ing about ar­ti­fi­cial in­tel­li­gence or AI. Rapid ad­vances in this field have cer­tainly forced peo­ple to be­lieve that this is go­ing to drive innovation for at least a decade. We ex­pe­ri­ence the ap­pli­ca­tion of AI in our daily lives in in­nu­mer­able ways. This could be in the form of an ad­ver­tise­ment of a prod­uct on a so­cial me­dia plat­form where you were plan­ning to buy some­thing, or it could be a rec­om­men­da­tion of an­other prod­uct that pops up as you’re pur­chas­ing a prod­uct from an e-com­merce web­site. For ex­am­ple, a rec­om­men­da­tion may be made to buy a mo­bile cover just as you’re buy­ing a mo­bile phone, be­cause the site’s sys­tem has pre­dicted a higher prob­a­bil­ity of be­ing able to sell a mo­bile cover along with the phone. So, know­ingly or un­know­ingly, we are al­ready ex­pe­ri­enc­ing AI.

There have been some in­cred­i­ble de­vel­op­ments in AI that have led many to be­lieve it is go­ing to be the tech­nol­ogy that will shape our fu­ture. 1. Al­phaGo beats world cham­pion at the game Go: In March 2016, Google’s Deep­Mind achieved a ma­jor vic­tory in deep learn­ing. Al­phaGo, a di­vi­sion of the com­pany, mas­tered the an­cient Chi­nese game Go and de­feated Lee Sedol, the world cham­pion in four out of five games. Ac­cord­ing to many, Go is con­sid­ered to be the most com­plex pro­fes­sional game be­cause of a huge num­ber of po­ten­tial moves that can be made.

2. AI pre­dicted US elec­tion results: Many of us were sur­prised by the out­come of the US pres­i­den­tial elec­tion results, but a startup called MogIA based in Mum­bai was able to pre­dict it suc­cess­fully a month be­fore the results were de­clared. The com­pany an­a­lysed so­cial me­dia sen­ti­ment through mil­lions of so­cial me­dia data points. This was the firm’s fourth suc­cess­ful pre­dic­tion in a row. 3. AI im­proves cancer di­ag­no­sis: There have been some path-break­ing in­no­va­tions in the field of health­care. It is be­lieved that the health­care in­dus­try is go­ing to ben­e­fit the

most from AI. There are AI pro­grams that can now pre­dict the oc­cur­rence of cancer with 90 per cent ac­cu­racy just by analysing the symp­toms of a pa­tient, which can help a doc­tor to start treat­ment early.

Many of us of­ten con­fuse the terms ‘ar­ti­fi­cial in­tel­li­gence’, ‘ma­chine learn­ing’ and ‘deep learn­ing’. Hence, we use the terms in­ter­change­ably. But these are not the same things.

Ar­ti­fi­cial in­tel­li­gence, in broader terms, can be de­scribed as a branch of com­puter science that can im­i­tate hu­man be­ings. It has been demon­strated that com­put­ers can be pro­grammed to carry out very com­plex tasks that were ear­lier only per­formed by hu­mans. From self-driv­ing cars and Ama­zon’s Alexa or Ap­ple’s Siri, to a com­puter pro­gram play­ing a game of chess, all of these are ap­pli­ca­tions of ar­ti­fi­cial in­tel­li­gence.

Ma­chine learn­ing can be re­ferred to as a sub­set of AI.

It is con­sid­ered one of the most suc­cess­ful ap­proaches to

AI, but is not the only ap­proach. For ex­am­ple, there are many chat bots that are rule based, i.e., they can an­swer only cer­tain ques­tions, de­pend­ing on the way they were pro­grammed. But they will not be able to learn any­thing new from those ques­tions. So this can be cat­e­gorised as

AI as the chat bots repli­cate hu­man-like be­hav­iour, but can’t be termed as ma­chine learn­ing. Now, the ques­tion is: can ma­chines re­ally ‘learn’? How is it pos­si­ble for a ma­chine to learn if it doesn’t have a brain and a com­plex ner­vous sys­tem like hu­mans? Ac­cord­ing to Arthur Sa­muel, “Ma­chine learn­ing can be de­fined as a field of study that gives com­put­ers the abil­ity to learn with­out be­ing ex­plic­itly pro­grammed.” We can also de­fine it as the com­puter’s abil­ity to learn from ex­pe­ri­ence to per­form a cer­tain task, whereby the per­for­mance will im­prove with ex­pe­ri­ence.

This is akin to a com­puter pro­gram play­ing chess, which can be cat­e­gorised as ma­chine learn­ing, if it learns from pre­vi­ous ex­pe­ri­ences and sub­se­quently makes bet­ter moves to win a game.

Deep learn­ing can be cat­e­gorised as a sub­set of ma­chine learn­ing. It uses neu­ral net­works to sim­u­late hu­man de­ci­sion-mak­ing skills. A neu­ral net­work con­sists of many neu­rons and hence re­sem­bles a hu­man ner­vous sys­tem. Have you ever won­dered how Facebook de­tects your face amongst many, in an im­age? Im­age de­tec­tion is one of the ex­am­ples of deep learn­ing, which is much more com­plex as it needs lots of data to train it­self. For in­stance, a deep learn­ing al­go­rithm can learn to recog­nise a car but will have to be trained on a huge data set which con­sists of cars as well as other ob­jects. If this is not done, it might make a wrong de­ci­sion like iden­ti­fy­ing a bus as a car. Hence, com­pared to other ma­chine learn­ing al­go­rithms, a deep learn­ing al­go­rithm re­quires much more data in or­der to ob­serve and un­der­stand ev­ery minute de­tail to make the right de­ci­sions.

From Fig­ure 1, you can see how all these terms are re­lated to each other, yet are not the same.

Now that you have un­der­stood the dif­fer­ences be­tween ar­ti­fi­cial in­tel­li­gence, ma­chine learn­ing and deep learn­ing, let’s dig deeper into ma­chine learn­ing.

There are three main types of ma­chine learn­ing al­go­rithms. 1. Su­per­vised learn­ing: The data set in su­per­vised learn­ing con­sists of in­put data as well as the ex­pected out­put. The al­go­rithm is a func­tion which maps this in­put data to the ex­pected out­come. The al­go­rithm will con­tinue to learn un­til the model achieves a de­sired level of ac­cu­racy. Then this model can be ap­plied to new sets of data, for which the ex­pected out­come is not avail­able but needs to be pre­dicted from a given set of data.

For in­stance, let’s look at a car man­u­fac­tur­ing com­pany that wants to set a price for its new­est model. In or­der to do so, it can use this su­per­vised learn­ing model. The com­pany’s in­put data set may con­sist of details of pre­vi­ous car mod­els — their fea­tures like the num­ber of air bags, elec­tronic gad­gets, etc. The out­put (or ex­pected out­come) would be the sale price of the car. Now an al­go­rithm can be de­signed to map those in­put pa­ram­e­ters (or fea­tures) to the ex­pected out­come. Once the al­go­rithm achieves the de­sired level of ac­cu­racy, this model can be ap­plied to the firm’s new car model.

This can help the com­pany pre­dict the car price at which it should be launched.

For bet­ter results, the com­pany can use a data set of car mod­els of other man­u­fac­tur­ers and their prices. This would help the com­pany in set­ting a com­pet­i­tive price.

In ma­chine learn­ing, the best results are not achieved by us­ing a great al­go­rithm but by us­ing the most data. 2. Un­su­per­vised learn­ing: The only dif­fer­ence be­tween su­per­vised and un­su­per­vised learn­ing is that the data set doesn’t have the ex­pected out­come as in the su­per­vised learn­ing model. The data set will only have in­put pa­ram­e­ters (or fea­tures) and the al­go­rithm will have to pre­dict the out­come. For in­stance, if a shirt man­u­fac­tur­ing com­pany is look­ing to man­u­fac­ture three dif­fer­ent sizes of shirts (small, medium and large), its data com­prises the shoul­der, waist and chest sizes of its cus­tomers. Now, de­pend­ing upon this huge data set, the com­pany needs to group the sizes into three cat­e­gories so that there can be a best fit for ev­ery­one. Here, an un­su­per­vised learn­ing model can be used to group the dif­fer­ent data points in three dif­fer­ent sizes and pre­dict an ap­pro­pri­ate shirt size for ev­ery cus­tomer.

As per the graph given in Fig­ure 2, let’s con­sider a com­pany that has only the shoul­der and waist mea­sure­ments as in­put pa­ram­e­ters of the data set. It will now have to cat­e­gorise this data set into three groups, which can help the com­pany pre­dict the shirt size for ev­ery cus­tomer. This tech­nique is known as clus­ter­ing, in which the data set is clus­tered into the de­sired num­ber of clus­ters. Most of the time, the data set is not like the one shown in this ex­am­ple. Data points that are very close to each other make it dif­fi­cult to im­ple­ment clus­ter­ing. Also, clus­ter­ing is just one of the many tech­niques used in un­su­per­vised learn­ing to pre­dict the out­come. 3. Re­in­force­ment learn­ing: In re­in­force­ment learn­ing, a ma­chine or an agent trains it­self when ex­posed to a par­tic­u­lar en­vi­ron­ment, by a process of trial and er­ror. Let’s con­sider a kid who wants to learn to ride a bi­cy­cle. First, she will try to learn from some­one who al­ready knows how to ride a bi­cy­cle. Then, she will try rid­ing on her own and might fall down a num­ber of times. Learn­ing from her pre­vi­ous mis­takes, she will try to ride with­out fall­ing. And when she fi­nally rides the bike with­out fall­ing, it can be con­sid­ered as a re­ward for her ef­forts. Now let’s con­sider this kid as a ma­chine or an agent who is get­ting pun­ished (fall­ing) for com­mit­ting a mis­take and earn­ing a re­ward (not fall­ing) for not com­mit­ting any mis­take. A chess-play­ing pro­gram can be a good ex­am­ple of this, whereby one wrong move will pe­nalise the agent and it may lose a game, while a com­bi­na­tion of one or more right moves will earn it a re­ward by mak­ing it win. These are the three ba­sic learn­ing mod­els of ma­chine learn­ing. As per the need, these mod­els can be used in com­bi­na­tion to gen­er­ate a new model. For in­stance, su­per­vised learn­ing can some­times be used along with un­su­per­vised learn­ing, de­pend­ing upon the data set as well as the ex­pected out­come.

Peo­ple of­ten feel that ma­chine learn­ing is only for some­one who is good with math­e­mat­ics or statis­tics, and will be im­pos­si­ble to learn for any­one else. This is a fal­lacy. Ma­chine learn­ing is not rocket science after all. The only thing that is re­quired to learn it is ea­ger­ness and cu­rios­ity.

The num­ber of tools and li­braries avail­able has made it even eas­ier to learn it. Google’s Ten­sorFlow li­brary, which is now open source, or the nu­mer­ous Python li­braries like NumPy and scikit-learn, are just a few of these. Any­one can use these li­braries and even con­trib­ute to them to solve prob­lems, as they are open source. You don’t need to worry about the com­plex­i­ties in­volved in your al­go­rithm, like com­plex math­e­mat­i­cal com­pu­ta­tions (such as gra­di­ent, ma­trix mul­ti­pli­ca­tion, etc) as this task can be left for these li­braries to im­ple­ment. Li­braries make it eas­ier for ev­ery­one so that in­stead of get­ting in­volved in im­ple­ment­ing com­plex com­pu­ta­tions, the user can now fo­cus on the ap­pli­ca­tion of the al­go­rithm.

There are also many APIs avail­able that can be used to im­ple­ment an AI based sys­tem. One such API is IBM’s Wat­son – a cog­ni­tive, com­put­ing based AI sys­tem. Cog­ni­tive com­put­ing is a mix­ture of dif­fer­ent tech­niques such as ma­chine learn­ing, nat­u­ral lan­guage pro­cess­ing, AI, etc. Wat­son is ca­pa­ble of do­ing many tasks like an­swer­ing a user’s queries, help­ing doc­tors to spot dis­eases, and a lot more.

If you are ex­cited by the prospects that ma­chine learn­ing of­fers, our dig­i­tal ed­u­ca­tion era has made things eas­ier for you. There are many mas­sive open on­line cour­ses (MOOC) of­fered by many com­pa­nies. One such course is pro­vided by Cours­era-Ma­chine Learn­ing. This is taught by An­drew Ng, one of the co-founders of Cours­era. This course will give you a ba­sic un­der­stand­ing of the al­go­rithms that are im­ple­mented in ma­chine learn­ing, and it in­cludes both su­per­vised learn­ing and un­su­per­vised learn­ing. It’s a self-paced course but de­signed to be com­pleted in 12 weeks. If you want to dig deeper and study deep learn­ing, which is a sub­set of ma­chine learn­ing, you can learn it through an­other course pro­vided by fast.ai. This course is split into two parts: Prac­ti­cal deep learn­ing for coders (Part 1) and Cut­ting edge deep learn­ing for coders (Part 2). Both have been de­signed for seven weeks each and pro­vide you a great in­sight into deep learn­ing. If you fur­ther want to spe­cialise in deep learn­ing, you can opt for a deep learn­ing spe­cial­i­sa­tion course by Cours­era and deeplearn­ing.ai.

We all know that the­ory with­out prac­tice is like a body with­out life. So, for you to prac­tice, there are many sources that can pro­vide you a huge data set to test your knowl­edge and im­ple­ment what you’ve learnt. One such web­site is Kag­gle, which pro­vides a di­verse data set and can help you over­come your ma­jor hur­dle, i.e., get­ting data to test your learn­ing model.

If you some­times feel lost in this jour­ney of learn­ing, when your al­go­rithm does not work as ex­pected or when you don’t un­der­stand a com­plex equa­tion, re­mem­ber the fa­mous di­a­logue in the movie, The Pur­suit of Hap­py­ness: “Don’t ever let some­one tell you that you can’t do some­thing. Not even me. You got a dream; you gotta pro­tect it. When peo­ple can’t do some­thing them­selves, they’re gonna tell you that you can’t do it. You want some­thing, go get it. Pe­riod.”

Fig­ure 1: Ar­ti­fi­cial in­tel­li­gence, ma­chine learn­ing and deep learn­ing

Fig­ure 2: Un­su­per­vised learn­ing us­ing clus­ter­ing

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.