WordPress.com
2015 ??? ????Data Science??: ??????? ???2010251004 ???2010251005 ???2010251022 ???2010251037 ??? ??Ⅰ. ?? Ⅱ. ??Data Science? ?? ?? 8?? ??HTML & CSSPython Code AcademyPython? ??? ???? R Doing Data Science 1?, 2?, 3? ?? Doing Data Science ????Ⅲ. ?? ? ??Ⅳ. ??Ⅴ. ?? ????IT????? 2~3? ?? ???? ?????, ?? ??? ‘????’? ??? ??? ? ???? ?? ?? ?? ?? ???? ‘????’ ??. ??? ??? ????? ?? ??? ????? ??. ?? ?? ????? ??? ?? ?? ??? ?? ?? ?? ??? ??? ?? ? ??? ???. ???? ????? ??? ??? ? ????? ???? ???? ??? ??? ??? ?? ?? ????. ?? ‘????’? ??? ?? ??? ???? ??. ?? ‘????’? ??? ???? ???? ?? ?? ?? ??? ??? ?? ? ? ?? ????. ?????? “????? ??? ???? ???? ???? ??? ??? ??????.” ?? ?? ???. ?? IT ??? IDC??? ??? “???? ???? ?? ??? ??? ??? ??? ???? ??? ??? ??? ??? ?? ??? ?? ??? ??? ????? ?? ?? ??? ????.” ?? ???. ??? ?? ? ??? ???? ???? ?? ???? ??? ???? ???? ?? ? ??. ??? ???? ???? ???? ?? ??? ??? ?? ??, ??? ?? ??? ? ?? ??? ???? ?, ???? ????? ?? ? ?? ???.?? ????? ?? ??? ??? ???? ?? ????? ??? ?? ? 4V? ????. Volume : ???? ??? ???, ???? ???? ??? ?? ???? ??? ??? ???? ??? ??? ??.Velocity : ??? ??? ??, ?? ??? ?????, ???? ?? ???? ? ?? ??? ????? ?.Variety : ???? ????? ??? ??? ??.Variability : ???? ???? ???? ??? ???? ??? ???? ???? ?? ???? ??? ?? ???, ?? ??? ??? ?? ??? ??? ?? ?? ?.??? 4V ???? ???? ??? ?? ???? ??? ???? ? ??? ?? ?? ???? ???? ??? ?? ??? ???? ??? ??. ??, ??? ??? ??? ??? ??? ??? ??? ?? ?? ???? ????. ??? ??? ???, ???? ??, ???? ????? ??? ???? ????? ??? ???? ? ???. ??? “? ????? ? ??? ?????”?? ??? ?? ?? ? ?? ??. ? ??? ??, ??? ??? ?? ???? ??????? ????? ?????. ???? ????? ??? ?? ?? ???? ??? ???? ???? ????, ??? ??? ???? ?? ????? ???? ????? ??. ??, ??? ???? ??? ????. ???? ???? ??? ???? ??? ??? ???? ??? ??? ???? ????. ??, ??? ???? ???? ?? ??? ???? ??? ??? ????. ??? ???? ??? ?? ???, ?? ???? ?? ??? ???? ???? ??? ????. ??, ?? ??? ????? ????. ????? ????? ??? ??? ??????, ??? ? ??? ??? ???? ?? ??? ?? ??? ???? ??? ?????? ???? ???. ???, ??? ???? ??? ?? ???? ??? ?????.?? ??? ????? ??? ?? ??? ???? ??? ????. ??? ??? ???? ??? ?? ??? ?? ???? ???? ???? ???? ? ???? ? ?? ??? ??? ? ??? ??? ??? ? ??. ?? ? ??? ??? ???? ??? ?? ????, ?? ???? ??? ?????? ?? ???? ????? ???? ??, ???? ???? ???? ???? ??? ? ?? ????. ??? ??? ?? ???? ??? ????? ???? ??? ??? ?????? ?? ??? ??? ?? ????? ?? ????? ??. ?? ???? ????? ?? ??? ?? ??? ???? ??? GOOG-411? ??. GOOG-411? ? ?? ???? ?? ?????. ? ???? ??? ???? ??? ???? ????? ??? ??? ??? ??? ??? ???? ??? ???? ?? ???? ??? ???? ?? ???? ????? ?? ??? ???. ???? ???? ????? ?? ????? ??? ??? ??? ???? ???? ??? ??? ???. ??? ?? ????? ???? ??? ??. ?? ??, ???? ???? ??? SNS? ?? ????? ??? ???? ??? ???? ??? ???? ??? ??? ?? ?? ???? ??. ??? ?? ????? ???? ??? ?? ????, ????? ??? ??? ? ? ??? ????? ????? ??? ??? ???? ??? ?????. Data Science ???4? 11????? ?? ? ??? ??? ??? ?? ??? ?? ?? : HTML, Python4? 18???? ???? ?? ?? 8?? ?? ??? ? ??? ? ??? ???? : ?? ???? ?? ??, Github? Wordpress ??4? 25?Python? ??? ?? ??(???? ???) ?? : python? ??? 1000??? ??? ? ????? ?? Github? ???5? 2?R?? ?? ? Doing data Science 1?,2? ?? ?? : Data camp? ?? R ?? ???, 2? ?? ????, 3? ??, R studio ??5? 9?R Studio ???, R??? ??? 2? ?? ???? : 3? ??, ??? ?? ????5? 16?R??? ??? 2? ?? ??, ????? ?? ?? : ???? ??? ? ?? ?? 5? 23??? ??5? 26? ?? ??(?? ?? ??? ??)?? Data Science? ?? ?? 8?? ?????5? ?, What is Web 2.0 ? ??? ??? Tim O'Reilly? "???? ?? Intel Inside"? ? ??? ???, ??? ???? ?? (Harvard Business Review) ??? "21 ?? ? ?? ??? ??" ?? ??? ???? ?? ???? ??? ??? ?? ?? ??? ??? ???. ?? ??? ?? ??? ???? ?? ?? ??? ?? ?? ??? ????? ???? DataCamp, ??? ?? ?? ??? ?? ?? ??? ??? ???? ?? ???? ?? ??? ??? ??? ????.Step 1:? ??, ??, machine learning ? ?? ??? ???.??? ??? ?? ??? ????? Math Track of Khan academy? Linear Algebra by MIT OpenCourseware, statistics by Udacity ?? ????? ???? ????? ?? ? ??. ?? g Stanford? Andrew NG ? John Hopkins? Practical Machine Learning ??? Coursera?? ?? ????.Ex> 2:????? ??? ???.?? ??? ?? ??? R? Python ??? ? ?? Datacamp? Codecademy, Google class ?? ??? ??? ????. ???? SAS, SPSS ?.. ? ?? ???? ??.Ex> 3:??databases? ?? ????.MySQL, Postgres, MongoDB, Cassandra ? ? ?????? ?? ???? ????.Ex> 4:?????? ???? ??? ? ???? ??? ?? ??? ??.Data wrangler? R tool? ??? ???? ????Ggvis? Vega tool? ?? ??????Tableau, Spotfire, R markdown?? ??? ?? ??? ? ?? ???.Step 5: ?level up with big dataHadoop, Map Reduce, Spark? ?? ???? big data? ?? ??.Step 6:?????? ??? ??? data scientists mentor? ???.??? ????? Pet Project? ????? ??? ???? ??? ?? ??? ???. Data scientists mentor : Hiary Mason, David Smith, Nate Silver, dj patilStep 7:??Internship ?? ??? ??? ??? ???.Amazon, Zipfian, Twitter ? ????? ?? ? ? ?? ??? ???.Step8: ????? ???.Data Tau, Kdnuggets, fivethirtyeight, datascience101, r-bloggers ? ????? ??? ??? ??, ????.HTML & CSSHTML?? Hyper Text Markup Language? ????. ??? Hypertext? ??? ??? ???? ???? ??? ? ???? ??? ??? ???? ?? hypertext? ???? ?? ???. markup language? ?? ???? ??? ? ?? ?? ?? ?? ????? ??? markup language? ???? ???, ??, ???, ??? ?? ?? ? ? ??. ??? HTML? ??? ?? markup language? ?? ??. ?? CSS? Cascading Style Sheets? ??? ? ???? ??? ??? ??? ??. ??? ? ? ?? ?? ? ???? HTML&CSS ??? ???? ??? Code academy? HTML & CSS ??? ??? ?? ??? ?? ???. Introduction to HTML<!DOCTYPE html> ????? ?? ??? ?? ??? ???? ???? ?? ?? ?? ??.<html> html ? ??? ???. ?? ??? ??? ??? ???? ??!<head> HTML? head ??? body???? ?????. <title> Headings & Paragraphs </title> Title? ???.</head> Head ?? ??.<body> body ?? ??. ? ???? ??? ?? ??? ???. <h1>Head 1</h1> ??(header)? ?? ??? ?? ? h1?? ?? ?? ????? h6?? ??. <p>Pragreph</p> ??(paragraph)?? ?? ??? ?? ??? ??.<a href> ; ??? ??? ?? ??? ??? ????.<img src="" />??? ???? ????.<a href=" "> <img src="" /></a>???? ???? ??? ???? ??.<!--I'm a comment!-->??? ??? ?? comment ??.</body>Body ?? ??.</html>HTML ????HTML Structure: Using Lists??? ???. Body ?? ????.<ol>? oderlist? ??? 1,2,3,…??? ???? ???. <h1>List of my favorite things</h1>3463879262800<ol><li>Raindrops on roses</li><li>Whiskers on kittens</li><li>Bright copper kettles</li><li>Warm woolen mittens</li></ol><ul>? unoderlist? ??? ??? ??? ???? ???.35176779670600<h1>Alpabet</h1><ul><li>A</li><li>B</li><li>C</li><li>D</li></ul>?? ??, ??, ??? ???? <p style="font-size:20px;color:blue;font-family:Arial">A truly spectacular paragraph!</p>?? ?? 20px,???, Arial??? ????<h1 style=" color:green;font-size: 16px;font-family: Arial">Big title</h1>?? ??16px,???,Arial ??? ????<ol><li style="font-family: Arial; font-size:25px">This item is big Arial.</li><li style="font-family:verdana;Font-size:20px">This item is medium Verdana.</li><li style="font-size:12px; font-family:impact">This item is small Impact.</li></ol>40671017798100???? ? ????.right2899700<body style="background-color:brown"><h3>Favorite Football Teams</h3><ol style="background-color:yellow"><li>The Hawthorn Football Club</li><li>San Franscisco 49ers</li><li>Barcelona FC</li></ol></body>? ????<li style="text-align:left">The Hawthorn Football Club</li><li style="text-align:center">San Franscisco 49ers</li><li style="text-align:right">Barcelona FC</li>? ???? 2642504317500?? ?? <strong> strong</strong>???? ?? <em>emememem</em>HTML Structure: Tables, Divs, and Spans? ??? <html> <head> <title>Table Time</title> </head> <body> <table border="1px">? ? ?? ????. <thead>??? ?? <tr>??? ? ??? <th colspan="2">Famous Monsters by Birth Year</th><colspan>?? ?? ??? ???. </tr> <tr> <th>Famous Monster</th> <th>Birth Year</th> </tr> </thead> <tbody>??? ?? ?? <tr> <td>King Kong</td><td>? table date cell? ?? <td>1933</td> </tr> <tr> <td>Dracula</td> <td>1897</td> </tr> <tr> <td>Bride of Frankenstein</td> <td>1935</td> </tr> </tbody> </table> </body></html>5139296698500division(??) <body><div style="width:50px; height:50px; background-color:red"></div><div style="width:50px; height:50px; background-color:blue"></div><div style="width:50px; height:50px; background-color:green"></div><div style=" width:50px;height:50px; background-color:yellow"></div></body>??? ??,?,??,??? ????<p> <span style="font-size:25px;color:red;font-family:Impact"> A </span> long time ago</p>Introduction to CSSindex.html??? ??? ???? stylesheet.css ?? ? ??? ??? ???? ?? ???? ???, ??? ??? ?? ??? ? ?? CSS ???? ??? ????.CSS? ????index.html?<!DOCTYPE html><html><head><link type="text/css" rel="stylesheet" href="stylesheet.css"/>stylesheet.css? ??? ? ?? ??? ?? ?? ??.<title>I Know CSS </title></head><body><div><h3>What's CSS for?</h3><p>CSS is for styling HTML pages!</p><h3>Why use it?</h3><p>It makes webpages look <span>really rad</span>.</p><h3>What do I think of it?</h3><p>It's awesome!</p></div></body></html>stylesheet.css?selector{property: value; }???{??: ?;}??? ?? ??./*I'm a comment!*/ css?? comment ?? H3{ color:red;}?? ? ???p{ font-family:Times,serif;}?? ??? ???&?? ? ?? CSS? ?? ??(p)? ???? Times?? ????. ?? ???? ???? Times?? ??? serif ?? ?? ? ? ??. span{background-color:yellow;}??? ???* { border: 2px solid red; } the * selector? ?? ??? ?? ????? ?? ??? 2px // solid(??), dotted(??), dashed(?? ??)// color CSS Classes and IDsClass? ID ??? ??? index.html ? <p>I'm the first child!</p><h3 class="red">I'm an h3 header in the red class!</h3>Class “red”??? <h3>I'm just a regular old h3 header.</h3><p class="red">I'm a paragraph in the red class!</p>Class “red” ?? <p>I'm just a regular old paragraph.</p><p id="rogue">I'm a rogue paragraph! I do what I want!</p>Id “rogue” ??? stylesheet.css ?.red { color: red; }Class “red”? ??? ????.#rogue {color: #FF00FF;font-weight: bold;font-family: cursive;}id “rogue” ??? ????.P:first-child{ font-family:cursive; color:green;}??? ?? ??? ??? ???. n?? ??? p:nth-child(n)?? ????.?? CSS ??? ???? a:link : ???? ?? ??.a:visited : ??? ??.a:hover : ??? ??? ?? ?? ??.CSS??? a:visited{color:green}? ???? ??? ??? ?? ?? ? ??. ID? class ?? ?? index.html ? <!DOCTYPE html><html><head><link type="text/css" rel="stylesheet" href="stylesheet.css"/><title>My Social Network</title></head><body><div class="friend" id="best_friend"></div><div class="family"></div><div class="enemy" id="archnemesis"></div></body></html>stylesheet.css? div {display: inline-block;margin-left: 5px;width:100px;height:100px;color:blue;border-radius:100%;border: 2px solid black;}div? ??? ? ??? ??.friend{ border: 2px dashed #008000;}.family{border: 2px dashed #0000FF;}.enemy{border: 2px dashed #FF0000;}Class? ??? ???? #best_friend{border: 4px solid #00C957;}#archnemesis{border: 4px solid #CC0000;}Id? ?? ?? ?? right60230500CSS Element Positioning??? ???? ?? ?? margin, border, padding ? ?? ?? ??? ?? ??? ??? ? ?? ???? ??? ??. CSS Display block: ??? ?? ??? ????. ??? ?? ??? ??? ???? ??, ?? ??? ?????.inline-block: ??? ?? ??? ????, ?? ?? ?? ??? ???? ?? ?????.inline: ? ??? ?? ??? ?? ?? ???? ?? ?????, block? ?? ??? ??? ????. ??? ??? ?? ??? ??? ?????.none: ??? ??? ??? ????? ??? ???? ????.index.html ? <body><div id="one"></div><div id="two"></div><div id="three"></div><div id="four"></div></body>stylesheet.css ?* { border: 1px dashed blue; }?? ??? ??? 1px ?? ??? div {height: 50px;width: 100px;border: 2px solid black;border-radius: 5px;display:block; /*or display:inline-block;*/}div ? display ???? #one { background-color: #FF0000;}#two { background-color: #0000FF;}#three { background-color: #FFD700;}#four { background-color: #308014;}Id ???? ? ????< display: block ?? ?? ? ??> <display: inline-block ?? ??? ??>??(margin), ???(border), ??(padding) ???? index.html ? <!DOCTYPE html><html><head><link type="text/css" rel="stylesheet" href="stylesheet.css"/><title>Result</title></head><body><div></div></body></html>stylesheet.css ? * {border: 1px dashed black;}div {height: 50px;width: 100px;border:4px solid #FF0000;border-radius: 5px;background-color: #308014;margin: 20px 50px 10px 5px;??(margin) ????.???? top, right, bottom, left ??? ??? ??? ? ??.padding:40px; }padding? border? ?? ??? ???? ?? ??? ??? ???? margin? ??? ?? ??? ????.padding-top, padding-right, padding-bottom, padding-left? ?? ?? ? ?? ?? ???? padding: top, right, bottom, left? ? ??? ? ??. ???(Floating) ??index.html ? <!DOCTYPE html><html><head><link type="text/css" rel="stylesheet" href="stylesheet.css"/><title>Result</title></head><body><div id="header"></div><div class="left"></div><div class="right"></div><div id="footer"></div></body></html>stylesheet.css ? div {border-radius: 5px;}#header {height: 50px;background-color: #F38630;margin-bottom: 10px;}.left {height: 300px;width: 150px;background-color: #A7DBD8;float: left;???? ???margin-bottom: 10px;}.right {height: 300px;width: 450px;background-color: #E0E4CC;float: right;????? ???margin-bottom: 10px;}#footer {height: 50px;background-color: #69D2E7;clear:both; }clear: right, left, ?? both? ? ? ?? ???? ??? ??? ?? ??? ??.positioning static, absolute, relative, fixed index.html ?<!DOCTYPE html><html><head><link type="text/css" rel="stylesheet" href="stylesheet.css"/><title>Result</title></head><body><div id="outer"><div id="inner1"> <div id="inner2"> <div id="inner3"> <div id="inner4"></div></div></div></div></div></body></html>stylesheet.css ?div {height: 100px;width: 100px;border-radius: 5px;border: 2px solid black;}#inner1 {height: 75px;width: 75px;background-color: #547980;float:right;static positioning //???}#inner2 {height: 75px;width: 75px;background-color: green;position:absolute;?? ??(Absolute positioning) //???margin-left: 100px;}#inner3 {height: 75px;width: 75px;background-color: red;position:relative;margin-left: 100px}????(Relative positioning) // ??? #inner4 {height: 75px;width: 75px;background-color: yellow;position:fixed;?? ??(Fixed positioning) // ??? margin-left: 100px}#outer {height: 1500px;width: 150px;background-color: #45ADA8;position: absolute;margin-left: 100px;}Python Code AcademyPython ????? ??? ?? ???(dynamic typing) ?? ????? ????. ??? ????? ? ? ??, ?????? ???? ??? ?? ? ?????? ??? ??. ?? ???? ??? ???? ????? ?? ??? ?? ??? ?? ???? ???? ???(glue language)?? ?? ?? ??. ?? ???? ?? ?? ?? ??????? ???? ??? ???? ?? ??? ??? ??? ? ?? ???, ???? ???? ???? ??? ??? ?? ???? ???. ??? Python? Codecademy ????? ???? ?? ?? ??? ???? ???? ???Variable ??Variable = 10c???? ?? ?? ??? ???? ??? ??. ?? ???? ?? 2?? ??(True or False)? ???. ?? ??? ?? ??? ??? ??? ? ?? ? ? ??. Whitespace Means Right Space ???? ??? ??? ??? ?? ??? ? ? ?? ?? ?? ??????? ?????. ????? 4? ?? ? ??? ???.??? ?? ??? ? ??? ?? ?? # ?? ? ??? ?? ?? “”“~~~”“”??addition(???) = 72 + 23subtraction(??) = 108 - 204multiplication(?) = 108 * 0.5division(???) = 108 / 9?? ?(2^3)? ????? 2**3?? ??? ???.??? ??(??? ??)? %? ???? ?????. ?? ?? 3%2 = 1 ? ???.3365547752000? ?? ????? ?? ??? ??, ???? ???? ? ???? ?? ??? ?????.Strings ?????? ??“” ?? ??? ??? ???. String = “banana”??? ?? ?? ?? ???? ??? \?????? ????? ?? ???? ???. ? ?? ??? \‘ ??? ????? ? ?????? “”“~”“” ???? ???? ??? ???..String = “ I‘m ” -> “ I\’m ” or “““ I’m ”””036512500Index ????? ?? python? ???? 6????. ???? ? ?? ??? ?? 0?? ????? ???. fifth_letter = "MONTY"[4]String method ??? ??len() ???? ?? (?? ?)? ???. parrot = "norwegian blue"print len(parrot)lower() ???? ?? ???? ?????.parrot = "norwegian blue"print parrot.lower()upper() ???? ?? ???? ?????.parrot = "norwegian blue"print parrot.upper()4. str() ????? ???? ?????.(???? ?? ?? ??? ????.)pi=3.14print str(pi)? ???len ? str? ?? ?? ???? ??? lower ? upper? ??? ?? ?? ?? ??.Printing Strings???? ???? ??? ???????.??? print? ??? ?? ??? ?? ???? ????? ????.print "Monty Python"Printing Variables??? ???? ??? ???????.?? ??? ??? ?? print ?? ??? ?? ????? ????? ???.the_machine_goes="Ping!"print the_machine_goes????? ?? ???? ?? ?? ??? ???????.String Concatenation?? ??? ???? ???? ?? ???????.print? ??? “???”+“???”? ??? ???.print "Spam "+"and "+"eggs"Explicit String Conversion??? ???? ???? ?? ?? ???? ? ?? ?? ? ????. ??? ?? ???? ? ???? ???? ??? ??? ???. ?? ?????.print "The value of pi is around " +str( 3.14)String Formatting with %???? ??? ?? ? ?, ? ?? ???? ???? ??? ? ?? ??? ????. ? ??? %s ?? ?? ??? ????. ?? ?? ?? ???????.string_1 = "Camelot"string_2 = "place"print "Let's not go to %s. 'Tis a silly %s." % (string_1, string_2)??? ?? ??? ?? %s? 2? ??????. ??? ?? %? ??? ??? ??? ???? ??? ? ??? ?? ??? ???. ????? ??? ?? ???? ?????."Let's not go to Camelot. 'Tis a silly place."-3429024363200??? ?? ?????. ???? ??? ?? ?? ? ??? ?? ?? ????. name = raw_input("What is your name?")quest = raw_input("What is your quest?")color = raw_input("What is your favorite color?")print "Ah, so your name is %s, your quest is %s, " \"and your favorite color is %s." % (name, quest, color)???? ?? ? ?? 3?? ??'Alpha'"Bravo"str(3)??? ??len("Charlie")"Delta".upper()"Echo".lower()??? ??print "Foxtrot"?? ????g = "Golf"h = "Hotel"print "%s, %s" % (g, h)Date and Time? ?? ??? ??? ??? ? ?? ?????? ??? ????.? ?? ?? ?? ??? ??? ?????.from datetime import datetimenow=datetime.now()print now??? ??? ???? ?? ? ???? ?????.from datetime import datetimenow=datetime.now()print nowprint now.yearprint now.monthprint now.dayCondtiionals & Control Flow (??? ? ?? ??)?????? ?>, <, ==, <=, >=, !=Boolean operators ?? ???.True and False is FalseFalse and True is FalseFalse and False is FalseTrue or True is TrueTrue or False is TrueFalse or True is TrueFalse or False is FalseNot True is FalseNot False is True??????? ??? ?? ':'? ??? ????.<if>if c > d:print 'c > d'elif c == d:print 'c == d'else:print 'c < d'<While>num = 1while num <= 100:print numnum = num + 1<FOR>for x in family: # family?? ???? ??? ?? x? ???:print x, len(x) # x? x? ??? ????.for i in range(4,8): (4?? 8??)print iFUNCTIONS(??) def <???>(<????1>,<????2>,...) :<Function:??>def function(x): a = 3 b = 5 y = a*x + b return y?? ??? ? ? ??? return ?? ??? ??? ??? ??. ? ?? ??? ?? ?? ?? ???. ????? ??? ??? ??? ??? ??????..Taking a Vacation???? ?? ?? ???? ????? ??? ????? ??????.Python Lists and Dictionaries(??? ?? ? ??)<????? ??>>>> x="abcdef">>> x'abcdef'>>> x[0]'a'>>> x[1]'b'>>> x[1:3] #1??? 3?‘??’'bc'>>> x[:3] #???? 3?‘??’??'abc'>>> x[3:] #3?‘??’?? ???'def'<??? ??>* ???? : a = ['a', 'b', 'c', 'd'] / a=[] ? ???* ??? ?? : len(a)* ?? ?? : a[2] : 3 ?? ??('c') ?? (???? 0?? ????.)* ?? ??a=[1,3,5,7] ??a[1] =9 ==> [1,9,5,7]* ??? ?? ??? ?? : range (n1??,n2??)a=range(2,7) ==> [2, 3, 4, 5, 6]a=range(5) ==> [0,1,2,3,4]* ?? ?? : append ???, ??? ??a=[1,3,5,7]a.append(2) ==> [1, 3, 5, 7, 2]* ?? ?? ?? : a.remove('a') => [‘b','c','d']* ??? ?? ?? ?? : del ??a=[1,3,5,7] ??del a[2] ==> [1, 3, 7]* ?? : sort() ???a=[2,1,5,3] ?? a.sort() ==> [1,2,3,5] # prime? ?? ?? ??? ?? <??? ???>>>> orders = ['potato', ['pizza', 'Coke', 'salad'], 'hamburger']>>> orders[1]['pizza', 'Coke', 'salad']>>> orders[1][2]'salad'>>> matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] <???? ???? ??>>>> list=[]>>> string = 'Be happy!'>>> for x in string:list.append(x)>>> print list['B', 'e', ' ', 'h', 'a', 'p', 'p', 'y', '!']<??(Dictionary)>?? ???? ? : ?? ?, ???? ??a={} # ? dictionary ??a['dog']='bark' # dog ?? bark ? ??a['cat']='cat'a{'dog': 'bark', 'cat': 'cat'} # ?? ??a['dog'] # ?? ?? ? ??'bark'a['cat']'cat'<??? dictionary>a = {'dog' : 'bark', 'cat' : 'meow'}a['dog'] # ??? ???, ‘python’? ????'snake'<??? ??>del a['dog']{'cat': 'meow'}* key , value? ?? ???? ??family = {'boy':'David', 'girl':'Eliza', 'baby':'Erasmus'}family # ?? ?? ???? ????? ??.{'baby': 'Erasmus', 'boy': 'David', 'girl': 'Eliza'}family.keys() # ?? family? key?? ??? ???? ???.['baby', 'boy', 'girl']family.values() # ?? family? ??? ??? ???? ???.['Erasmus', 'David', 'Eliza']* key ?? has_key : ??? ?? ?? ???? ??? 1, ??? 0family.has_key('boy') ==> 1family.has_key('sister') ==> 0???!!???? ?? ???? ??? ??? ??? ?? ???? ??? ?????.??? ????? ?? ?? ? ??? ??? ??? ???? ??? ???????.Class<??? ??>??? ??? class ???? ?????.???? ??? ??? ??? __init__ ???.(??? ??)????? ??? ‘__’ ? ?? ?? ??? ??? ?? ??? ?? ??? ? ????.???? ‘__del__’???. ??? ?????? 0 ? ?? ?? ?????.??? ???? ???? ??? self ? ? ?? ??? ??? ???. Self ? ????? ?? ??? ???? ??? ????. ??? ??? ??? ?? self ???? ????? ???? ????.__class__ ? ????? ??? ???? ????.Python ??? ?? ???? ?? ?? public ??. ????? ??? ??? ??? ?? ?? Python ? ???? ????.?? ?? ??? private member ?? ???? ??? ???(_) ? ??? ??. ???? 2? ??? _?????__???[???] ?? ??[??] ?? ????, ???? ????? ???? ??. ???? 1? ??? private member ?? ???? ??? ??, "from M import *" ??? ?? ? import ? ????.class method : ????? ??? ??? ??? ??????, ???? ??[??]? ??? ? ??.static method : ???? ?? ??? ?? ???. ??? ??? ??? ???? ?? ??.< Operator Overloading >* Python ??? ???? overloading ? ??. overriding ? ??? overloading ??? ??<??> ??? ??? () ? ????. ?? ??? () ?? ??? ????? ??? ???? ???? ??. ex) class Subclass(Superclass1, Superclass2): ... ?????.__dict__ ? ? ??, ???? name space ??? dictionary ??? ???? ?? ? ? ??. ??? ? ?? ??? ??? ?? ?? ??? overriding ??. ????? ?? ?? ???? ??? ??. File Input/Output < ?? ??? > ??? ??? ?? ??? input() ? ????. input() ? ???? parameter ? prompt ? ??. input ? ?? ??? ?????.print() ??? (?? ?? ???) ? ?? ???? ???? ??? end parameter ? ???? ???? ????.% ? ???? ??? ?? ??.< ??? ?? ??? >?? ??(??? ??) : open("????", "??????")???? ??- t : ???(???)b : ??????- r : ??(???)w : ??a : ????(??? ??? ??? ??? ???)+ : ??&??< ??? ?? ??? >?? ??(??? ??) : open("????", "??????")???? ??- t : ???(???)b : ??????- r : ??(???)w : ??a : ????(??? ??? ??? ??? ???)+ : ??&??<?? ?? ??? >?? ??? ?????? ? b ? ???.??? ?? ?????? ?? ???? ???? ?? ??? ? ??? ??? ???. ??? ???????? ?? ???? ???????.Python? ??? ???? Python? ??? 1~1000?? ??? ????, ??? ?? ??? ?? ????.1307856466078y=0for i in range(2,1001):count = 0for j in range(1,i):if i % j ==0:count = count +1if count ==1:print(i)y=y+iprint(y) 00y=0for i in range(2,1001):count = 0for j in range(1,i):if i % j ==0:count = count +1if count ==1:print(i)y=y+iprint(y) % ?? i? ?? 2~1000??? ?? ??.% ?? ??? ?? count = 0 ??% ?? j? ?? 1~i-1?? ?? ??.% j? i? ???? count? 1? ????.% count? 1?? i? ??? ???? ????.% ????? ?? ??? ?? y? ????.??27317928341954766181194737918129342155767382195358319130743156367782396778919331143356968382797111971973134395716918299771310119931744357770183998317103211331449587709853991191072233374575937198579972310922734746159972785929113229349463601733863311272333534676077398773713123935947961374388141137241367487617751883431392513734916197578874714925737949963176190753151263383503641769911591572693895096437739196116327139752164778792967167277401523653797937711732814095416598099411~1000??? ??? ? : 76127RR ????? ??? ?? ??? ???? ?? ????? ???? ????? ???? ??? ??? ???? ????. ?? Doing data science ?? ????? R??? ??? ??? ?? ??? datacamp? The easiest way to learn R programming and data science ?????? R??? ??? 6??? ?? ???. Chapter 1 : Intro to basics# An addition 5 + 5 ???# A subtraction 5 - 5 ??# A multiplication 3 * 5 ???# A division (5 + 5)/2 ???# Exponentiation 2^5 ??# Modulo 28%%6 ??? ?# Assign the value 42 to 'x' x <- 42 x? 42 ??# Print out the value of the variable 'x' x x? ??# Assign a value to the variables called 'my_apples' and 'my_oranges'?? ?? ??? ?? ???my_apples <- 5my_oranges<- 6my_fruit = my_apples+ my_orangesmy_fruit[1] 11# Declare variables of different types ??? ?? (??, ??, ??)> my_numeric <- 42> my_character <- "forty-two"> my_logical <- FALSE# Check which type these variables have: ??? ??? ???? ?? > class(my_numeric)[1] "numeric"> class(my_character)[1] "character"> class(my_logical)[1] "logical"Chapter 2 : Vectors# ‘numeric_vector’ ’charater_vector’ 'boolean_vector' ?? ?? ??? numeric_vector <- c(1, 10, 49)character_vector <- c("a", "b", "c")boolean_vector <- c(T,F,T)# Poker winnings from Monday to Friday ?~? ?? ??poker_vector <- c(140, -50, 20, -120, 240)# Roulette winnings from Monday to Friday ?~? ?? ??roulette_vector <- c(-24, -50, 100, -350, 10)# Naming a vector ?? ? ?? ???names(poker_vector) <- c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")names(roulette_vector) <- c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")OR# Create the variable 'days_vector' ??? ?? ??? (?? ??)days_vector <-c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")names(poker_vector) <- days_vector names(roulette_vector) <- days_vector#Total Daily ?~? ??+?? ?? total_daily <- poker_vector + roulette_vector> total_daily Monday Tuesday Wednesday Thursday Friday 116 -100 120 -470 250# Total Week ?~? ? ??> total_poker <- sum(poker_vector)> total_roulette <- sum(roulette_vector)> total_week <- total_poker + total_roulette> total_week[1] -84# Define a new variable based on a selection ???? ??? ?? ??? ??? poker_wednesday <- poker_vector[3]# Vector section ??? ???? ??? ??? > poker_midweek <- poker_vector[c(2, 3, 4)]> poker_midweek Tuesday Wednesday Thursday -50 20 -120OR# Define a new variable based on a selection ??? ???? ??? ???(?? ??)roulette_selection_vector <- roulette_vector[2:5] > roulette_selection_vector Tuesday Wednesday Thursday Friday -50 100 -350 10# Mean ??? ?? ??? ?? ??? average_midweek_gain<-mean(poker_vector[c("Monday", "Tuesday", "Wednesday")])> average_midweek_gain[1] 36.66667# What days of the week did you make money on poker? ??? ??? ?? ? ????selection_vector <- poker_vector > 0> selection_vector Monday Tuesday Wednesday Thursday Friday TRUE FALSE TRUE FALSE TRUE ?,?,? ??? ???.# Select from poker_vector these days ??? ?? ?? ?? ?? ?? > poker_winning_days <- poker_vector[selection_vector]> poker_winning_days Monday Wednesday Friday 140 20 240Chapter 3 : Matrices# Construction of a matrix with 3 rows that contain the numbers 1 up to 91~9 ??? ?? 3x3 ?? ??? > matrix(1:9, byrow = T, nrow = 3) [,1] [,2] [,3][1,] 1 2 3[2,] 4 5 6[3,] 7 8 9# Construct matrix ?(new_hope, empire_strikes, return_jedi), ?(US, Non-US) ? 3x2 ?? ? ?? ???> new_hope <- c(460.998, 314.4)> empire_strikes <- c(290.475, 247.9)> return_jedi <- c(309.306, 165.8)> star_wars_matrix <- matrix(c(new_hope, empire_strikes, return_jedi), nrow = 3, byrow = TRUE)> star_wars_matrix [,1] [,2][1,] 460.998 314.4[2,] 290.475 247.9[3,] 309.306 165.8# Add your code here such that rows and columns of star_wars_matrix have a name! ??? ?? ?? > colnames(star_wars_matrix) <- c("US", "non-US")> rownames(star_wars_matrix) <- c("A New Hope", "The Empire Strikes Back", "Return of the Jedi")> star_wars_matrix US non-USA New Hope 460.998 314.4The Empire Strikes Back 290.475 247.9Return of the Jedi 309.306 165.8OR??? ?&?? ??? ?? box_office_all <- c(461, 314.4, 290.5, 247.9, 309.3, 165.8)movie_names <- c("A New Hope","The Empire Strikes Back","Return of the Jedi")col_titles <- c("US","non-US")star_wars_matrix <- matrix(box_office_all, nrow = 3, byrow = TRUE, dimnames = list(movie_names, col_titles))#RowSums ? ?? ? ???worldwide_vector <- rowSums(star_wars_matrix)> worldwide_vector A New Hope The Empire Strikes Back Return of the Jedi 775.4 538.4 475.1 #column bind ? ????> all_wars_matrix <- cbind(star_wars_matrix, worldwide_vector)> all_wars_matrix US non-US worldwide_vectorA New Hope 461.0 314.4 775.4The Empire Strikes Back 290.5 247.9 538.4Return of the Jedi 309.3 165.8 475.1# row bind ? ????> all_wars_matrix <- rbind(star_wars_matrix, star_wars_matrix2)> all_wars_matrix US Non-USA New Hope 461.0 314.4The Empire Strikes Back 290.5 247.9Return of the Jedi 309.3 165.8The Phantom Menace 474.5 552.5Attack of the Clones 310.7 338.7Revenge of the Sith 380.3 468.5# Total revenue for US and non-US ? ?? ? ??? > total_revenue_vector <- colSums(all_wars_matrix)> total_revenue_vector US non-US 2226.3 2087.8# Average non-US revenue per movie 2?? ?? ?? ???> Non_us_all <- mean(star_wars_matrix[, 2])> Non_us_all[1] 242.7# Average non-US revenue of first two movies 2?? ?? 1??, 2?? ? ? ?? ??? > non_us_some <- mean(star_wars_matrix[1:2, 2])> non_us_some[1] 281.15 # Estimated number of visitors ? ??? ?? ?? ??? ??? ??? ??? ???? ticket_prices_matrix <- matrix(c(5, 5, 6, 6, 7, 7), nrow = 3, byrow = TRUE, dimnames = list(movie_names, col_titles))visitors <- star_wars_matrix/ticket_prices_matrix# Average number of US visitors US??? ?? ??? average_us_visitors <- mean(visitors[, 1]) average_us_visitors[1] 61.60079# Average number of Non-US visitors Non-US ??? ?? ??? average_Non_us_visitors <- mean(visitors[, 2])average_Non_us_visitors[1] 42.62746Chapter 4 : Factors# Define factor_ survey_vector using 'factor()' ??? “??”??(factor) ?? survey_vector <- c("M", "F", "F", "M", "M")# Encode survey_vector as a factor survey??? ?? ?? ???factor_survey_vector <- factor(survey_vector)levels(factor_survey_vector) <- c("Female", "Male")factor_survey_vector[1] Male Female Female Male Male Levels: Female Male# Summarizing a factor ? ??? ?? > summary(survey_vector) Length Class Mode 5 character character > summary(factor_survey_vector)Female Male 2 3# Ordered factors ??? ??? ?? ?? speed_vector <- c("Fast", "Slow", "Slow", "Fast", "Ultra-fast")factor_speed_vector <- factor(speed_vector, ordered = TRUE, levels = c("Slow", "Fast", "Ultra-fast"))factor_speed_vector[1] Fast Slow Slow Fast Ultra-fastLevels: Slow < Fast < Ultra-fastsummary(factor_speed_vector) Slow Fast Ultra-fast 2 2 1# Is data analyst 2 faster than data analyst 5?speed_vector? 2?? ??(slow)? 5?? ??(Ultra-fast)?? ?? ?????compare_them <- factor_speed_vector[2]>factor_speed_vector[5]compare_them[1] FALSEChapter 5 : Data frames# Quick, have a look at your data set Data set ???? >MtcarsMazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2#Data set? ???? ?? > head(mtcars) mpg cyl disp hp drat wt qsec vs am gear carbMazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1#Data set? ???? ??> tail(mtcars) mpg cyl disp hp drat wt qsec vs am gear carbPorsche 914-2 26.0 4 120.3 91 4.43 2.140 16.7 0 1 5 2Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.9 1 1 5 2Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.5 0 1 5 4Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.5 0 1 5 6Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.6 0 1 5 8Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.6 1 1 4 2# Create the data frame: ??? ?(planets, type, diameter, rotation, rings) ???> planets <- c("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune")> type <- c("Terrestrial planet", "Terrestrial planet", "Terrestrial planet", "Terrestrial planet", "Gas giant", "Gas giant", "Gas giant", "Gas giant")> diameter <- c(0.382, 0.949, 1, 0.532, 11.209, 9.449, 4.007, 3.883)> rotation <- c(58.64, -243.02, 1, 1.03, 0.41, 0.43, -0.72, 0.67)> rings <- c(FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE)> planets_df <- data.frame(planets, type, diameter, rotation, rings)> planets_df planets type diameter rotation rings1 Mercury Terrestrial planet 0.382 58.64 FALSE2 Venus Terrestrial planet 0.949 -243.02 FALSE3 Earth Terrestrial planet 1.000 1.00 FALSE4 Mars Terrestrial planet 0.532 1.03 FALSE5 Jupiter Gas giant 11.209 0.41 TRUE6 Saturn Gas giant 9.449 0.43 TRUE7 Uranus Gas giant 4.007 -0.72 TRUE8 Neptune Gas giant 3.883 0.67 TRUE#data set? ??(structure)??>str(planets_df)'data.frame':8 obs. of 5 variables: $ planets : Factor w/ 8 levels "Earth","Jupiter",..: 4 8 1 3 2 6 7 5 $ type : Factor w/ 2 levels "Gas giant","Terrestrial planet": 2 2 2 2 1 1 1 1 $ diameter: num 0.382 0.949 1 0.532 11.209 ... $ rotation: num 58.64 -243.02 1 1.03 0.41 ... $ rings : logi FALSE FALSE FALSE FALSE TRUE TRUE ...# All data from the first three planets 1~3?? ??(planet)? ?? ??? ?? > closest_planets_df <- planets_df[1:3, ]> closest_planets_df planets type diameter rotation rings1 Mercury Terrestrial planet 0.382 58.64 FALSE2 Venus Terrestrial planet 0.949 -243.02 FALSE3 Earth Terrestrial planet 1.000 1.00 FALSE# All data from the last three planets ??? 3? ??(planet)? ?? ??? ??> furthest_planets_df <- planets_df[6:8, ]> furthest_planets_df planets type diameter rotation rings6 Saturn Gas giant 9.449 0.43 TRUE7 Uranus Gas giant 4.007 -0.72 TRUE8 Neptune Gas giant 3.883 0.67 TRUE# Do selection on both rows and columns Data? ?,? ?? ? ?? ?? ??> furthest_planets_diameter <- planets_df[3:8, "diameter"]> furthest_planets_diameter[1] 1.000 0.532 11.209 9.449 4.007 3.883# Select the information on planets with rings: ??(rings)? ??? ?? ??(planet)? ??? ??> planets_with_rings_df <- planets_df[rings_vector, ]> planets_with_rings_df planets type diameter rotation rings5 Jupiter Gas giant 11.209 0.41 TRUE6 Saturn Gas giant 9.449 0.43 TRUE7 Uranus Gas giant 4.007 -0.72 TRUE8 Neptune Gas giant 3.883 0.67 TRUE# Planets that are smaller than planet Earth: ???? ?? ??(planet)? ??? ??> small_planets_df <- subset(planets_df, subset = planets_df$diameter < 1)> small_planets_df planets type diameter rotation rings1 Mercury Terrestrial planet 0.382 58.64 FALSE2 Venus Terrestrial planet 0.949 -243.02 FALSE4 Mars Terrestrial planet 0.532 1.03 FALSE# What is the correct ordering based on the planets_df$diameter variable?planets_df Data?? ??(diameter)??? ?? ??? ?????> positions <- order(planets_df$diameter, decreasing = TRUE)> positions[1] 5 6 7 8 3 2 4 1# Create new "ordered" data frame: ?????? data ????> largest_first_df <- planets_df[positions, ]> largest_first_df planets type diameter rotation rings5 Jupiter Gas giant 11.209 0.41 TRUE6 Saturn Gas giant 9.449 0.43 TRUE7 Uranus Gas giant 4.007 -0.72 TRUE8 Neptune Gas giant 3.883 0.67 TRUE3 Earth Terrestrial planet 1.000 1.00 FALSE2 Venus Terrestrial planet 0.949 -243.02 FALSE4 Mars Terrestrial planet 0.532 1.03 FALSE1 Mercury Terrestrial planet 0.382 58.64 FALSEChapter 6 : Lists# Construct list with these different elements: ??, ??, ???? ??? ??? ??? >my_vector <- 1:10> my_matrix <- matrix(1:9, ncol = 3) > my_df <- mtcars[1:10, ]> my_list <- list(my_vector, my_matrix, my_df)> my_list[[1]] [1] 1 2 3 4 5 6 7 8 9 10[[2]] [,1] [,2] [,3][1,] 1 4 7[2,] 2 5 8[3,] 3 6 9[[3]] mpg cyl disp hp drat wt qsec vs am gear carbMazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4# Creating a named list ???? ?? ??> my_list <- list(vec = my_vector, mat = my_matrix, df = my_df)> my_list$vec [1] 1 2 3 4 5 6 7 8 9 10$mat [,1] [,2] [,3][1,] 1 4 7[2,] 2 5 8[3,] 3 6 9$df mpg cyl disp hp drat wt qsec vs am gear carbMazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4# Create the list 'shining_list' ??? ??? ???> shining_list <- list(moviename = "The Shining", actors = actors, reviews = reviews)> shining_list$moviename[1] "The Shining"$actors[1] "Jack Nicholson" "Shelley Duvall" "Danny Lloyd" "Scatman Crothers"[5] "Barry Nelson" $reviews scores sources comments1 4.5 IMDb1 Best Horror Film I Have Ever Seen2 4.0 IMDb2 A truly brilliant and scary film from Stanley Kubrick3 5.0 IMDb3 A masterpiece of psychological horror#Selecting elements from a list ??? ??? ??# Define 'last_actor' ??? ?? ??> last_actor <- shining_list$actors[length(shining_list$actors)]> last_actor[1] "Barry Nelson"# Define 'second_review' ??? ?? ??> second_review <- shining_list$reviews[2, ]> second_review Scores sources comments2 4 IMDb2 A truly brilliant and scary film from Stanley Kubrick# Adding more movie information to the list ???? ?? ?? ??> shining_list_full <- c(shining_list, year = 1980)# shining_list_full ??? ?? ?? > str(shining_list_full)List of 4 $ moviename: chr "The Shining"$ actors : chr [1:5] "Jack Nicholson" "Shelley Duvall" "Danny Lloyd" "Scatman Crothers" ...$ reviews :'data.frame':3 obs. of 3 variables:$ scores : num [1:3] 4.5 4 5$ sources : Factor w/ 3 levels "IMDb1","IMDb2",..: 1 2 3$ comments: Factor w/ 3 levels "A masterpiece of psychological horror",..: 3 2 1$ year : num 1980Doing Data Science 1?, 2?, 3? ?? 1? ??? ???? ?????"????? ?? ?? ??? ??? ???? ??? ????."??????? ('??????'中 ??? ? ???, ?? ??? ???)????? ??? ????, ?????? ????? ?? ????? ??? ????, ??? ???? ????, ?? ??? ??? ???? ??? ???? ??, ??, ???, ???? ?? ?? ??? ???? ???? ???? ???? ??.????? ??? ????, ????? ??? ???? ???? ??? ?? ????. ??? ??? ????, ??? ???, ????? ????.2? ??? ??, ??? ??? ??? ????? ????? ????, ????? ?? ??? ?????? ??? ??? ??? ? ??? ??? ??, ?? ?? ??? ??? ?? ??????.????? Volume(??), Variety(???), Velocity(??), Value(??) ? 4V? ?? ??? ??? ? ??.? ??? ???-???? ????? ????? ?? ??? ??? ??? ????. ??? ??????? 'N=??'?? ??? ???? ?? ???? ?????? ??? ????.? ??? ??? ???? ??? 'n=1'???? ??? ??? ???? ??? ??? ??? ???.??? ?????(EDA: Exploratory Data Analysis)?? (?? ??? ????) ?? ??? ??? ?????, ??? ???? ?????, ??? ????, ??? ??? ???? ???? ????? ????, ?? ??? ????? ???? ? ???? ????? ???? ??? ????. ????? EDA? ???? ??, ???, ???, ???? ?? ?? ??? ???? ??? ???.???? ?? ??? ?? ??, ??? ??? ???? ??, ???? ??? ??? ?? ??, ?? ???? ???? ???? ??, ??? ???? ???? ?? EDA? ????.??? ?? ??3? ??????????, ?? ??? ???? ?? ??? ??? ?? ??? ?? 3?? ??? ??.???, ????, ??? ?? ?? ??? ??, ????, ?? ????.??? ?????, ??? ??, ?? ??? ? ? ?? ?? ??? ?? ??? ????.????(AI)? ??? ?? ???? ????.????? ??? ??? ??:? ????, K-????, K-????????, ??? ????(????, ????, ?? ??? ?)? ??? ????(????, ????, ?? ?? ?)?????? ??? ?? ?? ?? ?? ????? ??? ??? ?? ??? ????? ??? ?? ???.? ? ? ??? ??? ? ?????, ???, ??? ?? ??? ???? ??? ??? ????? ??.?? ??? ??? ????? ???? ??, ????? ??? ??? ???.????? ??? ?? ?? ???? ???? ???? ??? ???? ??.? ??? ???? ??? ?? ????????? ???? ??? ??,??? ??? ??? ???? ?? ?????? ????? ??? p-value( ????? ???? ???? ????)? ??? ??? ??? ????.k-????(k-NN)? ?? ????? ?? ???? ??? ???? ?? ?? ??? ?? ?, ?? ?? ?? ?? ??? ???? ?? ??? ???? ???? ???? ? ? ???? ??????.k-NN ?? ?????? ?? ????? ????. ( ???? ??, ??? ???, ???? ??, ?????? ??, ?? ??, ??? ?? ? ? ????.)???? ?? ??? ????? ???????? ?? ??? ???.?? ??? ????.k?? ?? ???? k-NN? ?? ? ???? ?? ????? ?? ????.????? ?? ?? ?? k?? ????? ??.???? ????? ?? ??? ??? ????? ???.K-??? ?? ???? ?? ??? k?? ???? ??? ?????? ????? ???? ???? ?? ??? ???? ??? ????.??? ???? ????d?? ???? k?? ???(??? ??)? ??? ????. ???? ??? ??? ?? ?? ??? ?? ??? ??.? ??? ???? ?? ??? ???? ????.???? ??? ??? ???(ex ???)?? ?? ??? ???? ????.????? ??? ??? ?? ?? ??? ?? ? ??? ????.?k-???? ???k?? 1≤k≤n ?? n? ??? ???? ?? ???? ???? ??? k?? ??? ?????? ???? ?? ?? ????.?? ??: ???? ???? ?? ??, ???? ???.?? ??: ?? ???? ??? ?? ???? ???.??? ????? ???? ???? k-???? ???, ??? ?? ?? ?? ???? ??.Doing Data Science ?? ?? R ?????? ??? ?? ???? ?? ???? ??? ??? ????. ? 1000?? ???? ??, ??? ???? ??? ? ???. ??? ??? 2012? 5? ? ????? ????? ??? ?? ??? ?? ????? ????? ?? ??. ? ?? ???? ????, 5?? ?? ?? ??, ??(0=??, 1=??), ????(Impression), ????, ??? ??? ????. head(data1)? ??? ???? ???? ?? ????? ??? ??? ????? ? ? ??. ???? ?? 0~18, 19~24, 25~34, 35~44, 45~54, 55~63, 64~ ? ??? ???? ?? age_group?? ??? ??? cut?? ??? ?? ?????. ? ?? ?? (-Inf,0]? ???? ????? ? ? ??. ? ??? ??? ?? ???? ????? ??? ??? ???? ? ? ??. install.packages("doBy") ? ???? ??? ??? ??? ???? ????? ???? ?? ???. R studio?? ?? ??? ???? ?? ?? ??? ?? ??? ??? ?? ???? ??? ??? ???? ?? ? ? ??. ibrary? ?? ??? "doBy"? ???? ??? ? ?? ??? ?????. ????? install.packages(""ggplot2")? ??? ???? ???? ??? ???? ????, library??? ggplot2? ???? ??? ? ?? ???. ???? ???? ???? ???? ??? ??? ? ???. ? ?? ???? age_group?? ??? ??? ??(Impressions)? ?? ???? ????. x?? ?? ??, y?? ???? ???? ? ????? age_group?? ?? ??? ???? ? ? ??. ????? 5??? ?? ?? ??? ???? ? ? ??, ?? ?? ????? ?? ?? ??? ???? ? ? ??. ? ?? ???? ????? age_group?? ?? ??? ????. ??? ??? ???? ?????, ?? ??? 5??? ??? ??? ???. ?? ????? ???? ????? ?? ?? 5?? ?? ??? ??? ????? ??? ? ? ??. ?? ???? hasimps?? ??? ? ??? ?? ??? 0? 0? ?? ???? ??? ? ???. summaryBy? ?? 1? ???? Impressions? ?? 0?? ????. ?? ??? ???? Clicks? ??. 2?? ?? ??? ??? Cilcks? 0? ? ? ??? ????. ?? ?? ??? 0?? ? ?, ???(Clicks/Impressions)? ?? ????? ?????????. ??? ??? ???? 0? ? ?? ?? ??? ?? ??? ??? ??? ?? ???? ??? ?? ? ? ??. ???? ?? ??? 0?? ? ?, ???(Clicks/Impressions)? ?? ????? ?????????. ???? ???? ??? 0.25?? ?? ?? ?? ????. ?? ?? ? ? ?? ?? ??? ? ???? 4~5?? 1? ?? ?? ??? ???? ? ? ??. Clicks? 0?? ? ?, ?? ??? ?? ??? ??? ?????. ?? ????? ?? 1? ??? ???? 2? ??? ?? ?? ?? ? ? ??. Clicks? 0?? ? ?, ?? ??? ??? ?????????. ?? boxplot??? ??? ??? 1? ?? ?? ??? ????. ???? scode??? ????, ?? ?? ??? 0? ?? “NoImps", ?? ??? 0???? Clicks? 0? ?? ”Imps", ????? ?? ??? 0??? ?? “Clicks"? ??? ???. ?? head??? ?? ??? ???? ???? ?? ? ? ??. age_group, hasimps, scode? ??? ??? ??? ? ???? ???. ? ??? ?? ??? ??? ??? ?? ? ?? ?????. (?? #1) ??? ?? ???? ??? ??. scode? ?? ??? ??? ?? ??? ?? ??? ?? ????, Gender? ??, age_group? ??? ??, ???? Impressions.clen? ?? ?? ?? ?? ? ????. age_group (-Inf, 0]? ???? ???? ??? ?? ?? ?? ?? ??? ???? ??? ??? ???? ???. ??? ??? ?? ????? ?????. 2? ?? ??? Clicks? 1???? ???? ??? ????, ?? ??? 1~18???? ? ?? ??? 846?? ???. ????? ?? ??? ?? ? ? ??, ?? ?? ??? ????? ? ? ?? ?? ??? ????? ?? ? ??? ? ?? ???? ?? ?? ??? ?? ?? ???? ?? ??? ????? ?? ? ? ?? ???, ?? ?? ??? ?? ? ??? ??? ??? ?? ?? ? ?? ??? ?? ? ?? ???. ?? ? ???? ??? ????? ???? ????. ??? ?? ?????? ?? ?? ?? ???. ??? ?? ??? ???? ???? ?? ???? ??? ??? ???? ?? ????? ???? ???? ?? ?? ?? ??? ?? ? ?? ? ??? ? ??? ????. ?scodeGenderage_groupImpressions.clen1Clicks0(-Inf,0]177762Clicks0(0,18]8463Clicks0(18,24]7794Clicks0(24,34]13615Clicks0(34,44]16756Clicks0(44,54]14947Clicks0(54,64]20068Clicks0(64, Inf]25989Clicks1(0,18]152510Clicks1(18,24]89011Clicks1(24,34]150912Clicks1(34,44]191713Clicks1(44,54]164514Clicks1(54,64]233115Clicks1(64, Inf]148616Imps0(-Inf,0]11840117Imps0(0,18]600118Imps0(18,24]1553819Imps0(24,34]2569020Imps0(34,44]3129021Imps0(44,54]2856322Imps0(54,64]1862623Imps0(64, Inf]1558524Imps1(0,18]1075425Imps1(18,24]1780726Imps1(24,34]2924127Imps1(34,44]3551228Imps1(44,54]3214329Imps1(54,64]2149930Imps1(64, Inf]888731NoImps0(-Inf,0]92932NoImps0(0,18]4333NoImps0(18,24]12434NoImps0(24,34]16535NoImps0(34,44]21936NoImps0(44,54]22437NoImps0(54,64]11838NoImps0(64, Inf]12539NoImps1(0,18]8340NoImps1(18,24]13241NoImps1(24,34]20842NoImps1(34,44]24743NoImps1(44,54]21944NoImps1(54,64]15845NoImps1(64, Inf]72Ⅲ. ?? ? ???? ??? ?? ????? ???? ?????. ?? ??? ?? ?? ???? ??? ????? ? ???? ??? ??? ??. (1) ???? ??? ????. ???? ?????? ??? ???? ?? ?? 8?? ??? ??? ???? ????? ??? ??? ?? ?? ??, Google Power Searching? ???? HTML, Python, R ? ?? ????? ??? ??? ?? ???? ?? ???? ??? ???? ??? ??? ???? ??? ?? ???. ??? ?? ?? ?? ???? ??? ??????? ??? ??? ????? ??? ???? ??? ???? ???? ?? ?? ?? ??? ?? ? ??? ??. ??? ?? ?? ??? ???? ? ??? ??? ???. (2) ????? ?? ? ?? ??? ??? ? ???? ???? ???? ????? ?? ?? ?? ?? ??? ????? ?? ????? ??. ?????, ??, ???, ??????, ?????? ? ? ??? ????? ??? ????? ?? ??? ?? ??? ??? ?? ??? ???? ???. ??? ??? ????? ????? ?? ??? ?? ?? ??? ??? ?? ?? ??? ?? ??? ???? ??? ?? ??? ?????.??? ????. ???? ??? ?? ????? ??? ??? ???? ???? ????. ???? ??? ??? ?? ??? ?? ??? ?? ?? ??? ?????? ??? ??? ???? ??? ???? ?? ???. ?? ??? ??? ??? ?? ??? ? ??? ???? ??? ?? ??? ??? ??? ??? ??? ?? ?? ??? ?? ??? ? ??.??? ???????. ??? R? ??? ???? ???? ????? ??? ???. ??? ????? ??? ????? ?? ?? ???? ??? ?? ???? ????? ??? ????? ?? ????. ??? ??? ??? ? ?? ???????. ??? ??? ?? ? ??? ??? ??? ??? ??????? ????? ?? ??? ???? ?? ???? ???. ?? ?? ?????? ?? ?? ??? ???? ??. ??? ??? ??? ??? ???? ?? ????? ????, ?? ??? ??? ? ?? ??? ????? ?? ??? ???. ??? ?????. ????? ???? ???? ??? ?? ??? ???? ???? ?? ????. ??? ??? ??? ?? ???? ?? ?? ? ??? ??? ????. ????? ??? ?? ???? ??? ??? ?? ??? ??? ??? ?? ???? ? ???. ??, ???? ??? ???. ???? ??? ???? ????? ??. ?? ???? ??? ??? ?? ???? ??? ???? ??. ?? ??? ??? ???? ??? ??? ??? ?? ??? ??? ?? ?? ???. ??? ??? ? ?? ??? ?? ??? ?? ???, ????? ??? ?? ??? ??? ? ?? ??? ??? ??. (3) ??? ????? ??? ????? ? ? ?? ?? ????.????? ??? ? ??? ???? ???? ??? ???? ?? ??? ??? ???, ??? ??? ?? ??? ??? ??. ??? ??? ?? ?? ????? ?? ???? ????? ???? ?? ??? ????, ???? ????? ?? ??? ???. ?? ???? ?? ?? ? ??? ???? ??? ??? ? ?? ?? ???. ? ??? ???? ???? ??? ? ?? ???? ???? ??? ??, ?? ??? ???? ??. ??? ?? ??? ???? ???? ?? ?? ??? ?????, ?? ???? ??? ?? ?? ??? ??? ???? ?? ?? ???? ?? ??? ??? ?? ? ? ?? ?? ????.(4) 3? ??? ?? 2?? ??????? ????? ????? ?? ???? ??? ??? ?? ??? ? ??. ??? ??? ??? ???? ? ? ??? ?? ?? ??? ??? ??? ????? ???? ??? ???. ?? ???? ??? ??? ??? 8? ?? ???? ??? ?? ??? ??? ??? 4????. ????? ?? ?? ???? ??? ??? ??? ???? ??? ??? ???? ??? ? ?? ???? ?? ? ??. ????? ??? ???? ??? ??? ?? ???? ??? ????? ?? ??? ?? ???? ??? ?????, ?? ????? ?? ??? ????? ??? ??? ??? ????? ??? ?? ? ? ???? ??? ? ? ?? ??? ???. ?? ??? ??? ?? ?? ????? ??? ?? ?? ?? ???. ??? ??? ????? ??? ?? ?? ??? ?? ?? ??? ?? ? ?? ?? ????, ???? ??? ??? ??? ??? ?? ?? ??? ???. ??? ??? ??? ?? ?? ??? ???? ???? ????, ??? ?? ? ?? ???? ??? ?? ?? ???? ??? ?? ??? ???. ?? ?? ??? ?? ???? ?? ???? ?? ??? ??? ? ? ??.????? ?? 2?? ??? ?? ??? ?? ??? ???? ??? ??? ???? ?? ????. Ⅳ. ??Data Science? ?? ?? 8?? ?? & CSS Ⅴ. ?? ??1. ??? ??, [????? ???], ??????, 2014 ?????.2. ??? ??? ??, ??? ??, [???? ????], ??, 2012. 3. ??? ??, ?? ?? ??, ??? ? 4? ??, [????? ??], ?????, 2014.4. ??? ??? ??, ??? ??, [????? ??], ?????, 2013. ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- wordpress passing data between pages
- wordpress business templates
- wordpress rss feed not working
- wordpress jquery is not defined
- create wordpress blog
- wordpress roles editor
- wordpress full rss feed
- wordpress rss feed settings
- wordpress rss feed plugin
- wordpress display rss feed
- wordpress rss feed link
- wordpress rss feed to post