Tải bản đầy đủ - 0 (trang)
Hour 22. Microsoft Azure Machine Learning

Hour 22. Microsoft Azure Machine Learning

Tải bản đầy đủ - 0trang

Forexample,predictiveanalyticscanusetimeseries,neuralnetworks,andregression

algorithmstopredictfutureoutcomes.Predictiveanalyticsanswerssuchquestionsas

these:

Whichstocksshouldbetargetedaspartofportfoliomanagement?

Didsomestocksshowhaphazardbehavior?Whichfactorsareimpactingstockgains

themost?

Howareusersofe-commerceplatforms,onlinegames,andwebapplications

behaving,andwhy?

HowdoIoptimizeroutingofmyfleetofvehiclesbasedonweatherandtraffic

patterns?

HowdoIbetterpredictfutureoutcomesbasedonidentifiedpatternsandtrends?

HowcanIanticipatecustomerchurn?Whichcustomersarelikelytogo,sothatI

cantakeproactivemeasurestoretainthem?

Whatrecommendationcanbemadeforproductsorservicestothecustomersbased

oncustomerbehaviors?

Note:MachineLearning

“Machinelearning,abranchofartificialintelligence,concernsthe

constructionandstudyofsystemsthatcanlearnfromdata.Forexample,a

machinelearningsystemcouldbetrainedonemailmessagestolearnto

automaticallydistinguishbetweenspamandnon-spammessages.After

learning,itcanthenbeusedtoclassifynewemailmessagesintospamand

non-spamfolders.”—Wikipedia

Withthehelpofmachinelearning,youcancreatedatamodelsfromdatasets

bytrainingthedata.Themodelrepresentsthedatasetandgeneralizestomake

predictionsforthenewdata.

GOTO RefertoHour1,“IntroductionofBigData,NoSQL,Hadoop,and

BusinessValueProposition,”toreviewhowdatasetscanreducewaitingtimesin

theemergencyroom,predictdiseaseoutbreaks,andhelpwithfrauddetectionand

crimeprevention,amongmanyotherscenarios.

Predictiveanalyticswithmachinelearningisnotanewconcept.However,thetraditional

approachofmachinelearninghadsomeproblems:

Machinelearningwasusuallydeployedinanon-premisesinfrastructureandwas

self-managedbyasophisticatedengineeringteam.

Ithadasteeplearningcurveforarathercomplexprocessesusingmathematical,

statisticalcomputingthatrequirestrained,expertdatascientists.Thefinancialcost

ofhavingdatascientistsonboardand,atthesametime,cleansingthedataforcorrect

andaccurateinferenceswasoftentoocostly(inbothtimeandmoney)forcompanies

toexploittheirdata,eventhoughtheyrealizedthatdataanalysiswasaneffective

meansofimprovingtheirservicesandoptimizingtheirstrategies.



Buildingmachinelearningsystemstookalongtime.Itrequireddatascientiststo

buildthetrainingsetsandguidethemachinelearningsystemthroughitsfirststep.

Theprocesswascomplexandexpensive.Insomecases,bythetimeacompany

startedtorealizethevalueofthemodel,themodelmightnotberelevanttothe

currentcircumstances.



IntroductiontoAzureML

MicrosoftAzureMLisanewcloud-basedmachinelearningplatformofferedasafully

managedcloudservice.Itenablesdatascientistsanddeveloperstoefficientlyembed

predictiveanalyticsintotheirapplications.Italsohelpsorganizationsusemassive

amountsofdatainpredictionandassistscompaniesinforecastingandchangingfuture

outcomes.Atthesametime,itbringsallthebenefitsofthecloudplatformtothemachine

learningprocess.

Note:SimplicityandEasewithAzureML

“Youtakedatafromyourenterprisesandmakeseveralhypothesesand

experimentwiththem.Whenyoufindahypothesisthatyoucanbelievein,

thatseemstoworkanditseemstovalidate,youwanttoputthatinto

productionsoyoucankeepmonitoringthatparticularhypothesiswithnew

dataallthetimeandtrackyourpredictionsofwhatisgoingtohappenversus

what’sactuallyhappeningandadjustyourposition.Andthatprocessisnow

somucheasiernowwithAzureML.”

—JosephSirosh,CorporateVicePresident,MachineLearning,Microsoft

http://www.citeworld.com/article/2366161/big-data-analytics/microsoftazure-ml-overview.html

AzureMLoffersadatascienceexperiencetomakeinferencesfromyourmassiveamount

ofdataandisnotlimitedtodatascientistsonly:Reducedcomplexityandbroader

participationthroughmoreuser-friendlytoolingmakesitdirectlyaccessibletodomain

expertsorbusinessanalysts.Forexample,itspredefinedtemplates,workflows,and

intuitiveuserinterface(UI)werebuilttohelpanalystsordatascientistsdigdeeperand

forecastfutureoutcomeswithpredictiveanalyticsmuchquickerthanwithtraditional

methods.

Althoughyoustillneedtounderstandandformulateyourqueriesappropriately,web-and

workflow-basedvisualtoolshelpyoubuildquestionseasilyfromanywhere.Youcan

publishmachinelearningAPIsontopoftheAzureMLplatformsothatotherscaneasily

hookthemupfromanyenterpriseapplicationorevenanymobileapplicationforbuilding

intelligencebytakinginnewdataandproducingrecommendations.



BenefitsofAzureML

AzureMLisextremelysimpletouseandeasiertoimplement,soanalystswithvarious

backgrounds(evennon-datascientists)canleverageit.Asauser,youjustneedtoknow

yourdataandknowhowtosetupandframeyourproblem;thenyoucanleverageAzure

MLtobuildthepredictivemodel.

Unliketraditionalmethods,inwhichanITteamwithsophisticatedprogramming

experiencehandleddeployment,youcanhandleAzureMLdeploymentyourself.Consider

someofthebenefitsofusingAzureML:

Youdon’tneedtoinstallsoftwareortacklehardwareprovisioning;itsfully

managedcloudservicemakesmachinelearningsimpleandpowerful.

Itsweb-basedvisualcompositionandmodulessupportend-to-enddatascience

workflow(whichcanbeaccessedfromavarietyofwebbrowsers)inadrag,drop,

andconnectdesignapproach.

AzureMLusesbest-in-classmachinelearningalgorithms—thesamethathaverun

XboxandBingforyears.

ItofferssupportforR.Morethan400Rpackageshavealreadybeenported,soyou

canstartusingitimmediately.YoucanevenuseyourownRpackageswiththe

modelyouarecreatinginAzureML.

YoucanquicklydeployAzureMLmodelsasAzurewebservices,forbothrequest

response(forasmallerdataset)andbatchscoring(foralargerdataset),withafew

clicksandinjustafewminutes.

AzureMLoffersacollaborativedatascienceexperiencesothatyoucanworkwith

anyone,anywhere,viatheAzureMLworkspace.

ThebestpartofAzureMListhatitisatriedandtestedproductbasedonmorethan20

yearsofmachinelearningexperience.Itspowerfulalgorithmsarebeingusedinseveral

Microsoftproducts,includingXbox,Kinect,MicrosoftMalwareProtectionCenter,

Cortana,SkypeTranslator,andBing.Microsoftreleasedadataminingcomponentor

algorithmsforpredictiveanalyticswithSQLServer2005(availableinlaterversionsas

well).

SomeearlyadoptersofAzureMLarelargeretailcustomersthatarebeinghelpedby

MAX451(http://blogs.technet.com/b/machinelearning/archive/2014/07/14/how-azure-mlpartners-are-innovating-for-their-customers.aspx),aMicrosoftpartner.Thegoalisto

predictwhichproductsacustomerismostlikelytopurchasenext,basedone-commerce

andbrick-and-mortarstoredata,sothatthecompaniescanstocktheirstoresevenbefore

demandrises.

AnotherMicrosoftpartner,OSISoft,isworkingwithCarnegieMellonUniversity

(http://www.microsoft.com/casestudies/Power-BI-for-Office-365/Carnegie-MellonUniversity/University-Improves-Operational-Efficiency-Cuts-Energy-Consumption-by30-Percent-with-BI-Solution/710000003921)onperformingreal-timefaultdetectionand

diagnosingenergyoutputvariationsacrossuniversitycampusbuildings.Thiswillhelp

predictandthenplanformitigationactivitiestoreduceoroptimizeoverallenergyusage



andcost,inareal-timescenario.



AzureMLWorkspace

AzureMLintroducesthenotionofmodelingwiththeAzureMLworkspace,whichyou

canthinkofasacontainerfordataandanexperimentforyourprojectsandteam.Adata

scientistcanbepartofmorethanoneworkspaceandcaneasilyswitchbetween

workspacestocontributetothematthesametime.Morethanonedatascientistcanaccess

aspecificworkspacesothattheyallcancollaborativelyworkonthedataandexperiment.

AstheownerofanAzureMLworkspace,youcaninviteotherstocontributetothe

workspace.Theworkspacethusallowsthegrouptoworkonthecommonprojectby

gatheringdata,modules,andexperimentsforcommonuse.Thesearesomeofthe

elementsyoutypicallyfindinanAzureMLworkspace:

Datasets—Youidentifydatasetstobeusedinexperimentsthatyoucreateinthe

workspace.Youcancreateadatasetbyloadingdatafromvarietiesofsources,such

asyourlocalsystem,AzureSQLdatabase,AzureBlob,weborFTPsites,andonline

data.Youcanalsocreateadatasetasanoutputfromanexperiment,tobeusedin

otherexperiments.AzureMLincludesseveralsampledatasetstoquicklylearnthe

functionalitiesofAzureMLandseehowtoleverageit.

Modules—Amoduleisacomponentoralgorithmthatyouuseinyourexperiments.

Forexample,youcanuseonemoduletobringdataintotheworkspaceanduse

anothermodulewithanalgorithmtoapplythat.AzureMLincludesvarietiesof

modules,rangingfrommoduleswithdataingressfunctionstomoduleswith

training,scoring,andvalidationprocesses.Oftenamodulehasasetofparametersor

propertiesthatcanconfigurethemodule’sinternalalgorithmsorbehaviors.

Experiments—AnexperimentisanAzureMLmodelthatcontainsanalytical

modulesthatareconnectedforpredictiveanalytics.Whiledevelopingyour

experiment,youcanrunyourexperimenttoanalyzeitsoutcome,saveacopyofit(if

needed),andthenrunitagain.Whenyouaresatisfiedwithyourexperiment(you

havetrainedaneffectivemodel),youcanpublishitaswebservicesothatotherscan

accessyourmodel.Experimentscontaindatasetsandmodulesandexhibitthese

characteristics:

Anexperimentcontainseitheratleastonedatasetormodule,oracombinationof

both.

Datasetsbringdataforprocessingintotheexperimentsand,hence,canbe

connectedtomodulesonly.

Modulesinsideanexperimentcangetdatafromadatasetviainputportsandcan

passdatatoanothermoduleintheexperimentviaoutputports.

Somemodulescomewithasetofparameters,soalltherequiredparametersmust

besetforthemoduleforittofunctionasexpected.

Foragivenmodule,alltheinputportsmustbeconnectedtothedataflowto

receivedatatoworkonit.



Workspaceconfiguration—Detailsincludethenameoftheworkspaceandusersof

theworkspaces.



AzureMLStudio

AzureMLStudioisbrowser-basedcollaborativevisualintegrateddevelopment

environmentformachinelearningsolutions.Itcanbeusedfromanydevice,from

anywhereintheworld,tobuild,test,anddeploypredictiveanalyticssolutionsthatoperate

onyourowndata.Ithasaneasy-to-use,intuitivedrag,drop,andconnectinterfacefor

settingupyourexperiment.AzureMLStudiocontainsmodulesforeachstepofthedata

scienceworkflow,includingreadingdatafromvarioussources(bothon-premisesandin

thecloud),cleansingandtransformingdata,creatingatrainingandtestset,applying

machinelearningalgorithms,andevaluatingtheresultingmodel.Withthesebuilt-in

modules,datascientistscanavoidprogrammingforalargenumberofcommontasksand

insteadcanfocusonthedata,theirexperimentdesign,anddataanalysis.

Note

AzureMLStudiocontainsbest-in-breedbuilt-inmachinelearningalgorithms

thatyoucanusequickly;italsocontainsmorethan400open-sourceR

packagesthatyoucanusesecurelyinAzureML;youcanembedyourown

custompackagesaswell.

Hour11,“CustomizingHDInsightClusterwithScriptAction,”andHour20,

“PerformingStatisticalComputingwithR,”coveredinstallingRsoftware

whileprovisioningHDInsightandthenusingit.Here,however,weare

referringtoAzureMLasapredictiveanalyticsplatformthatalsoincludes

severalRalgorithmsorpackages.

Whenyouarefinishedwithyourmodeldevelopment,youcanquickly(inminutes)and

easily(withafewmouseclicks)deployitinproductionasawebserviceforothers;you

don’thavetospendseveraldaysdoingthis,aswiththetraditionalapproachofmachine

learning.Whenyoudeployyourmodel,AzureMLcreatestwowebservices,onefora

requestresponsetoprocessandscoreindividualrequests,andoneforbatchdata

processing.



ProcessestoBuildAzureMLSolutions

CreatinganAzureMLsolutionisaniterativeprocessthatincludestheseiterativephases

(seeFigure22.1):

Define/refinethebusinessproblemandobjective—Youmustfirstunderstandthe

businessproblemanddefinewhatyouwanttoachieve.What’syourendobjective?



FIGURE22.1AzureMLsolutiondevelopmentprocesses.

Collectandpreparedata—Youmustunderstandthedomainandthedatayouneed

tosolvethebusinessproblem.Thenyoucancollectandstartunderstandingthedata,

dealwithvagariesandbiasesindataacquisition(missingdata,outliersduetoerrors

inthedatacollectionprocess,moresophisticatedbiasesfromthedatacollection

procedure,andsoon).

Developandtrainthemodelthroughiterations—Framethebusinessproblemin

termsofanAzureMLproblem—classification,regression,ranking,clustering,

forecasting,outlierdetection,andsoon—tofindtrendsandpatternsinthedatathat

leadtosolutions.WhenyouaredevelopingandtrainingAzureMLmodels,you

don’tneedtobeanexpertinanyprogramminglanguage;youjustneedtovisually

connectdatasetsandmodulestoconstructyourpredictiveanalysismodel.

Experimentandevaluate,andanalyzeresults—Train,test,andevaluatethe

modeltocontrolbiasorvarianceandensurethatthemetricsarereportedwiththe

rightconfidenceintervals(cross-validationhelpshere).Bevigilantagainsttarget

leaks(whichtypicallyleadtounbelievablygoodtestmetrics).Notethatthisstepis

alsoiterative—youchangeinputsormachinelearningalgorithmstogetdifferent

scoresandforbetterevaluation.

OperationalizetheAzureMLmodelandmonitorthemodel’sperformance

—WhenyouaresurethatyourdevelopedAzureMLmodelsolvesthebusiness

problem,youcandeploythemodeltosolvethebusinessproblemintherealworld.

Keepmonitoringforitseffectivenessintherealworld.



GettingStartedwithAzureML

AsyoucanseeinFigure22.2,youfirstmustobtainaMicrosoftAzuresubscription.Ifyou

haveonealready,youcanuseit,oryoucanchoosetouseatrialsubscriptionforlearning

purposes.



FIGURE22.2AzureMLdevelopmentworkflow.

Note

Asofthiswriting,Microsoftoffersaone-monthfreesubscriptionwitha$200

credittospendonAzureservicesforsigningup.(See

http://azure.microsoft.com/en-us/pricing/free-trial/.)Whenyouhaveaccessto

theMicrosoftAzuresubscription,youcangototheAzureManagement

Portal(https://manage.windowsazure.com/)andcreateanAzureML

workspace.

YoucancreateanAzureMLworkspacebyclickingtheicononthebottomleft.Youare

promptedwithanice-lookinguserinterfacewhereyoucanselecttheAzureserviceyou

wanttoprovision.ForanAzureMLworkspace,selectDataServices,MachineLearning,

QuickCreate,andthenspecifythedetailstocreateanAzureMLworkspace(seeFigure

22.3).



FIGURE22.3CreatinganAzureMLworkspaceintheAzureManagementPortal.



AfteryouhavecreatedtheAzureMLworkspace,youcanclickittoviewitsdetail(see

Figure22.4).Onthisdashboard,youcanmanageaccesstotheAzureMLworkspace,

managewebservices,changetheworkspaceowner,andsoon.Fromhere,youcanlogin

totheAzureMLStudio(seeFigure22.4).



FIGURE22.4ViewingthedetailsofthecreatedAzureMLworkspace.

Tip

Alternatively,youcanusehttps://studio.azureml.net/todirectlysigninto

AzureMLStudio.

WhenyouaresignedintoAzureMLStudio,youwillseeaninterfacesimilartotheAzure

ManagementPortal,butwithdifferentoptionstoworkwithAzureML(seeFigure22.5).

Ontheleftside,youcanseetabs,suchasExperiments,toshowalltheexperimentsyou

haveinworkspace,alongwithsampleexperiments.TheWebServicestabshowsthe

deployedwebservicesfromtheexperiments.TheDatasetstabdisplaysthedatasetsyou

havecreatedintheworkspace.YoucangototheSettingstabtochangethenameand

descriptionfortheworkspace,regenerateauthorizationtokens,changeuseraccesstothe

workspace,andsoon.



FIGURE22.5AzureMLStudio.

Ifyouclicktheiconatthebottomleft,youarepromptedwithanice-lookinguser

interface,whereyoucancreateanewdatasetoranewexperiment(seeFigure22.6).

Whenyouarecreatinganexperiment,youhaveachoicetocreateablankexperimentand

thenstartaddingdatasetsormodulestoit,orcreateanexperimentbasedonsamples

availableforlearningpurposes.



FIGURE22.6CreatinganewexperimentinAzureMLStudio.

Whenyoucreateablankexperiment,yourscreenshouldlooklikeFigure22.7.Ontheleft

side,youcanseedifferentmodulescategoricallygroupedtouseinyourexperiment.Inthe

middleisacanvastocreateyourAzureMLdatascienceworkflowusingdifferentdatasets

andmodules.Ontherightsidearethepropertiesoftheworkspaceortheselectedmodule

inthecanvas.Atthebottom,youhaveoptionstozoomoutorzoominforbettervisibility

ofthedatascienceworkflowinthecanvas,alongwithoptionstosavetheworkspaceora



copyofit.



FIGURE22.7AzureMLStudiocanvastocreateanexperimentanditsworkflow.

Fortesting,youclicktheRuniconatthebottomtoexecutetheAzureMLexperiment.

Youalsohaveoptionstopublishanexperimentbyfirstcreatingascoringexperimentand

thencreatingwebservicesbypublishingit.



RetrievingDataintoAzureMLModules

Youlearnedearlierthatyoucanbringinthedatafromvarioussourceseitherbycreatinga

datasetfromthelocalfilesystemorbyusingaReadermoduletobringinonlinedata.Just

dragaReadermodule,availableundertheDataInputandOutputgroup(oryoucaneven

searchforamoduleinthesearchboxatthetop),tothecanvasandsettheproperties

appropriately(seeFigure22.8).



FIGURE22.8ReadingdatafromavarietyofsourcesusingtheReadermodule.

Whenyouhavedata,youcanuseitinfurthermodulesforpreprocessing,suchas

cleansingdata,removingduplicates,orjoiningtwodatasets,beforeyouuseitwithAzure

MLmodules.

NowyoucanbringinonlinedatausingtheReadermodule,butbefore,youmustgive

yourexperimentameaningfulname(inthiscase,wenameditMyFirstExperiment).

SelecttheReadermoduletobringinadults’incomecensusdata;todothat,specifyWeb

URLviaHTTPasthedatasourcepropertyandselect

http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.dataastheURL

property.TheformatofthisdataisCSVwithnoheader.

Clicktheoutputport(thetinydotatthebottom)oftheReadermodule,andyouwillsee

disabledoptionstodownloadorvisualizethedataset(seeFigure22.9).Thisisbecause,

eventhoughyouhavepointedtothecorrectURL,youhavenotyetretrievedthedata.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Hour 22. Microsoft Azure Machine Learning

Tải bản đầy đủ ngay(0 tr)

×
x