Transcript
Page 1: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

RapidMinerwalkthrough

1. InstallRapidMiner7.3fromhttps://my.rapidminer.com/nexus/account/index.html#downloads

PleasealsoremembertoapplyforanEducationallicensenoworafterthiswalkthroughpracticesothatunlimiteddatarowsareallowed.(Thedefaultversiononlyallowsupto10,000rows).Youcandosohere:https://my.rapidminer.com/nexus/account/index.html#licenses/request

Whensuccessfullyinstalled,seethenextstep.

Page 2: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

2. OpenRapidMiner7.3andopenanewprocess

Whendone,seethenextstep.

Page 3: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

3. TypeReadCSVintotheoperatorboxtocreateanew“ReadCSV”Operator

Whendone,seethenextstop

Page 4: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

4. ClickontheImportConfigurationWizardontherightsideoftheinterface

Whendone,seethenextstep

Page 5: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

5. Selectfile“SaoPedroetal(2013)_UMUAI_DesigningControlledExperiments_cummandlocalfeatures.csv”

Youwillhavetodownloaditfromthecoursewebpage

Whendone,seethenextstep

Page 6: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

6. Thisisa“csv”file,soselect“CommaDelimited”

Whendone,clickHERE

Page 7: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

7. ClickNextuntilthesystemdoesnotletyouclickNextanymore.ThenclickFinish.

Whendone,seethenextstep

Page 8: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

8. Createa“SetRole”operatorintheoperatorboxatthetop-left.

Thenconnecttheoutputbubbleontherightsideof“ReadCSV”totheinputbubbleontheleftsideof“SetRole”byclickingontheoutputbubbleandthenclickingontheinputbubble.Yourscreenshouldlooklikethis.

Whendone,seethenextstep.

Page 9: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

9. NowgoovertotherightsideandselectDesigningControlledExperimentsasthevariableyouwanttochange,andsetittobea“label”inthetargetrolebox.

Whendone,seethenextstep.

Page 10: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

10. InstalltheWEKAExpansionPack.TodothisgototheExtensionsmenu,andselectMarketplace(UpdatesandExtensions).SearchforWeka,andinstalltheWekaExpansionPack.

Whendone,seethenextstep.

Page 11: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

11. Typew-j48intotheoperatorswindow,andcreatethew-j48operator

Whendone,seethenextstep.

Page 12: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

`12.NowconnecttheoutputbubblefromSetRole(exaforexampleset)totheinputbubblefromJ48(trafortrainingset)

Whendone,seethenextstep.

Page 13: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

13. ThenconnecttheoutputbubblefromW-J48(model)totheres(result)bubbleonthefarright

Whendone,seethenextstep.

Page 14: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

14. Thenpressplayatthetopofthescreen.Afteraminuteorso(possiblylongerforslowercomputers),youshouldseeyourmodel

Whendone,seethenextstep.

Page 15: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

15. Thisrepresentationshowshowthemodelmakesdecisions.Youcanreaditasfollows:

IfthevariableCMcvscntislessthanorequaltozero,thenthemodelpredictsNo.Intheoriginaldataset,therewere271caseswherethispredictionwascorrect,and2caseswhereitwaswrong.Sotheconfidenceofthispredictionis(271)/(271+2)=271/273=99.27%.IfthevariableCMcvscntisgreaterthanzero,thenthemodelgoestothenextvariable.IfthevariableCVSctislessthanorequaltozero,thenIfthevariableRunTSumislessthanorequalto11,thenabout11otherthings,tofinallygettoapredictionofNowith10/11=90.9%confidence(NotethatyouhavetoscrolldowntoseethecasewhereCVSctisgreaterthanzero).

Whendone,seethenextstep.

Page 16: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

16. NotethatJ48decisiontreesareextremelycomplicatedtothinkthroughallatonce.

Andtheyareoneofthesimpleralgorithmstointerpret!

Whendone,seethenextstep.

Page 17: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

17. ClickontheDesignbuttonatthetoptogobacktothemainscreen.

Whendone,seethenextstep.

Page 18: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

18. NowaddtwomoreoperatorstotherightofW-J48.First,anApplyModel,andsecond,aPerformance(BinomialClassification).Choosekappainthewindowtotheright.Makesurethatyoulinktheoperatorsasshownhere.Youcandeletealinkbyright-clickingonitandselectingdelete,oryoucanclickonitandpressthedeletebutton.Thenpressrun.

Whendone,seethenextstep.

Page 19: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

19. Youshouldseethisscreen.Thisshowsyouthemodel’sKappaandconfusionmatrix.Thekappaisexcellent,infacttoogood.Keepinmindwedidnotusecross-validation,sothismodelisbeingtrainedandtestedonthesamedataset.

Here’showtoreadtheconfusionmatrix.Thereare165caseswherethemodelsays“Y”andthedatasays“Y”.Thereare383caseswherethemodelsays“N”andthedatasays“N”.Thereare11caseswherethemodelsays“N”andthedatasays“Y”.Thereare5caseswherethemodelsays“Y”andthedatasays“N”.

Whendoneseethenextstep.

Page 20: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

20. Nowgobacktothemainscreen,andcreatewhatyouseehere.YoushoulddeleteW-J48,ApplyModel,andPerformance,andaddCrossValidation.Youwillgetsomeerrormessages.Don’tworryaboutthosefornow.Inmanycases,you’llwanttodoBatchX-ValidationinsteadofX-Validation.Batch-X-Validationallowsyoutodostudent-levelcross-validation,oritem-levelcross-validation,orpopulation-levelcross-validation.RegularX-validationsupportsflatcross-validation,astalkedaboutitthevideolecture.

Notetheoptionsovertotheright,whichallowyoutodok-foldcross-validation(currentlysetuptodo10-foldcross-validation),ortodoleave-one-outcross-validation.

Whendoneseethenextstep.

Page 21: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

21. Nowdoubleclickonthevalidationbox(thetallyellowone).Itwillbringyoutoanotherscreen.Addoperatorsasshownhere–thesameonesyoujustdeleted.Theleftboxrepresentswhatyoudowiththetrainingfolds–buildamodel.Andtherightboxrepresentswhatyoudowiththetest folds–applythemodel,andseehowwellitdoes.Setupeverythingthesamewayyoudidbefore,e.g.withPerformance(BinomialClassification)andthekappastatistic.

Whendoneseethenextstep.

Page 22: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

22. Youcanclicktheblueuparrowtogobacktothemainscreen

Whendoneseethenextstep.

Page 23: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

23. Click to run themodel. You should get this.Note that kappa is a lot lower oncewe’re cross-validating.

Whendone,seethenextstep.

Page 24: RapidMiner walkthrough 1. Please also remember to apply for an … · 2019-01-24 · 2. Open RapidMiner 7.3 and open a new process When done, see the next step

24. Sonowyou’vebuiltamodelandvalidatedit.There’salotmorethingsyoucoulddo.

Youcould

• Usestudent-levelcross-validation(youwouldhavetoaddthevariablestudentbackin)• Try different algorithms, such asW-Jrip,W-KStar, KNN, Logistic Regression, Linear Regression

(whichgivesyouStepRegressionforbinomialdata)• Trycreatingnewfeatures(tryGenerateAttributes)orremovingfeatures(tryRemoveCorrelated

Attributes)

Havefun!


Recommended