<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tetsuya Hirata on Medium]]></title>
        <description><![CDATA[Stories by Tetsuya Hirata on Medium]]></description>
        <link>https://medium.com/@jessetetsuya?source=rss-15c8d0463752------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NPo8T6aRgp20e2tQPe0M0A.jpeg</url>
            <title>Stories by Tetsuya Hirata on Medium</title>
            <link>https://medium.com/@jessetetsuya?source=rss-15c8d0463752------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:37:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jessetetsuya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understand 8 Advanced Algorithms Problems with Python]]></title>
            <link>https://jessetetsuya.medium.com/understand-8-advanced-algorithms-problems-with-python-409c54ed6cc4?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/409c54ed6cc4</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Mon, 05 Jul 2021 12:40:33 GMT</pubDate>
            <atom:updated>2021-09-09T16:33:45.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*JSmVd6nbDJTPe0eQeyBoxQ.jpeg" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8bc0874f61459b711066274f504877c/href">https://medium.com/media/e8bc0874f61459b711066274f504877c/href</a></iframe><p>Linked List</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68e740135bc5f81565d5f577e1ba7a1c/href">https://medium.com/media/68e740135bc5f81565d5f577e1ba7a1c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a18414e76d7ac7e4f720d9a2dc3a8b98/href">https://medium.com/media/a18414e76d7ac7e4f720d9a2dc3a8b98/href</a></iframe><p>Double Linked List</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0ac24968df9b4128e150870b8408437/href">https://medium.com/media/b0ac24968df9b4128e150870b8408437/href</a></iframe><p>Binary Search Tree(BST)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3626a536fc4089c61be329d5f7c2d29/href">https://medium.com/media/e3626a536fc4089c61be329d5f7c2d29/href</a></iframe><p>Heap</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53fb412245a007ed653e9ad0b9ecefa7/href">https://medium.com/media/53fb412245a007ed653e9ad0b9ecefa7/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/44e525f67129f3b57b9b7ff6f11ef9b3/href">https://medium.com/media/44e525f67129f3b57b9b7ff6f11ef9b3/href</a></iframe><p>Breadth First Search(BFS)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a61effe80215cac04bfc168c01932cd/href">https://medium.com/media/7a61effe80215cac04bfc168c01932cd/href</a></iframe><p>Depth First Search(DFS)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3611ca7a17c818afacfcc314729103a/href">https://medium.com/media/e3611ca7a17c818afacfcc314729103a/href</a></iframe><p>Graph</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a7278a04a4d2d375906c500871dda02/href">https://medium.com/media/7a7278a04a4d2d375906c500871dda02/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=409c54ed6cc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand Design Patterns with Simple Pythonic Code]]></title>
            <link>https://jessetetsuya.medium.com/understand-design-patterns-with-simple-pythonic-code-d4ef34e2a93?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4ef34e2a93</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 09:41:38 GMT</pubDate>
            <atom:updated>2021-06-06T09:41:38.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mh9mqMzeMLbJSNAoMxkB0A.jpeg" /><figcaption>Photo by <a href="https://pixabay.com/ja/users/storme22k-4337202/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4929827">Storme22k</a> on <a href="https://pixabay.com/ja/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4929827">Pixabay</a></figcaption></figure><p>A design pattern is based on<strong> an Object Oriented Design(OOP) paradigm</strong>. Through facing <strong>the common issues related to objects</strong>, the common design pattern is extracted to solve them. The design pattern is categorized into <strong>3 sub-classifications</strong> based on kind of problem they solve.</p><p><strong>1)Creational Patterns</strong>:<br>The patterns of object creation and instance initialization<br>- Singleton(vs IBorg)<br>- Factory Method<br>- Abstract Factory Method<br>- Builder<br>- Prototype</p><p><strong>2)Structural Patterns:<br></strong>The patterns to assemble objects and classes into larger structures while keeping these structures flexible and efficient<br>- Adapter (=warraper)<br>- Bridge<br>- Composite<br>- Decorator<br>- Proxy</p><p><strong>3)Behavioural Patterns:<br></strong>The common communication patterns between objects<br>- Mediator<br>- Observer <br>- State <br>- Strategy <br>- Template Method</p><p>This article summarizes the code of each patterns in simple pythonic way. The code is referring to several web resources and books. If you understand more clearly practices, I recommend to read this book.</p><p><a href="https://www.amazon.com/gp/product/B00EO3TRL2/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i3">Python in Practice: Create Better Programs Using Concurrency, Libraries, and Patterns</a></p><h3>Creational Patterns</h3><h4>Singleton</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d48fcd0038a470d56b3c0d6b1d14ed6/href">https://medium.com/media/5d48fcd0038a470d56b3c0d6b1d14ed6/href</a></iframe><h4>Factory Method</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4672acca3fb1e61afd3ef437c2a10668/href">https://medium.com/media/4672acca3fb1e61afd3ef437c2a10668/href</a></iframe><h4>Abstract Factory Method</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8241f6bf1074e4c06f7bdd88c087506d/href">https://medium.com/media/8241f6bf1074e4c06f7bdd88c087506d/href</a></iframe><h4>Builder</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a115ac97866d49cce8d8ae65ae5afbed/href">https://medium.com/media/a115ac97866d49cce8d8ae65ae5afbed/href</a></iframe><h4>Prototype</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/faa3330064ddcb73758403c805d4c97b/href">https://medium.com/media/faa3330064ddcb73758403c805d4c97b/href</a></iframe><h3><strong>Structural Patterns</strong></h3><h4>Adapter (=warraper)</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba9012ac84788fc567ad161d1d04ad01/href">https://medium.com/media/ba9012ac84788fc567ad161d1d04ad01/href</a></iframe><h4>Bridge</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef2a7cff4956a17834c1f8889df0093b/href">https://medium.com/media/ef2a7cff4956a17834c1f8889df0093b/href</a></iframe><h4>Composite</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be2b007b61ac96727052074f476ba4a4/href">https://medium.com/media/be2b007b61ac96727052074f476ba4a4/href</a></iframe><h4>Decorator</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1dd0bf70236dba490d728ff03a3cd1c/href">https://medium.com/media/a1dd0bf70236dba490d728ff03a3cd1c/href</a></iframe><h4>Proxy</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21299578711b39404493f43abb109490/href">https://medium.com/media/21299578711b39404493f43abb109490/href</a></iframe><h3><strong>Behavioural Patterns</strong></h3><h4>Mediator</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d194127eb68265d9bdf4476ff310c317/href">https://medium.com/media/d194127eb68265d9bdf4476ff310c317/href</a></iframe><h4>Observer</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce7b81168b969fe9dc569752aa8cff2b/href">https://medium.com/media/ce7b81168b969fe9dc569752aa8cff2b/href</a></iframe><h4>State</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c9bea871160bbb312e6b42019d3144d/href">https://medium.com/media/7c9bea871160bbb312e6b42019d3144d/href</a></iframe><h4>Strategy</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/759f450560765f9bc4df84e382f37bd0/href">https://medium.com/media/759f450560765f9bc4df84e382f37bd0/href</a></iframe><h4>Template Method</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b17b6c42a544acd29129b552cae43be2/href">https://medium.com/media/b17b6c42a544acd29129b552cae43be2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4ef34e2a93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand 8 Basic Algorithms Problems with Python]]></title>
            <link>https://jessetetsuya.medium.com/understand-8-basic-algorithms-problems-with-python-790887ad8c9c?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/790887ad8c9c</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 06:05:25 GMT</pubDate>
            <atom:updated>2021-06-06T06:05:25.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9qC35kYzOHhz73L0" /><figcaption>Photo by <a href="https://unsplash.com/@fidpad?utm_source=medium&amp;utm_medium=referral">Fidias Cervantes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article tried to get deep understanding from different perspective by taking notes and coding in different ways.</p><ol><li>Check if a number is prime</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c1b4bba39a91fb04a4f992963a43d19/href">https://medium.com/media/2c1b4bba39a91fb04a4f992963a43d19/href</a></iframe><p>2. Sort number list into the number list of the even numbers in the first position and the odd numbers in the second position</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/116f551ce1c7b9756f3dcee6bb3b367c/href">https://medium.com/media/116f551ce1c7b9756f3dcee6bb3b367c/href</a></iframe><p>3. Find the maximum sum of sequence numbers list</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/93d70cfb6a9a93656161ea470adb9265/href">https://medium.com/media/93d70cfb6a9a93656161ea470adb9265/href</a></iframe><p>4. Find the maximum count of character</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0f815ccfea588a803fcdc5031b4abb4b/href">https://medium.com/media/0f815ccfea588a803fcdc5031b4abb4b/href</a></iframe><p>5. Delete duplicate numbers and output unique number</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23c2ef513177945ab748808ea7b25e8a/href">https://medium.com/media/23c2ef513177945ab748808ea7b25e8a/href</a></iframe><p>6. Find pair of target and complement numbers which are two sum of numbers</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae3040e46b6e05524f86d539c7e6da24/href">https://medium.com/media/ae3040e46b6e05524f86d539c7e6da24/href</a></iframe><p>7. Output permutations of input number list</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76bf5fe28981660051369700a12d9903/href">https://medium.com/media/76bf5fe28981660051369700a12d9903/href</a></iframe><p>8. Implement cache function</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db537762afacac75eac3eb73c4150f47/href">https://medium.com/media/db537762afacac75eac3eb73c4150f47/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=790887ad8c9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand Algorithm Evaluation and Basic Algorithms]]></title>
            <link>https://jessetetsuya.medium.com/understand-algorithm-evaluation-and-basic-algorithms-661b3c324065?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/661b3c324065</guid>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 05:07:26 GMT</pubDate>
            <atom:updated>2021-09-12T05:14:39.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3ssd5fTFLPMvRmJg" /><figcaption>Photo by <a href="https://unsplash.com/@davidclode?utm_source=medium&amp;utm_medium=referral">David Clode</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The main indicator to evaluate algorithms is the <strong>speed</strong> to process data. The major way to evaluate the speed of the algorithm is<strong> Big O notation</strong>.</p><h3>Big O notation</h3><blockquote><strong>Big O notation</strong> is a mathematical notation that describes the <a href="https://en.wikipedia.org/wiki/Asymptotic_analysis">limiting behavior</a> of a <a href="https://en.wikipedia.org/wiki/Function_(mathematics)">function</a> when the <a href="https://en.wikipedia.org/wiki/Argument_of_a_function">argument</a> tends towards a particular value or infinity.(wikipedia: <a href="https://en.wikipedia.org/wiki/Big_O_notation#:~:text=Big%20O%20notation%20is%20a,a%20particular%20value%20or%20infinity.">Big O notation</a>)</blockquote><p>In other word, Big O(Order) notation is the calculation ability of the functions according to how these run <strong>time</strong> or <strong>space</strong> requirements grow as the <strong>input size grows</strong>. The letter O is used because the growth rate of a function is also referred to as the order of the function.</p><p>There are the two key words to understand Big O notation like the below:<br><strong>Time complexity</strong>: time to finish the function execution<br><strong>Space complexity</strong>: memory to use for the function execution</p><p><strong>Time complexity is the same as space complexity but the usage is different.</strong></p><p>Representations of Big O notation:<br>O(1) &gt; O(log n) &gt; O(n) &gt;O(n log n)&gt; O(n2) &gt; O(n3) &gt; O(nn)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*q1zSRCJvJ8MV38oSybOWFA.png" /><figcaption>This image is created by Jesse Tetsuya.</figcaption></figure><p>Coding examples:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5c0c1a881d64d55f406b5e4f3b78cbf/href">https://medium.com/media/a5c0c1a881d64d55f406b5e4f3b78cbf/href</a></iframe><p>References of time complexity:</p><ul><li><a href="https://www.youtube.com/watch?v=D6xkbGLQesk">Introduction to Big O Notation and Time Complexity (Data Structures &amp; Algorithms #7)</a></li><li><a href="https://www.youtube.com/watch?v=waPQP2TDOGE">The Ultimate Big O Notation Tutorial (Time &amp; Space Complexity For Algorithms)</a></li></ul><h3>Algorithm approach</h3><p>There are <strong>two kinds of approaches </strong>and <strong>three algorithms </strong>to process data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*MgZEq4mA2YeZGYPt_jAVpQ.png" /><figcaption>This image is created by Jesse Tetsuya.</figcaption></figure><p><strong>Bottom up approach:</strong></p><p>small number -&gt; big number</p><pre>for i in range(5):<br>    print(i)<br>-&gt; 0,1,2,3,4</pre><p><strong>Top down approach:</strong></p><p>big number -&gt; small number</p><pre>def recursion(N):<br>    if N &lt; 2:<br>        return N<br>    print(N)<br>    return recursion(N-1)</pre><pre>recursion(5)<br>-&gt; 5, 4, 3, 2, 1</pre><p><strong>1)Brute force</strong></p><p>= for loop</p><p><strong>2)Divide and Conquer</strong></p><p>A divide-and-conquer algorithm recursively breaks down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly.</p><p>In short word, divide a problem into a few subproblems or more.<br>=recursion</p><p><strong>3)Dynamic algorithm</strong></p><p>A divide-and-conquer algorithm recursively breaks down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. On the top of that, store the result and re-use it.</p><p>In short word, divide a problem into a few subproblems or more and re-use the results of them.<br>- recursion or for loop<br>- memoization</p><p><strong>CASE STUDY with Fibonacci Sequence:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1d76b8bfe17b016c4b96c7fa056f785/href">https://medium.com/media/c1d76b8bfe17b016c4b96c7fa056f785/href</a></iframe><p>References of Algorithm:</p><ul><li><a href="https://www.youtube.com/watch?v=OQ5jsbhAv_M">19. Dynamic Programming I: Fibonacci, Shortest Paths</a></li></ul><h3>Recursion</h3><h4>Three steps to implement Recursion:</h4><ol><li>Base case — Think of the simplest possible input for this function</li><li>Find the relation — Think how the larger problem can be solved with the help of the solution of the smaller problem</li><li>Generalize —Make a generalized function that solves the problem. Put this all together into a Mathematical function or a Tree.</li></ol><h4>Six Recursive Patterns:</h4><ol><li>Iteration — ex) Linked List in reverse order, Factorial, For loop</li><li>Breaking Into Subproblems — ex) Towers of Hanoi, Fibonacci</li><li>Selection — ex) Knapsack, Word break…etc.</li><li>Ording — ex) Permutationse…etc.</li><li>Divide and Conquer — ex) Mergesort, Generate all BSTs for a set of items</li><li>Depth First Search — ex) Search in a tree…etc.</li></ol><h4>Tree representation of <strong>Fibonacci Sequence:</strong></h4><p>You should understand the below picture following the code of divide and conquer approach by recursion and the code of recursion with memoization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*729ea2ziEUMhx_7AJzHgjw.jpeg" /></figure><h3>Sort algorithms</h3><p>Learning sort algorithms can be a good stepping stone to learn the core principle of the algorithms.</p><p>This is the basic sort algorithms and the speed ability of each here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*xDla3NtIGUiogmwlfbjVqA.png" /><figcaption>This image is created by Jesse Tetsuya.</figcaption></figure><ul><li><strong>Bubble sort</strong>: a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf249508780eba01e8b01365465d856d/href">https://medium.com/media/cf249508780eba01e8b01365465d856d/href</a></iframe><ul><li><strong>Selection sort</strong>: the selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d23f147ed46d4984f70b6d52e12c615/href">https://medium.com/media/9d23f147ed46d4984f70b6d52e12c615/href</a></iframe><ul><li><strong>Insertion sort</strong>: the array elements are compared with each other sequentially and then arranged simultaneously in some particular order.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3b4d38536c813f0b4ff438c35e6a9ad/href">https://medium.com/media/f3b4d38536c813f0b4ff438c35e6a9ad/href</a></iframe><ul><li><strong>Quick sort</strong>: a type of Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c55c9d4978d30eb579af9d968bf90146/href">https://medium.com/media/c55c9d4978d30eb579af9d968bf90146/href</a></iframe><ul><li><strong>Merge sort</strong>: a type of Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves. The point is that the numbers are sorted just when the numbers are merged.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d0d1ef67e848713c0d2f37373ed9205/href">https://medium.com/media/7d0d1ef67e848713c0d2f37373ed9205/href</a></iframe><h3>Search, <strong>Stack, and </strong>Queue</h3><ul><li><strong>Search</strong>: the algorithm to find the number which you want. There are three kinds of basic search algorithms such as linear search, binary search, and binary search with recursion. The input data of the below code is sorted in order.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee3a973b51f078e77cf6f81a465c530e/href">https://medium.com/media/ee3a973b51f078e77cf6f81a465c530e/href</a></iframe><ul><li><strong>Stack</strong>: a stack is an abstract data type that serves as a collection of elements, with two main principal operations: <strong>push</strong>, which adds an element to the collection, and <strong>pop</strong>, which removes the most recently added element that was not yet removed.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7ce3d8b3b5f4407e4dc2331c0a9e66a/href">https://medium.com/media/d7ce3d8b3b5f4407e4dc2331c0a9e66a/href</a></iframe><ul><li><strong>Queue</strong>: a queue is open at both its ends. One end is always used to insert data (<strong>enqueue</strong>) and the other is used to remove data (<strong>dequeue</strong>).</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d60feb85788a5fe5325ff48c12afc9c6/href">https://medium.com/media/d60feb85788a5fe5325ff48c12afc9c6/href</a></iframe><p>＊ <strong>deque</strong> allows us to add and remove from both sides of queue. While List needs O(n) to add and remove by using insert() and pop(), deque has append(), appendleft(), pop(), and popleft() which are O(1).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=661b3c324065" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand Type, Class, and Scope of Python]]></title>
            <link>https://jessetetsuya.medium.com/understand-type-class-and-scope-of-python-7fcdd091c0f3?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fcdd091c0f3</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sat, 05 Jun 2021 09:40:37 GMT</pubDate>
            <atom:updated>2021-06-05T10:14:57.759Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vVUer2Rmr-tQ-RWH" /><figcaption>Photo by <a href="https://unsplash.com/@timothycdykes?utm_source=medium&amp;utm_medium=referral">Timothy Dykes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Python itself has <strong>the two parts of the code which are built-in code or not</strong>. The built-in code means that the code is written inside an interpreter based on C. These <strong>type</strong>, <strong>class</strong>, and <strong>scope</strong> as the python core components have built-in code and not built-in code.</p><p>This might lead to the confusion for python learners to understand <strong>type</strong>, <strong>class</strong>, and <strong>scope </strong>because built-in code is difficult for them to find the written places and understand C code.</p><p>So, the article try to clearly identify <strong>what type, class, and scope are and how they work.</strong></p><h3>Prerequisite Knowledge</h3><ul><li>Object has the two meanings in python formal documents such as abstract representation of data and class.</li><li>Object has data types, id, value as abstract representation of data.</li><li>Object itself is class.</li><li>Class is the way to define data types.</li><li>Class always inherits object as first argument but dose not need to be explicitly written.</li><li>Class is the another representation of a group of dictionaries.</li><li>This is because each object and variable of namespace is stored in __dict__ as dictionary.</li><li>A namespace is the place of objects which is composed of the three scopes(global, local, built-in).</li><li>Special methods are represented by double underscore and used for overriding built-in methods and classes.</li><li>When a variable name is used in Python code, it is resolved by looking it up in multiple nested scopes.</li><li>Python looks up variable references by searching them in code block scope’s dictionary.</li></ul><h3>Overview of Type and Class</h3><figure><img alt="This image is created by Jesse Tetsuya." src="https://cdn-images-1.medium.com/max/721/1*aO8-jDQnq63s86TGw_w4LQ.png" /><figcaption>This image is created by Jesse Tetsuya.</figcaption></figure><h4>User-Defined Class</h4><p>In Python, everything is <strong>object</strong>. Class is the way to define <strong>data types</strong>.</p><p>By writing class and making it instance, the above code define the data type as UserDefinedClass which is bonded to the top level module (__main__).</p><pre>&gt;&gt;&gt; class UserDefinedClass:<br>...       pass<br>... <br>&gt;&gt;&gt; c = UserDefinedClass()<br>&gt;&gt;&gt; type(c)<br>&lt;class &#39;__main__.UserDefinedClass&#39;&gt;</pre><p>Before making it instance, see what the data type of UserDefinedClass object by using type() and trace what class is inherited from by using __bases__.</p><pre>&gt;&gt;&gt; type(UserDefinedClass)<br>&lt;class &#39;type&#39;&gt;<br>&gt;&gt;&gt; UserDefinedClass.__bases__<br>(&lt;class &#39;object&#39;&gt;,)<br>&gt;&gt;&gt; type(UserDefinedClass.__bases__[0])<br>&lt;class &#39;type&#39;&gt;<br>&gt;&gt;&gt; UserDefinedClass.__bases__[0].__bases__<br>()</pre><p><strong>UserDefinedClass inherits object and object dose not inherit anything, so empty tuple is returned.</strong></p><h4>Built-in (data) Types and Built-in Classes</h4><p>These are defined by <strong>class</strong> and <strong>the types of (data) type are type</strong>. <strong>Type is also type defined by class.</strong> You can check the below code.</p><pre>&gt;&gt;&gt; for t in int, float, dict, list, tuple:<br>...       print(type(t))<br>... <br>&lt;class &#39;type&#39;&gt;<br>&lt;class &#39;type&#39;&gt;<br>&lt;class &#39;type&#39;&gt;<br>&lt;class &#39;type&#39;&gt;<br>&lt;class &#39;type&#39;&gt;<br>&gt;&gt;&gt; type(1)<br>&lt;class &#39;int&#39;&gt;<br>&gt;&gt;&gt; type(type)<br>&lt;class &#39;type&#39;&gt;</pre><p>If you tried to customize built-in classes, you can write like the below. Let’s see it step by step.</p><ol><li>This is the built-in class definition of float() that I identified based on debugging.</li></ol><pre>class Float:<br>   def __new__(cls, x=None):<br>        if x is None:<br>           return 0.0<br>        else:<br>           return x.__float__()</pre><pre>   def __float__(self):<br>         ...<br>         ...<br>   ...<br>   ...</pre><p>2.1. Defined new method but __float__ of Float has the logic to check if the object is float or not.</p><pre>&gt;&gt;&gt; class CustomizedFloat:<br>... def __init__(self, value):<br>...    self.value = value<br>... def __float__(self):<br>...    return self.value * 10<br>...<br>&gt;&gt;&gt; f = CustomizedFloat(2)<br>&gt;&gt;&gt; float(f)<br>Traceback (most recent call last):<br>File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>TypeError: CustomizedFloat.__float__ returned non-float (type int)<br>&gt;&gt;&gt; f = CustomizedFloat(2.0)<br>&gt;&gt;&gt; float(f)<br>20.0</pre><p>2.2. Override the built-in class definition of float()</p><pre>&gt;&gt;&gt; class CustomizedFloat(float):<br>...      def __init__(self, value):<br>...          self.value = value<br>...      def __float__(self):<br>...          return super().__float__()*10<br>... <br>&gt;&gt;&gt; f = CustomizedFloat(2)<br>&gt;&gt;&gt; float(f)<br>20.0</pre><p>Tips: what is x.__float__() ?</p><pre>&gt;&gt;&gt; dir(f)<br>[&#39;__abs__&#39;, &#39;__add__&#39;, &#39;__bool__&#39;, &#39;__ceil__&#39;, &#39;__class__&#39;, &#39;__delattr__&#39;, &#39;__dict__&#39;, &#39;__dir__&#39;, &#39;__divmod__&#39;, &#39;__doc__&#39;, &#39;__eq__&#39;, &#39;__float__&#39;, &#39;__floor__&#39;, &#39;__floordiv__&#39;, &#39;__format__&#39;, &#39;__ge__&#39;, &#39;__getattribute__&#39;, &#39;__getformat__&#39;, &#39;__getnewargs__&#39;, &#39;__gt__&#39;, &#39;__hash__&#39;, &#39;__init__&#39;, &#39;__init_subclass__&#39;, &#39;__int__&#39;, &#39;__le__&#39;, &#39;__lt__&#39;, &#39;__mod__&#39;, &#39;__module__&#39;, &#39;__mul__&#39;, &#39;__ne__&#39;, &#39;__neg__&#39;, &#39;__new__&#39;, &#39;__pos__&#39;, &#39;__pow__&#39;, &#39;__radd__&#39;, &#39;__rdivmod__&#39;, &#39;__reduce__&#39;, &#39;__reduce_ex__&#39;, &#39;__repr__&#39;, &#39;__rfloordiv__&#39;, &#39;__rmod__&#39;, &#39;__rmul__&#39;, &#39;__round__&#39;, &#39;__rpow__&#39;, &#39;__rsub__&#39;, &#39;__rtruediv__&#39;, &#39;__set_format__&#39;, &#39;__setattr__&#39;, &#39;__sizeof__&#39;, &#39;__str__&#39;, &#39;__sub__&#39;, &#39;__subclasshook__&#39;, &#39;__truediv__&#39;, &#39;__trunc__&#39;, &#39;__weakref__&#39;, &#39;as_integer_ratio&#39;, &#39;conjugate&#39;, &#39;fromhex&#39;, &#39;hex&#39;, &#39;imag&#39;, &#39;is_integer&#39;, &#39;real&#39;, &#39;value&#39;]<br>&gt;&gt;&gt; f.__float__()<br>20.0</pre><h4>Built-in Functions</h4><p>When built-in classes are used as functions, these are like the below.</p><p>bool(), bytearray(), bytes(), complex(), dict(), float(), frozenset(), int(), list(), object(), range(), set(), slice(), str(), tuple()</p><blockquote>Below is a list of the types that are built into Python. Extension modules (written in C, Java, or other languages, depending on the implementation) can define additional types. Future versions of Python may add types to the type hierarchy (e.g., rational numbers, efficiently stored arrays of integers, etc.), although such additions will often be provided via the standard library instead.</blockquote><blockquote>Some of the type descriptions below contain a paragraph listing ‘special attributes.’ These are attributes that provide access to the implementation and are not intended for general use. Their definition may change in the future. (<a href="https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy">3.2. The standard type hierarchy</a>)</blockquote><pre>&gt;&gt;&gt; len<br>&lt;built-in function len&gt;<br>&gt;&gt;&gt; type(len)<br>&lt;class &#39;builtin_function_or_method&#39;&gt;</pre><p>This might be difficult to check behaviors of built-in methods, so let’s see it by overriding built-in methods with special methods and changing the operand behaviors.</p><pre>&gt;&gt;&gt; class CustmizedAdd:<br>...    def __init__(self, value):<br>...        self.value = value<br>...    def __add__(self, other):<br>...        return self.value * other.value<br>... <br>&gt;&gt;&gt; c1 = CustmizedAdd(10)<br>&gt;&gt;&gt; c2 = CustmizedAdd(20)<br>&gt;&gt;&gt; c1 + c2<br>200</pre><p>Built-in methods are defined in object class and you can use them in any scope. So, the above code inherited object and override object.__add__.</p><p>For example, object.__add__ can be used like the below code.</p><pre>&gt;&gt;&gt; 1.__add__<br>  File &quot;&lt;stdin&gt;&quot;, line 1<br>    1.__add__<br>      ^<br>SyntaxError: invalid syntax<br>&gt;&gt;&gt; a = 1<br>&gt;&gt;&gt; a.__add__<br>&lt;method-wrapper &#39;__add__&#39; of int object at 0x107bff930&gt;<br>&gt;&gt;&gt; a.__add__(3)<br>4</pre><h4>Class can be defined by type()</h4><pre>class CustmizedClass1:<br>    x = 1<br>CustmizedClass1()<br>-&gt; &lt;__main__.CustmizedClass1 at 0x10d4ca640&gt;</pre><pre>CustmizedClass2 = type(&#39;CustmizedClass2&#39;, (object,), dict(x=1))<br>CustmizedClass2()<br>-&gt; &lt;__main__.CustmizedClass2 at 0x10d4cae20&gt;</pre><h4>Class can be instances by two ways like the below.</h4><pre>class C:<br>    def f(self, value):<br>        return value</pre><p>1) self binds x</p><pre>x = C()<br>z = C.f(x,1)<br>type(z)<br>&lt;class &#39;int&#39;&gt;</pre><p>2) When the instance methods is called, __func__(__self__, *args) as special methods are also called. You do not need to write self.</p><pre>x = C()<br>y = x.f(1)<br>type(y)<br>&lt;class &#39;int&#39;&gt;</pre><h3>Overview of Scope</h3><p>Python try to look up the variable from local scope, global scope, and built-in scope in order.</p><figure><img alt="This image is created by Jesse Tetsuya." src="https://cdn-images-1.medium.com/max/669/1*w1jFuulfBNB17WmQOsE46g.png" /><figcaption>This image is created by Jesse Tetsuya.</figcaption></figure><p>You can find what are in built in scope like the below command.</p><pre>$ python3<br>Python 3.9.2<br>[Clang 6.0 (clang-600.0.57)] on darwin<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; dir()<br>[&#39;__annotations__&#39;, &#39;__builtins__&#39;, &#39;__doc__&#39;, &#39;__loader__&#39;, &#39;__name__&#39;, &#39;__package__&#39;, &#39;__spec__&#39;]<br>&gt;&gt;&gt; dir(__builtins__)<br>[&#39;ArithmeticError&#39;, &#39;AssertionError&#39;, &#39;AttributeError&#39;, &#39;BaseException&#39;, &#39;BlockingIOError&#39;, &#39;BrokenPipeError&#39;, &#39;BufferError&#39;, &#39;BytesWarning&#39;, &#39;ChildProcessError&#39;, &#39;ConnectionAbortedError&#39;, &#39;ConnectionError&#39;, &#39;ConnectionRefusedError&#39;, &#39;ConnectionResetError&#39;, &#39;DeprecationWarning&#39;, &#39;EOFError&#39;, &#39;Ellipsis&#39;, &#39;EnvironmentError&#39;, &#39;Exception&#39;, &#39;False&#39;, &#39;FileExistsError&#39;, &#39;FileNotFoundError&#39;, &#39;FloatingPointError&#39;, &#39;FutureWarning&#39;, &#39;GeneratorExit&#39;, &#39;IOError&#39;, &#39;ImportError&#39;, &#39;ImportWarning&#39;, &#39;IndentationError&#39;, &#39;IndexError&#39;, &#39;InterruptedError&#39;, &#39;IsADirectoryError&#39;, &#39;KeyError&#39;, &#39;KeyboardInterrupt&#39;, &#39;LookupError&#39;, &#39;MemoryError&#39;, &#39;ModuleNotFoundError&#39;, &#39;NameError&#39;, &#39;None&#39;, &#39;NotADirectoryError&#39;, &#39;NotImplemented&#39;, &#39;NotImplementedError&#39;, &#39;OSError&#39;, &#39;OverflowError&#39;, &#39;PendingDeprecationWarning&#39;, &#39;PermissionError&#39;, &#39;ProcessLookupError&#39;, &#39;RecursionError&#39;, &#39;ReferenceError&#39;, &#39;ResourceWarning&#39;, &#39;RuntimeError&#39;, &#39;RuntimeWarning&#39;, &#39;StopAsyncIteration&#39;, &#39;StopIteration&#39;, &#39;SyntaxError&#39;, &#39;SyntaxWarning&#39;, &#39;SystemError&#39;, &#39;SystemExit&#39;, &#39;TabError&#39;, &#39;TimeoutError&#39;, &#39;True&#39;, &#39;TypeError&#39;, &#39;UnboundLocalError&#39;, &#39;UnicodeDecodeError&#39;, &#39;UnicodeEncodeError&#39;, &#39;UnicodeError&#39;, &#39;UnicodeTranslateError&#39;, &#39;UnicodeWarning&#39;, &#39;UserWarning&#39;, &#39;ValueError&#39;, &#39;Warning&#39;, &#39;ZeroDivisionError&#39;, &#39;_&#39;, &#39;__build_class__&#39;, &#39;__debug__&#39;, &#39;__doc__&#39;, &#39;__import__&#39;, &#39;__loader__&#39;, &#39;__name__&#39;, &#39;__package__&#39;, &#39;__spec__&#39;, &#39;abs&#39;, &#39;all&#39;, &#39;any&#39;, &#39;ascii&#39;, &#39;bin&#39;, &#39;bool&#39;, &#39;breakpoint&#39;, &#39;bytearray&#39;, &#39;bytes&#39;, &#39;callable&#39;, &#39;chr&#39;, &#39;classmethod&#39;, &#39;compile&#39;, &#39;complex&#39;, &#39;copyright&#39;, &#39;credits&#39;, &#39;delattr&#39;, &#39;dict&#39;, &#39;dir&#39;, &#39;divmod&#39;, &#39;enumerate&#39;, &#39;eval&#39;, &#39;exec&#39;, &#39;exit&#39;, &#39;filter&#39;, &#39;float&#39;, &#39;format&#39;, &#39;frozenset&#39;, &#39;getattr&#39;, &#39;globals&#39;, &#39;hasattr&#39;, &#39;hash&#39;, &#39;help&#39;, &#39;hex&#39;, &#39;id&#39;, &#39;input&#39;, &#39;int&#39;, &#39;isinstance&#39;, &#39;issubclass&#39;, &#39;iter&#39;, &#39;len&#39;, &#39;license&#39;, &#39;list&#39;, &#39;locals&#39;, &#39;map&#39;, &#39;max&#39;, &#39;memoryview&#39;, &#39;min&#39;, &#39;next&#39;, &#39;object&#39;, &#39;oct&#39;, &#39;open&#39;, &#39;ord&#39;, &#39;pow&#39;, &#39;print&#39;, &#39;property&#39;, &#39;quit&#39;, &#39;range&#39;, &#39;repr&#39;, &#39;reversed&#39;, &#39;round&#39;, &#39;set&#39;, &#39;setattr&#39;, &#39;slice&#39;, &#39;sorted&#39;, &#39;staticmethod&#39;, &#39;str&#39;, &#39;sum&#39;, &#39;super&#39;, &#39;tuple&#39;, &#39;type&#39;, &#39;vars&#39;, &#39;zip&#39;]</pre><p>You can see each object and variable of namespace is stored in __dict__ as dictionary by using locals() and globals().</p><pre>$ python<br>Python 3.9.2<br>[Clang 6.0 (clang-600.0.57)] on darwin<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; x = 1<br>&gt;&gt;&gt; y = 2<br>&gt;&gt;&gt; print(globals())<br>{&#39;__name__&#39;: &#39;__main__&#39;, &#39;__doc__&#39;: None, &#39;__package__&#39;: None, &#39;__loader__&#39;: &lt;class &#39;_frozen_importlib.BuiltinImporter&#39;&gt;, &#39;__spec__&#39;: None, &#39;__annotations__&#39;: {}, &#39;__builtins__&#39;: &lt;module &#39;builtins&#39; (built-in)&gt;, &#39;x&#39;: 1, &#39;y&#39;: 2}<br>&gt;&gt;&gt; def func1():<br>...     z =3 <br>...     print(locals())<br>...     return z<br>... <br>&gt;&gt;&gt; def func2():<br>...     z = 4 <br>...     print(locals())<br>...     return z<br>... <br>&gt;&gt;&gt; def func3():<br>...     print(globals())<br>...     return &quot;variables in global scope&quot;<br>... <br>&gt;&gt;&gt; func1()<br>{&#39;z&#39;: 3}<br>3<br>&gt;&gt;&gt; funct2()<br>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>NameError: name &#39;funct2&#39; is not defined<br>&gt;&gt;&gt; func2()<br>{&#39;z&#39;: 4}<br>4<br>&gt;&gt;&gt; func3()<br>{&#39;__name__&#39;: &#39;__main__&#39;, &#39;__doc__&#39;: None, &#39;__package__&#39;: None, &#39;__loader__&#39;: &lt;class &#39;_frozen_importlib.BuiltinImporter&#39;&gt;, &#39;__spec__&#39;: None, &#39;__annotations__&#39;: {}, &#39;__builtins__&#39;: &lt;module &#39;builtins&#39; (built-in)&gt;, &#39;x&#39;: 1, &#39;y&#39;: 2, &#39;func1&#39;: &lt;function func1 at 0x107e09280&gt;, &#39;func2&#39;: &lt;function func2 at 0x107e09310&gt;, &#39;func3&#39;: &lt;function func3 at 0x107e093a0&gt;}<br>&#39;variables in global scope&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fcdd091c0f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand Python Data Model Through Coding and Debugging]]></title>
            <link>https://jessetetsuya.medium.com/understand-python-data-model-through-coding-and-debugging-d6cd910f0123?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6cd910f0123</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[datastrucutre]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sat, 05 Jun 2021 09:31:13 GMT</pubDate>
            <atom:updated>2021-06-05T10:03:50.352Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWhlHoGL6TM2zVM8zH2D7w.jpeg" /><figcaption>Photo by <a href="https://pixabay.com/ja/users/steve001-389276/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=771541">Steve001</a> on <a href="https://pixabay.com/ja/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=771541">Pixabay</a></figcaption></figure><p>At first, let’s quickly summarize Python Data Model based on the <a href="https://docs.python.org/3/reference/datamodel.html">Python documents</a>. The below quote in the document is the core idea of Python Data Model that you should not forget.</p><blockquote><em>Objects</em> are Python’s abstraction for data. All data in a Python program is represented by objects or by relations between objects. (In a sense, and in conformance to Von Neumann’s model of a “stored program computer”, code is also represented by objects.)</blockquote><p>There are three key points below that we need to keep in mind.</p><p><strong>1)Python Data Model:</strong><br><strong>Objects</strong> are the abstract representations of the data.<br>Objects consist of <strong>identity(id)</strong>, <strong>type</strong>, and <strong>value</strong>.<br>- <strong>id</strong> is the unique number of each object which means <strong>object address in the memory, and it is created with object.</strong><br>- <strong>type</strong> is the <strong>data type</strong>, in other word <strong>the data category</strong>. <br>- <strong>value</strong> is the <strong>data itself</strong>.</p><p><strong>2)Object Types:</strong><br><strong>Immutable</strong>: impossible to add values to the object having the same id<br><strong>Mutable</strong>: possible to add values to the object having the same id<br><strong>Iterable</strong>: possible to extract values<br><strong>Sequence</strong>: possible to extract values in order</p><p><strong>3)Summary of the Data Types and the Object Types:</strong><br> — — — <br>int, bool, float: <strong>immutable</strong><br>str: <strong>immutable, iterable, sequence</strong><br>tuple: <strong>immutable, iterable, sequence</strong><br> — — — <br>list: <strong>mutable, iterable, sequence</strong><br>dict: <strong>mutable, iterable</strong><br>set: <strong>mutable, iterable</strong><br> — — —</p><p>Before starting to write code, I suggest to install JupyterLab for coding and debugging.</p><pre>$ pip install jupyterlab</pre><h3>Mutable vs Immutable on Default Argument Coding to understand Python Data Model</h3><p><strong>Notice1: drawbacks of immutable object<br></strong>- It is possible to change values in the same object whenever the function is executed.<br>- There are chances to unconsciously use extra memory.</p><p><strong>Notice2: features of set and dict<br></strong>- Not allowed to add the same values which means that set object and key object stay unique<br>- In order to add the same values in the dict object, you need to add different key to the same values.</p><p><strong>Notice3: memory size of each data type<br></strong>int &gt; str &gt; tuple &gt; list &gt; set &gt; dict</p><p><strong>Notice4: combination with non-iterable object and tuple.<br></strong>- Whenever tuple and ‘=’ are used, the values are iterable.<br>- ‘+=’or’=’ with tuple needs iterable object.</p><p>Coding Examples of the <strong>Immutable Objects</strong>:</p><pre>import sys</pre><pre>def immutable1(k=&#39;&#39;, v=&#39;10&#39;):<br>    k+=v<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>immutable1()<br>immutable1()</pre><pre>object id: 4444478960<br>memory: 51<br>output: 10<br>object id: 4444478960<br>memory: 51<br>output: 10<br>-----</pre><pre>def immutable2(k=0, v=10):<br>    k+=v<br>    print(id(k))<br>    print(sys.getsizeof(k))<br>    print(k)</pre><pre>immutable2()<br>immutable2()</pre><pre>object id: 4437834320<br>memory: 28<br>output: 10<br>object id: 4437834320<br>memory: 28<br>output: 10<br>-----</pre><pre>def tuple_immutable3(k=(), v=tuple(10)):<br>    k+=v<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>---------------------------------------------------------------------------<br><br>TypeError                                 Traceback (most recent call last)<br><br>&lt;ipython-input-8-b7fcf44f6867&gt; in &lt;module&gt;<br>----&gt; 1 def tuple_immutable3(k=(), v=tuple(10)):<br>      2     k+=v<br>      3     print(&#39;object id: &#39;+ str(id(k)))<br>      4     print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>      5     print(&#39;output: &#39;+ str(k))<br><br><br>TypeError: &#39;int&#39; object is not iterable<br>-----</pre><pre>def tuple_immutable4(k=(), v=tuple(&#39;111&#39;)):<br>    k+=v<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>tuple_immutable4()<br>tuple_immutable4()</pre><pre>object id: 4477693248<br>memory: 64<br>output: (&#39;1&#39;, &#39;1&#39;, &#39;1&#39;)<br>object id: 4477693248<br>memory: 64<br>output: (&#39;1&#39;, &#39;1&#39;, &#39;1&#39;)</pre><p>Coding Examples of the <strong>Mutable Objects</strong>:</p><pre>def mutable1(k=[], v=10):<br>    k.append(v)<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>mutable1()<br>mutable1()<br>mutable1()<br>mutable1()<br>mutable1()</pre><pre><strong>object id: 4506089856<br>memory: 88<br>output: [10]<br>object id: 4506089856<br>memory: 88<br>output: [10, 10]<br>object id: 4506089856<br>memory: 88<br>output: [10, 10, 10]</strong><br><strong>object id: 4506089856<br>memory: 88<br>output: [10, 10, 10, 10]<br>object id: 4506089856<br>memory: 120<br>output: [10, 10, 10, 10, 10]</strong><br>-----</pre><pre>def mutable2(k=None, v=10):<br>    k = []<br>    k.append(v)<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>mutable2()<br>mutable2()<br>mutable2()<br>mutable2()<br>mutable2()</pre><pre>object id: 4506095680<br>memory: 88<br>output: [10]<br>object id: 4506038976<br>memory: 88<br>output: [10]<br>object id: 4506095808<br>memory: 88<br>output: [10]<br>object id: 4506090880<br>memory: 88<br>output: [10]<br>object id: 4506095680<br>memory: 88<br>output: [10]<br>-----</pre><pre>def mutable3(k=set(), v=10):<br>    k.add(v)<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>mutable3()<br>mutable3()<br>mutable3()<br>mutable3()<br>mutable3()</pre><pre>object id: 4507180384<br>memory: 216<br>output: {10}<br>object id: 4507180384<br>memory: 216<br>output: {10}<br>object id: 4507180384<br>memory: 216<br>output: {10}<br>object id: 4507180384<br>memory: 216<br>output: {10}<br>object id: 4507180384<br>memory: 216<br>output: {10}<br>-----</pre><pre>def mutable4(k={}, v=10):<br>    k[&quot;v&quot;] = v<br>    print(&#39;object id: &#39;+ str(id(k)))<br>    print(&#39;memory: &#39; + str(sys.getsizeof(k)))<br>    print(&#39;output: &#39;+ str(k))</pre><pre>mutable4()<br>mutable4()<br>mutable4()<br>mutable4()<br>mutable4()</pre><pre>object id: 4507220928<br>memory: 232<br>output: {&#39;v&#39;: 10}<br>object id: 4507220928<br>memory: 232<br>output: {&#39;v&#39;: 10}<br>object id: 4507220928<br>memory: 232<br>output: {&#39;v&#39;: 10}<br>object id: 4507220928<br>memory: 232<br>output: {&#39;v&#39;: 10}<br>object id: 4507220928<br>memory: 232<br>output: {&#39;v&#39;: 10}</pre><h3>Mutable vs Immutable on Early Return Coding to understand Python Data Model</h3><p><strong>Notice1: None </strong><br>- Data type of None object is ‘Nonetype’.<br>- None is different from other empty data type.</p><p><strong>Notice2: ‘=’ vs ‘is’</strong><br>- ‘=’ compares only values<br>- ‘is’ compares values and id<br>- Mutable object create different id, so be cautious when you compare the values by using ‘=’</p><p>Coding Examples of the <strong>None</strong> <strong>Objects of each data type</strong>:</p><pre>A = &#39;A&#39;<br>B = &#39;&#39;<br>C = False<br>D = 0<br>E = []<br>F = set()<br>G = tuple()<br>H = {}</pre><pre>Nothing = None</pre><pre>if not A:<br>    print(&#39;A is not empty&#39;) # No output<br>if not B:<br>    print(&#39;B is empty&#39;) # D is empty<br>if not C:<br>    print(&#39;C is empty&#39;) # C is empty<br>if not D:<br>    print(&#39;D is empty&#39;) # D is empty<br>if not E:<br>    print(&#39;E is empty&#39;) # E is empty<br>if not F:<br>    print(&#39;F is empty&#39;) # F is empty<br>if not G:<br>    print(&#39;G is empty&#39;) # G is empty<br>if not H:<br>    print(&#39;H is empty&#39;) # H is empty<br>if not Nothing:<br>    print(&#39;Nothing is none&#39;) # Nothing is none<br>------</pre><pre>if A is None:<br>    print(&#39;A is not empty&#39;) # No output<br>if B is None:<br>    print(&#39;B is empty&#39;) # No output<br>if C is None:<br>    print(&#39;C is empty&#39;) # No output<br>if D is None:<br>    print(&#39;D is empty&#39;) # No output<br>if E is None:<br>    print(&#39;E is empty&#39;) # No output<br>if F is None:<br>    print(&#39;F is empty&#39;) # No output<br>if G is None:<br>    print(&#39;G is empty&#39;) # No output<br>if H is None:<br>    print(&#39;H is empty&#39;) # No output<br>if Nothing is None:<br>    print(&#39;Nothing is none&#39;) # Nothing is none<br>------</pre><pre>if A == None:<br>    print(&#39;A is not empty&#39;) # No output<br>if B == None:<br>    print(&#39;B is empty&#39;) # No output<br>if C == None:<br>    print(&#39;C is empty&#39;) # No output<br>if D == None:<br>    print(&#39;D is empty&#39;) # No output<br>if E == None:<br>    print(&#39;E is empty&#39;) # No output<br>if F == None:<br>    print(&#39;F is empty&#39;) # No output<br>if G == None:<br>    print(&#39;G is empty&#39;) # No output<br>if H == None:<br>    print(&#39;H is empty&#39;) # No output<br>if Nothing == None:<br>    print(&#39;Nothing is none&#39;) # Nothing is none</pre><p>Coding Examples of the <strong>comparison between “=” and “is” operations of each data type</strong>:</p><pre># Mutable: even if the object has the same value, the id in the object is going to be different. <br>list1 = [1, 2, 3]<br>list2 = [1, 2, 3]<br>list3 = None<br>list4 = []</pre><pre><strong>print(id(list1)) # 4375933568<br>print(id(list2)) # 4375934016</strong><br>print(id(list3)) # 4335214224<br>print(id(list4)) # 4375933760</pre><pre># Same values and different id<br><strong>print(list1 == list2) # [1, 2, 3] == [1, 2, 3] -&gt; True<br>print(list1 is list2) # [1, 2, 3] is [1, 2, 3] -&gt; False</strong></pre><pre># Same values and same id<br>print(list3 == None) # None == None -&gt; True<br>print(list3 is None) # None is None -&gt; True</pre><pre># Same values and different id<br>print(list4 == []) # [] == [] -&gt; True<br>print(list4 is []) # [] == [] -&gt; False<br>------</pre><pre># Immutable: if the object has the same value, the id in the object is going to be the same. <br>int1 = 1<br>int2 = 1<br>int3 = None<br>int4 = 0</pre><pre><strong>print(id(int1)) # 4335356608<br>print(id(int2)) # 4335356608</strong><br>print(id(int3)) # 4335214224<br>print(id(int4)) # 4335356576</pre><pre># Same values and id<br><strong>print(int1 == int2) # 1 == 1 -&gt; True<br>print(int1 is int2) # 1 is 1 -&gt; True</strong></pre><pre># Same values and id<br>print(int3 == None) # None == None -&gt; True<br>print(int3 is None) # None is None -&gt; True</pre><pre># Different value and id<br>print(int3 == int4) # None == 0 -&gt; False<br>print(int3 is int4) # None is 0 -&gt; False</pre><p>I recommend that you write the above code by yourself and get deeper understanding. These above sample codes are insightful to know the principles of Python.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6cd910f0123" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Generate Hypothesis in Pedagogical Domain]]></title>
            <link>https://jessetetsuya.medium.com/how-to-generate-hypothesis-in-pedagogical-domain-8788946d64eb?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/8788946d64eb</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[pedagogy]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Mon, 04 Feb 2019 16:18:33 GMT</pubDate>
            <atom:updated>2019-02-04T16:18:33.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G9BLqMEyY4g7EPA3" /><figcaption>Photo by <a href="https://unsplash.com/@emilymorter?utm_source=medium&amp;utm_medium=referral">Emily Morter</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Inducting the generic way to generate and modulate hypothesis in learning by seeing MOODLE dataset.</p><h3>Educational Data Mining(EDM)</h3><h4>Description of EDM</h4><p>Generally, the statistic and machine learning techniques are used as analytical approaches to information generated from pedagogical settings with blended contexts. EDM is the extraction of information from educational records, usually online logs and exam results, and drawing of inferences therefrom. The results are useful for improving teaching practices and testing hypotheses about learning and can be used to inform the implementation of the software to allow for such predictive analytics to be performed routinely. According to Papamitsiou &amp; Economides (2014)’s systematic review of empirical evidence about EDM in practice, data analysis methods were identified as classification, clustering, regression, text mining, association mining, social network analysis, and discovery with methods visualization. Some of them are also categorized as machine learning and statistics depending on the literature. To easily identify the appropriateness of the techniques used to understand online learning behaviors of students, machine learning is categorized as unsupervised learning and supervised learning, and other analysis methods that cannot include those two kinds of machine learning techniques, such as t-test, f-test, ANOVA and etc. is defined as statistics in this article.</p><h4>Educational Data Mining Procedures</h4><p>There are a few previous studies that mentioned how researchers did pre-processing and what software they used although the description is crucial for educators to conduct preprocessing. This is because of the limitation of variables of the log data stored in Moodle, and the results would be considerably different depending on the way to preprocess the data. The data mining procedures of the study of previous literature were separated into the preprocessing phase including transforming data and analysis phase that is data mining phase. (Pechenizkiy et al. 2008)</p><p>Casany Guerrero et al. (2012) referred to 1) the data pre-processing, 2) the data processing, and 3) the data analysis as the below definitions:</p><blockquote>1) The data pre-processing includes the selection of data and cleaning data and during this step, some log data are calculated and aggregated.</blockquote><blockquote>2) The data processing includes the transformation of the data into the format following the research questions.</blockquote><blockquote>3) The data analysis includes applying data mining algorisms, and gained and interpreted the results, and generated the reports.</blockquote><p>As an example, the above flow can be adapted to the actual pre-process flow using moodle data set as described by the below figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJEz0Lzab32oOrIiRrItLQ.png" /></figure><p>Figure 1 Educational data mining processes in the present study</p><h3>Data description and preparation</h3><h4>Learning Contexts on MOODLE module</h4><p>The datasets used in this work is gathered from a Moodle 3.1 course used by 64 undergraduate and postgraduate students from a university. This module is blending online lectures and activities, the face-to-face teaching that follows offers more intensive, creative sessions of tutorial-based problem solving and learning, in small groups, and extensive laboratory practical. Most parts are conducted on Moodle such as watching lectures and doing multiple-choice or short-answer question. The module consists of 17 sessions and the two kinds of foundation exams that are called SAQ and MCQ consisted of 14 short answer questions and consisted of 30 multiple choice questions, respectively.</p><p>Online learning part of this module is based on 17’s different topics. Each topic consisted of learning outcome page, pre-learning section, storyline section, and post-learning section. Those sections include some or all of SCORM contents, quiz, forum, hot question, and system page events depending on each topic and each section (see Figure 2). All of the scores of quizzes are not part of the grade except the foundation exams (SAQ and MCQ), but the participation in these quizzes contributes towards student’s overall online participation grade, while at the end of the session, the scores of the foundation exams (SAQ and MCQ) are graded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*9_OuSL1ABboiv4ZL5ysd_Q.png" /></figure><p>Figure 2 Online learning structure of the module</p><h4>The log data that can be corrected from the MOODLE database</h4><p>The log data based on every click by students is stored on Moodle for navigational purposes or at their own pace. The log data anonymized by the third person were pre-processed by generating false names from the Internet and randomly assigning those names to student Moodle ID. There are the two kinds of log data that were extracted from built-in log‐ viewing system of Moodle and saved in CSV (Comma Separated Values) files: <strong>1) the event log data (see Table 1.1) </strong>about learning contexts and activities having 118,970 records<strong> 2) the score log data(see Table 1.2) </strong>about SAQ and MCQ exams having 64 records, which are stored as time-series data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3EUpJlx94XMUlAX4K9Mig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHBiQ7Cczn-eUmRRUYrGlg.png" /></figure><p>The learning behaviors on MOODLE can be described based on the log data as described in Table 1.3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*lZeqpMJA2aaHBfCAkQxxIw.png" /></figure><h3>The way to generate a hypothesis based on the features from educational log data</h3><p>By seeing Moodle dataset, the skeleton of features can be summarized as described by the below figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yLLc9OWOOGTQ8WgeRg-7NA.png" /><figcaption>Created by Jesse Tetsuya</figcaption></figure><p>Based on this, research questions can be narrowed down to the concrete hypothesis. If there were three research questions: ‘<strong>What can be indicators to predict exam outcomes?’ , </strong>researchers could generate<strong> ‘what is the number of clicks on the new comment button on discussion function in the Math module?’, ‘what rate online learners do click on file upload button on forum function according to teacher’s instruction?’ , or ‘How long high-scored students watch lecture movies of philosophy?’.</strong></p><p>The skeleton of each feature in the black box described in the above figure can be generalized on any online learning platform but the details depend on what data structure online platform has.</p><h3>References</h3><p>Casany Guerrero, M.J., Alier Forment, M., Galanis, N., Mayol Sarroca, E. &amp; Piguillem Poch, J.,(2012). Analyzing moodle/lms logs to measure mobile access. In <em>UBICOMM 2012: The Sixth International Conference on Mobile Ubiquitous Computing, Systems, Services and Technologies</em>. pp. 35–40. Available at: <a href="https://upcommons.upc.edu/handle/2117/19058">https://upcommons.upc.edu/handle/2117/19058</a></p><p>Papamitsiou, Zacharoula &amp; Economides, Anastasios. (2014). Learning Analytics and Educational Data Mining in Practice: A Systematic Literature Review of Empirical Evidence. Educational Technology &amp; Society. 17. 49–64.</p><p>Pechenizkiy, M., Puuronen, S. &amp; Tsymbal, A.,(2008). Does Relevance Matter to Data Mining Research?. <em>Data Mining: Foundations and Practice</em>, 118, pp.251–275.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8788946d64eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Potential Issues of the Research with Educational Data Mining]]></title>
            <link>https://medium.com/data-science/potential-issues-of-the-research-with-educational-data-mining-8d77d999ba40?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d77d999ba40</guid>
            <category><![CDATA[social-science]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 13:52:47 GMT</pubDate>
            <atom:updated>2019-01-27T13:52:47.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KrCHo1SuFkFOxEyD" /><figcaption>Photo by <a href="https://unsplash.com/@impatrickt?utm_source=medium&amp;utm_medium=referral">Patrick Tomasso</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Looking over the case study of blended learning contexts with MOODLE and arguing potential issues of educational data mining</h4><p>The aim of doing educational data mining (EDM) is identifying how students learn online in “blended” module by doing the research with machine learning techniques based on the log data stored in the MOODLE database. The results can be useful for improving teaching methods and testing hypotheses about learning and could implement the software to enable them to be performed routinely. However, the potential risks and limitations in the research methodology seem to be unclear. This article will discuss the arguments in the blow through looking over<strong> the case studies with blended online learning by using MOODLE data set.</strong></p><p>The research with EDM can be influenced by the <strong>1) learning contexts</strong>,<strong> 2) online learning platform</strong>, and <strong>3) scientific paradigm</strong> as described by figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjgtJ38UQfPCjFncI_b7Gw.png" /></figure><h3>Working Definitions</h3><p>The case study with EDM under the blended learning contexts with Moodle mainly uses machine-learning techniques. The definitions of both concepts are like the following sentences.</p><p><strong>Machine learning</strong>, considered a subfield of computer science, gives “computers the ability to learn without being explicitly programmed” (Munoz, 2014, p.1) The machine learning is based on the distribution-free statistic, which consisted of unsupervised learning and supervised learning techniques. The differences between them are whether the researchers prepare the labeled training data or not. The unsupervised learning techniques do not need the labeled training data, while they cannot gain the decisive evidence. On the other hand, the supervised learning techniques have to spend the time to label the training data and instead generate the decisive results. (Raschka et al. 2016)</p><p><strong>Moodle</strong> is a free and open-source-based learning platform referred to as one of the types of LMS or E-learning, which is coordinated by Moodle HQ, an Australian company of 30 developers financially supported by a network of over 60 Moodle Partner service companies worldwide (Moodle 2016). Moodle is used in Higher Education (HE) as one of the most common educational technology programs (Bowler 2009), and used for blended learning, distance education, flipped classroom, and other e-learning projects in schools, universities, workplaces, and other sectors (Costello 2013). Moodle provides broader flexibility for students in obtaining resources and increases engagement in tasks, which can result in better learning performances (Kirkwood &amp; Price 2014). Moodle can enable students to do classroom-learning actions, such as inquiry, acquisition, practice, discussion, production, and collaboration online and then share the output with others.</p><h4>Three Research Question Examples</h4><p>The stakeholders of EDM in the case study could mostly be educators and researchers. The goal that the educator has is to identify learner’s behaviors in order to enhance learning performance. The researcher’s goal is to identify how EDM approaches using machine learning techniques should be conducted. In order to meet the educator’s goal, the useful indicators to measure the learning outcomes should be identified in advance, and recognize the online learning behaviors. Through these processes, the researchers can meet the goal for educators and themselves. The case study examines the three following the simple questions, and by arguing them discovers the application layer of EDM.</p><p><strong>RQ1. What can be indicators to predict exam outcomes?</strong></p><p><strong>RQ2. What can be a common student’s learning behaviors on Moodle?</strong></p><p><strong>RQ3. What can the results from EDM reveal to educators and researchers?</strong></p><h3>Collaboration Indicators of Blended Learning</h3><p>Learning behaviors in the blended learning contexts, which EDM was adjusted to in the study for the above research questions, can be represented on the log data. Laurillard (2014) defined “blended learning” as</p><blockquote>“the thoughtful integration of classroom face-to-face learning experiences with online learning experiences.”</blockquote><p><strong>Blended learning</strong> is simple in that there is a considerable intuitive appeal in integrating the strengths of synchronous (face-to-face) and asynchronous (text-based Internet) learning activities. Blended learning has considerably complex in its implementation due to the challenge of virtually unlimited design possibilities and its applicability to so many contexts (Garrison &amp; Kanuka, 2004). A large amount of log data is recorded and have various variables in blended learning contexts because blended learning leads to an increase in collaboration, and access frequency and flexibility (Graham, 2006). Accordingly, the studies using EDM are usually adjusted to the blended learning to identify the characteristics of online learning behaviors. (Berland et al. 2014; McLaren et al., 2007, 2010)</p><p>The flexibilities of blended learning can enable multiple collaborative learning contexts or activities. This can increase commitments to online learning and the chances to learn online. Correspondingly, the large amount of log data can be accumulated and the distinct characteristics of online learning behaviors can be extracted from the log data. For instance, there is the blended learning with</p><blockquote>“online collaboration using software development tools” (Berland et al., 2014, p. 12; Kay et al., 2006)” and “interactive tabletop collaboration” (Berland et al., 2014, p. 12; Martinez et al., 2011).</blockquote><p>Prata (2012) noted that students, contradicted by their partners when they were incorrect, tended to learn more than students whose partners chose not to correct them. Dyke et al. (2013) revealed that off-topic discussions that took place during collaborative learning were more harmful to learning within some parts of the learning process than during other parts — specifically, off-topic discussions were more harmful when learning basic facts than during discussions of problem-solving alternatives. Some models, based on student contributions to online discussion forums, have even been able to predict the final course grades of the students. (Ming &amp; Ming 2012) Therefore, in the collaborative blended learning contexts, outstanding traits can be reflected on the learning data and the valuable results can be extracted with EDM.</p><p>However, there are also difficulties as to how knowledge is represented in online learning behaviors that have the characteristic of a reasoning action in representing the world (Davis et al., 1993), while the learning flexibility provided by blended learning methods can combine various delivery modes (Oliver &amp; Trigwell, 2005) and extend learning experiences. This is because the log data cannot be recorded without access on the Internet, and the blended learning partly involves</p><blockquote>“self-paced learning with instructor support to develop specific knowledge and skills”. (Oliver &amp; Trigwell 2005, p.2; Valiathan, 2002)</blockquote><p>Considering the individually different learning pace and individual pre-existing knowledge, learning behavior is differently represented or not represented. In addition, the technology used in the online learning environment is continually developing and changing (Laurillard, 2014). Therefore, the results that can be extracted from blended contexts using EDM are contextual. The empirical study in blended contexts using EDM need to be updated. The results could also be influenced by the characteristics of online learning platforms based on new technology as well as the learning contexts. The next section will identify the effect of the platform on the research.</p><h3>Limited Indicators of Moodle</h3><p>The online learning platform examined in the study, which is Moodle, has functional characteristics such as customizable structure and learning contents protocols. It restricts what the researchers can measure, and force the researches to conduct analysis in a certain way. EDM cannot measure the influence on student’s motivation due to a customizable structure of Moodle. This was because individual motivation can be influenced by various elements, such as<strong> internet speed, the design of online learning contents, the user interface</strong> (Beluce &amp; Oliveira 2015), and <strong>the hidden elements constituted by relationships among learners that cannot be generated on Moodle</strong>. (Selwyn 2011)</p><p>Although the trait of Moodle can provide learning environments more flexibility, it enables the developers, designers, and educators to create different learning platforms using Moodle that have various design and functions depending on stakeholders. This means that the universal learning platform using Moodle does not exist. This can lead to the difficulties to measure the impact from the learning platform itself such as motivation by using EDM approaches. For instance, when students seldom learn by using learning materials uploaded by educators, it is difficult for the researchers to understand whether the learning materials or the designs of the interface decrease learner’s motivation to use the learning materials, comparing other studies using Moodle.</p><p>The customizable traits of Moodle require the well-designed learning user interface and structure of Moodle. In an actual educational situation, most educational institutions do not utilize Moodle well to improve learning performance. (Bowler, 2009) For example, educators upload many learning materials into Moodle without considering which learning design will best motivate individuals to participate in online actions, thus students seldom learn by using these materials (Attwell &amp; Hughes, 2010; Finlayson et al., 2006). The diversity of the learning design with Moodle that came from its customizable structure can obscure the impact factors when analyzing the data by using EDM.</p><p>In addition, the protocols that Moodle is compatible with limit the variables of the log data. The capacity for learning materials such as documents, slides, and movies are limited by globally-decided protocols, such as the Sharable Content Object Reference Model (SCORM) that is adapted in Moodle, Tincan API, that is more control over learning content and more secure than SCORM content (Rustici Software, 2016), and Caliper, which can record more detailed learning actions than SCORM (IMS Global Learning Consortium Inc., 2016). As such, stakeholders of the digital content, such as developers, designers of the digital contents, educators, and schools, are forced to follow these protocols and the digital content is developed based on the framework. It is true that individual learning performances and processes on the chunked digital learning contents, which can be measured as quantitative changes in learning, are recorded in the database, and the technical property of the digital content can make it possible to personalize the learning contents on Moodle (Laurillard, 2014). However, Moodle that has the lecture movies with SCORM protocol does not record the time when students finished watching the movies, and the design framework of learning materials are predetermined.</p><p>Besides the limitation by using Moodle, the slight differences between the roles of teachers online and in classrooms in regard to their roles and responsibilities (McDonald &amp; Reushle, 2002; Oliver, 1999) differentiates the impact on online learning. In the blended learning environments with Moodle, teachers can play an integrated role, such as facilitating discussions or acting as instructional designers, which is different from their authoritative role in traditional classroom teaching environments (Selwyn, 2011). Moodle is also compatible with collaborative learning since they allow discussions to be recorded and tracked, and keep the group bounded (Easton, 2003). In the learning contexts, teachers are required for their social role and take on responsibilities, such as organizing learning communities (Easton, 2003), and encouraging learners to make communities more active (Craig et al., 2009). They can have roles as ‘instructional designers’, who design the learning processes and content, as well as ‘facilitators’ of discussion forums. Thus, the results of EDM could be directly useful for teachers to determine how they should behave online as well as analyze online learning behaviors on Moodle. Although functional aspects of Moodle limit the log data, the properties of the log data can be influenced by the role of educators such as learning designer or facilitators.</p><h3>EDM is based on the Social Science Paradigm</h3><p>The research with EDM is on the premise that every element relating to learning activities cannot always represent itself. This is because EDM is not based on the traits of natural science, but on social science, although data mining is a branch of computer science.</p><p>The research targets of <strong>natural science</strong> are</p><blockquote>“naturally occurring objects or phenomena such as light, objects, matter, earth, celestial bodies, or the human body” (Bhattacherjee et al., 2012, p. 10)</blockquote><p>whereas,<strong> social science</strong> aims at researching</p><blockquote>“people or collections of people, such as groups, firms, societies, or economies, and their individual or collective behaviors” (Bhattacherjee et al., 2012, p. 10).</blockquote><p><strong>The tradition of social science</strong> is different from that of natural science, such as being “very precise, accurate, deterministic, and independent of the person making the scientific observations” (Bhattacherjee et al., 2012, p. 1). Bovo et al. (2013)’s study about clustering Moodle data for profiling students provided very little differences in behaviors, and generate little clusters (2 to 3). Thus, EDM approaches do not always found out beneficial information even if the analysis methods were correctly adapted.</p><p>The research with EDM does not assume that every phenomenon in educational contexts can be transformed into static numerical variables that underpin “scientism” (Hyslop-Margison &amp; Nasee, 2007).</p><p>Consequently, a rich and detailed description of research contexts is needed in order to trace why the research could not gain significant results or identify the extent to which the findings can have transferability to other educational settings. (Bhattacherjee et al. 2012) This is because EDM approaches have voluntaristic traits to direct the researcher’s attitude and understanding of that data. This is due to the iterative processes of hypothesis formation, testing, and refinement (Romero &amp; Ventura, 2013), which is an iterative fashion of the data mining process itself, especially machine learning techniques. The detailed description about iterative processes of generating hypotheses can increase the credibility of the research.</p><h3>References</h3><p>Anon, Laurillard — 2014 — Thinking about blended learning.pdf. Available at: <a href="http://kvab.be/denkersprogramma/files/DP_BlendedLearning_Thinking-about.pdf">http://kvab.be/denkersprogramma/files/DP_BlendedLearning_Thinking-about.pdf</a></p><p>Attwell, G. &amp; Hughes, J.,(2010). Pedagogic approaches to using technology for learning: Literature review. Available at: <a href="http://dera.ioe.ac.uk/id/eprint/2021">http://dera.ioe.ac.uk/id/eprint/2021</a> .</p><p>Beluce, A.C. &amp; Oliveira, K.L. de,(2015). Students’ Motivation for Learning in Virtual Learning Environments. <em>Paideía; São Paulo</em>, 25(60), pp.105–113.</p><p>Berland, M., Ryan|Blikstein,Paulo,(2014). Educational Data Mining and Learning Analytics: Applications to Constructionist Research. <em>Technology, Knowledge and Learning</em>, 19(1–2), pp.205–220.</p><p>Bhattacherjee, A., University of South Florida, Scholar Commons &amp; Open Textbook Library,(2012). <em>Social science research: principles, methods, and practices</em>, Available at: <a href="https://open.umn.edu/opentextbooks/BookDetail.aspx?bookId=79">https://open.umn.edu/opentextbooks/BookDetail.aspx?bookId=79</a>.</p><p>Bowler, M.,(2009). Learning to’chat’in a virtual learning environment: Using online synchronous discussion to conduct a first year undergraduate tutorial. In <em>British Educational Research Association Annual Conference, University of Manchester</em>. pp. 2–5. Available at: <a href="http://www.leeds.ac.uk/educol/documents/184295.pdf">http://www.leeds.ac.uk/educol/documents/184295.pdf</a> .</p><p>Craig, A., Goold, A., Coldwell, J., Mustard, J. &amp; Jerry, P.,(2009). Perceptions of roles and responsibilities in online learning: A case study. <em>International Journal of Doctoral Studies</em>, 4, pp.205–223.</p><p>Costello, E.,(2013). Opening up to open source: looking at how Moodle was adopted in higher education. <em>Open Learning: The Journal of Open, Distance and e-Learning</em>, 28(3), pp.187–200.</p><p>Dyke, G., Howley, I., Adamson, D., Kumar, R. &amp; Rosé, C.P.,(2013). Towards Academically Productive Talk Supported by Conversational Agents. In <em>Productive Multivocality in the Analysis of Group Interactions</em>. Computer-Supported Collaborative Learning Series. Springer, Boston, MA, pp. 459–476. Available at: <a href="https://link.springer.com/chapter/10.1007/978-1-4614-8960-3_25">https://link.springer.com/chapter/10.1007/978-1-4614-8960-3_25</a>.</p><p>Easton, S.S.,(2003). Clarifying the instructor’s role in online distance learning. <em>Communication Education</em>, 52(2), pp.87–105.</p><p>Garrison, D.R. &amp; Kanuka, H.,(2004). Blended learning: Uncovering its transformative potential in higher education. <em>The Internet and Higher Education</em>, 7(2), pp.95–105.</p><p>Graham, C.R.,(2006). Blended learning systems. <em>The handbook of blended learning</em>, pp.3–21.</p><p>IMS Global Learning Consortium Inc., | IMS Global Learning Consortium. Available at: /activity/caliperram.</p><p>International Educational Data Mining Society,(2011). International Educational Data Mining Society. <em>International Educational Data Mining Society</em>. Available at: /home.</p><p>Kirkwood, Adrian and Price, Linda (2014). Technology-enhanced learning and teaching in higher education: what is ‘enhanced’ and how do we know? A critical literature review. Learning, Media and Technology, 39(1) pp. 6–36.</p><p>McDonald, J. &amp; Reushle, S.,(2002). Charting the role of the online teacher in higher education: Winds of change. In <em>Proceedings ASCILITE 2002: 19th Annual Conference of the Australasian Society for Computers in Learning in Tertiary Education</em>. Australasian Society for Computers in Learning in Tertiary Education (ASCILITE), pp. 431–440. Available at: <a href="http://eprints.usq.edu.au/4363">http://eprints.usq.edu.au/4363</a>.</p><p>Munoz, A.,(2014). Machine Learning and Optimization. <em>URL: </em><a href="https://www./"><em>https://www.</em></a><em> cims. nyu. edu/</em>∼<em> munoz/files/ml_optimization. pdf [accessed 2016–03–02][WebCite Cache ID 6fiLfZvnG]</em>. Available at: <a href="https://www.cims.nyu.edu/~munoz/files/ml_optimization.pdf">https://www.cims.nyu.edu/~munoz/files/ml_optimization.pdf</a>.</p><p>Oliver, M. &amp; Trigwell, K.,(2005). Can ‘blended learning’be redeemed? <em>E-learning and Digital Media</em>, 2(1), pp.17–26.</p><p>Prata, D.,(2012). Dialogue Analysis in Collaborative Learning. <em>International Journal of e-Education, e-Business, e-Management and e-Learning</em>. Available at: <a href="http://www.ijeeee.org/show-33-387-1.html">http://www.ijeeee.org/show-33-387-1.html</a>.</p><p>Raschka, S., Julian, D. &amp; Hearty, J.,(2016). <em>Python: Deeper Insights into Machine Learning</em>, Packt Publishing Ltd.</p><p>Romero, C. &amp; Ventura, S.,(2010). Educational Data Mining: A Review of the State of the Art. <em>IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews)</em>, 40(6), pp.601–618.</p><p>Rustici Software, LLC, Overview — Tin Can API. Available at: <a href="http://tincanapi.com/overview/">http://tincanapi.com/overview/</a>.</p><p>Selwyn, Neil. (2011). <em>Education and technology : key issues and debates</em>. London ; New York, NY : Bloomsbury Academic, an imprint of Bloomsbury Publishing Plc</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d77d999ba40" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/potential-issues-of-the-research-with-educational-data-mining-8d77d999ba40">Potential Issues of the Research with Educational Data Mining</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why is educational data mining important in the research?]]></title>
            <link>https://medium.com/data-science/why-is-educational-data-mining-important-in-the-research-e78ed1a17908?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/e78ed1a17908</guid>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[pedagogy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Sat, 19 Jan 2019 20:07:43 GMT</pubDate>
            <atom:updated>2019-01-20T13:24:23.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Mh9rt3DnghyhMWY7" /><figcaption>Photo by <a href="https://unsplash.com/@coleito?utm_source=medium&amp;utm_medium=referral">Cole Keister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why is Educational Data Mining important in the research?</h3><h4>The value of conducting educational data mining for the research in the pedagogical domain</h4><p>In recent years, increasing attention to Artificial Intelligence (AI) encouraged the progress of data mining and analytics in the pedagogical domain. (Baker 2014) Data mining is the process to extract new aspects and patterns from a large data set using the methods at the crossing of machine learning, statistics, and database systems. It is also a field of knowledge discovery in databases (KDD), which is the area of discovering the distinct and potentially beneficial information from large amounts of data set. (Fayyad et al. 1996) The data mining specializing in the educational domain is called as Educational Data Mining (EDM). EDM refers to the techniques, tools, and research designs utilized to obtain information from educational records, typically online logs, and examination results, and then analyses this information to formulate conclusions. EDM is theory-oriented and focuses on the connection to pedagogical theory (Berland et al., 2014). Presently, little empirical evidence exists to support a theoretical framework able to gain wide acceptance in the scientific community (Papamitsiou &amp; Economides, 2014). Given that in the real world there is a great diversity of different learning contexts, they determine the analytical approaches utilized by EDM. Therefore, how EDM can be beneficial in real educational practices, as demonstrated in the research, could be crucial.</p><h4>What is educational data mining?</h4><p>With the establishment of The annual International Conference on Educational Data Mining and the Journal of Educational Data Mining in 2008, EDM emerged as a credible research area (Baker et al., 2010). The International Educational Data Mining Society, which hosts the International Conference on Educational Data Mining and publishes the Journal of Educational Data Mining, offers this definition of EDM:</p><blockquote>“Educational Data Mining is an emerging discipline, concerned with developing methods for exploring the unique and increasingly large-scale data obtained from educational settings, and uses those methods to better understand students and the settings in which they learn” (International Educational Data Mining Society, 2011).</blockquote><p>According to the International Educational Data Mining Society (2011), information in any learning context is often comprised of multiple hierarchical levels, which cannot be determined in advance but must be verified by properties found in the data. Factors, such as time, sequence, and context are also important to consider in the study of educational data. For instance, students’ learning behaviors (students’ participation, login frequency, number of chat messages, and the type of questions submitted to instructor) along with their final grades can be analyzed. (Abdous et al. 2012)</p><p>The online learning platform used for recording the data and analyzing them determine what information about learning behaviors can be recorded. If the database of online learning platform did not have the properties or variables about time, the researchers cannot analyze the timing when students finish the exam. Hence, the information that EDM can deal with relies on the nature of data predetermined by the online learning platform. In fact, learning designs with online learning platform in the real world are diverged and still developing due to the progress of machine learning techniques. Therefore, the updated study with educational data mining could be beneficial in the EDM research area.</p><h4>Learning analytics vs Educational data mining</h4><p>The meaning of EDM is not clear for researchers to employ EDM approaches because EDM is closely tied to the research field of Learning Analytics (LA).</p><blockquote>Learning analytics is the measurement, collection, analysis, and reporting of data about learners and their contexts, for purposes of understanding and optimizing learning and the environments in which it occurs.(International Conference on Learning Analytics and Knowledge et al. 2016)</blockquote><p>LA is a fairly new field that is gaining increasing popularity. Generally, LA is on the two premises: that LA deals with pre-existing data in a form that a computer can process, and that its techniques can be acceptable to handle large sets of data that would not handle manually. (Ferguson 2012) LA and EDM research communities hold different perspectives on how educational data should be obtained and analyzed (Berland et al., 2014). Researchers in LA research employ more human-led methods of discovery, and focuses more on holistic systems and understanding constructs, and then seeks ways to inform and empower instructors and learners; for example, informing an instructor about ways a specific student is struggling, so the instructor can contact the learner and intervene in a positive manner to facilitate that student’s learning (Berland et al., 2014).</p><p>On the other hand, EDM researchers place their focus more on utilizing automated methods for discovery within educational data, modelling specific constructs and the relationships between them, applications in automated adaptation, such as supporting a learner’s experience through having an educational software identify and automatically changing it to personalize the learner’s experience (Berland et al., 2014; Arroyo et al., 2007; Baker et al., 2006; Corbett &amp; Anderson, 1995).</p><h4>Objectives and stakeholders of using EDM</h4><p>Although EDM and LA have slightly different characteristics, the influential factors that change the quantity of data are the same due to relying on the secondary data that is generated by online learning technologies. The advent of new technologies used and public data repositories in pedagogical contexts increase the quantity of data and diverge the quality of data. For instance, mobile devices can enable the researchers to capture the interaction of learners in more detailed. (Berland et al. 2014) Research intuitions open public archives like the Pittsburgh Science of Learning Center DataShop, which include a huge amount of quantities of data, and are accessible to any scientific researchers. (Koedinger et al. 2010) Thus, the characteristics of EDM and LA techniques can also be easily influenced by the new technologies used in the educational context. (Marie Bienkowski et al., 2012) Although it seems to be meaningless to strictly distinguish the meanings of EDM and LA, In terms of the taxonomy of objectives and stakeholders of using EDM, Baker, and Yacef (2009)’s and Romero and Ventura (2010)’ s described like the below. Baker and Yacef (2009, pp.5–8) summarized the following the four goals of EDM:</p><ol><li>Predicting learner’s behaviors by improving student models. Modeling is characterizing and categorizing a student’s characteristics or states that make up the student’s knowledge, motivation, meta-cognition, and attitudes.</li><li>Discovering or improving knowledge domain structure models. For example, there are concept models of the materials being taught and models that explain the interrelationships of knowledge in a domain (Barnes, 2005).</li><li>Studying the most effective pedagogical support for student learning that can be achieved through learning systems.</li><li>Establishing empirical evidence to support or articulate pedagogical theories, frameworks, and educational phenomena to determine core influential components of learning to enable the designing of better learning systems.</li></ol><p>EDM goals are achieved by adapting psychometrics, employing statistical techniques, and mining log data stored in offline educational settings, including face-to-face contacts, studying the psychology of how humans learn, participating in online learning obtained from E-learning and Learning Management System (LMS), and using Intelligent Tutoring System (ITS) (Romero &amp; Ventura 2010).</p><p>In addition, information used in EDM is oriented towards several stakeholders (Liñán &amp; Pérez 2015). Different groups of stakeholders review educational information from various perspectives, obeying their own mission, vision, and objectives for using EDM (Hanna, 2004). Romero and Ventura (2010, p. 2) categorize the four stakeholders according to their objectives for using EDM:</p><ol><li>Learners: Optimizing individual learning styles, learning materials, and learning experiences, or recommending them.</li><li>Educators: Analysing students’ learning behaviors, gaining the most supportive instruction, and predicting student learning to increase teaching effectiveness.</li><li>Researchers/Developers: Evaluating learning materials, improving learning systems, and assessing data mining techniques for effectiveness.</li><li>Organizations: Improving decision-making processes in higher learning institutions in terms of efficiency and cost, such as admission processes and financial resources distribution.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K3evZAhH9Z2RBuQ8aur6xQ.png" /><figcaption>Figure 1 created by Jesse Tetsuya</figcaption></figure><h4>Consideration</h4><p>There are a few publications that mentioned the practical and empirical studies examining the above taxonomies although they were theoretically constructed. For instance, according to a systemic review of LA and EDM in practices by Papamitsiou and Economides (2014), only 209 mature pieces of the research work, which were identified before excluding the theoretical studies, limited the key empirical studies to 40, including all objectives of using EDM.</p><p>Furthermore, the empirical study about EDM has the needs in pedagogical industry, especially higher education. This is because higher educational institutions have a large set of data enough to conduct the analysis. (Kollias et al., 2005) although educators are not aware of how to conduct EDM in their own practice. They might also not know how to use the latest technology and why it is important due to a lack of technological training. (Selwyn, 2011) The complicated and new machine learning techniques, which are the main analysis techniques of EDM, might puzzle educators.</p><h4>References</h4><p>Abdous, M., Wu, H. &amp; Yen, C.-J.,(2012). Using data mining for predicting relationships between online question theme and final grade. <em>Journal of Educational Technology &amp; Society</em>, 15(3), p.77.</p><p>Baker, R. &amp; de Carvalho, A.,(2008). Labeling student behavior faster and more precisely with text replays. In <em>Educational Data Mining 2008</em>. Available at: <a href="http://www.educationaldatamining.org/conferences/index.php/EDM/2008/paper/download/759/725">http://www.educationaldatamining.org/conferences/index.php/EDM/2008/paper/download/759/725</a> [Accessed August 30, 2017].</p><p>Baker, R. &amp; others,(2010). Data mining for education. <em>International encyclopedia of education</em>, 7(3), pp.112–118.</p><p>Baker, R.S.,(2014). Educational data mining: An advance for intelligent systems in education. <em>IEEE Intelligent systems</em>, 29(3), pp.78–82.</p><p>Baker, R.S.J. d &amp; Yacef, K.,(2009). The State of Educational Data Mining in 2009: A Review and Future Visions. <em>JEDM — Journal of Educational Data Mining</em>, 1(1), pp.3–17.</p><p>Berland, M., Ryan|Blikstein,Paulo,(2014). Educational Data Mining and Learning Analytics: Applications to Constructionist Research. <em>Technology, Knowledge and Learning</em>, 19(1–2), pp.205–220.</p><p>Fayyad, U., Piatetsky-Shapiro, G. &amp; Smyth, P.,(1996). From data mining to knowledge discovery in databases. <em>AI magazine</em>, 17(3), p.37.</p><p>Ferguson, R.,(2012). Learning analytics: drivers, developments and challenges. <em>International Journal of Technology Enhanced Learning</em>, 4(5/6), p.304.</p><p>Feyyad, U.M.,(1996). Data mining and knowledge discovery: making sense out of data. <em>IEEE Expert</em>, 11(5), pp.20–25.</p><p>International Educational Data Mining Society,(2011). International Educational Data Mining Society. <em>International Educational Data Mining Society</em>. Available at: /home [Accessed June 26, 2017].</p><p>Hanna, M.,(2004). Data mining in the e‐learning domain. <em>Campus-Wide Information Systems</em>, 21(1), pp.29–34.</p><p>Koedinger, K.R., D’Mello, S., McLaughlin, E.A., Pardos, Z.A. &amp; Rosé, C.P.,(2015b). Data mining and education. <em>Wiley Interdisciplinary Reviews: Cognitive Science</em>, 6(4), pp.333–353.</p><p>Liñán, L.C. &amp; Pérez, Á.A.J.,(2015). Educational Data Mining and Learning Analytics: differences, similarities, and time evolution. <em>RUSC. Universities and Knowledge Society Journal</em>, 12(3), pp.98–112.</p><p>Papamitsiou, Z. &amp; Economides, A.A.,(2014). Learning analytics and educational data mining in practice: A systematic literature review of empirical evidence. <em>Journal of Educational Technology &amp; Society</em>, 17(4), p.49.</p><p>Romero, C. &amp; Ventura, S.,(2010). Educational Data Mining: A Review of the State of the Art. <em>IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews)</em>, 40(6), pp.601–618.</p><p>Selwyn, Neil. (2011). <em>Education and technology : key issues and debates</em>. London ; New York, NY : Bloomsbury Academic, an imprint of Bloomsbury Publishing Plc</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e78ed1a17908" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/why-is-educational-data-mining-important-in-the-research-e78ed1a17908">Why is educational data mining important in the research?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Translation Cycles in AI/ML projects]]></title>
            <link>https://medium.com/data-science/data-translation-cycles-in-ai-ml-projects-2ff4445802cd?source=rss-15c8d0463752------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ff4445802cd</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Tetsuya Hirata]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 14:43:20 GMT</pubDate>
            <atom:updated>2019-01-14T14:43:20.799Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3kpUzsDETDo2K-nx" /><figcaption>Photo by <a href="https://unsplash.com/@ev?utm_source=medium&amp;utm_medium=referral">ev</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>A transformation from potentially valuable data into beneficial information in AI/ML projects</h4><p>More engineers are faced with an increase in the number of projects relating to artificial intelligence(AI) and machine learning (ML). Many AI/ML projects seem to be algorithm oriented but each process to develop AI/ML products are centered on any procedure involving with data. Engineers in AI/ML projects need to understand more about how data can be created and used in AI/ML projects. This article might help junior/middle engineers or data scientists understand the data itself prepared for AI/ML products.</p><h3><strong>What is Data?</strong></h3><p>The definition is cited from the online dictionary because the update cycle is faster than paper materials. Data is based on information so the definition of information is also described below.</p><blockquote>Information is stimuli that have meaning in some context for its receiver. When information is entered into and stored in a computer, it is generally referred to as <a href="https://searchdatamanagement.techtarget.com/definition/data">data</a>. After processing (such as formatting and printing), output data can again be perceived as information.</blockquote><p>The definition of data itself is here.</p><blockquote>In computing, data is <a href="https://searchsqlserver.techtarget.com/definition/information">information</a> that has been translated into a form that is efficient for movement or processing. Relative to today’s <a href="https://searchwindowsserver.techtarget.com/definition/computer">computers</a> and transmission media, data is information converted into <a href="https://whatis.techtarget.com/definition/binary">binary</a> <a href="https://whatis.techtarget.com/definition/digital">digital</a> form. It is acceptable for data to be used as a singular subject or a plural subject. <a href="https://searchdatamanagement.techtarget.com/definition/raw-data">Raw data</a> is a term used to describe data in its most basic digital format.</blockquote><p>The meanings of both definitions can be drawn into a picture as described by figure 1. <strong>A receiver, which is a human, perceive information under the context surrounding us, measure information, and put it into qualitative/quantitative information in order to easily recognize the meaning of the information. The received information that can easily be recognized by the computer is processed, new information with new insight is created, and passed into a receiver.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BOA_l6wMqsEBoi_IlymCnw.png" /><figcaption>Figure 1 created by Jesse Tetsuya</figcaption></figure><h3>Receiver’s translation measurements</h3><p>The types of measurement to translate information into data could be the gray color boxes in the below figure 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FoO_mkTywAoRZVx5UToRug.png" /><figcaption>Figure 2 created by Jesse Tetsuya</figcaption></figure><p><strong>Categorical data</strong> is qualitative data and consists of nominal data and ordinal data. In order to pass such data to code and use data for analyses, categorical data has to be transformed into the numbers such as <strong>binary data or arbitrary numbering labels.</strong></p><p>On the other hand, <strong>numerical data</strong> is quantitative data and composed of discrete and/or continuous numbers.<strong> Discrete numbers </strong>include countable numbers such as the number of students and it can be equal to the counted output of nominal or ordinal data.<strong> Continuous numbers</strong> can be divided into two types: <strong>interval scale and ratio scale</strong>. The differences between them are <strong>whether the data has “true zero” and the numbers with no minus or not.</strong> Strictly speaking, the scale of the continuous variable is not decided based on whether the number has a minus or not, but the way to measure it is easily understandable.</p><h3>Three ways to describe data</h3><p>Three ways to describe data are <strong>1) Data Structure, 2) Data Type, and 3) Data Format (=File Format). </strong>This section is going to simply summarize them based on commonly used python syntax. <strong>Information on infrequently used python syntax is excluded.</strong></p><h4>1. Data Structure</h4><ul><li>List/Dictionary/Sequences/Tuples/Set (examples are below)</li></ul><p><strong>List and Dictionaries</strong></p><pre><strong>&gt;&gt;&gt; </strong>tel = {&#39;jack&#39;: 4098, &#39;sape&#39;: 4139}<br><strong>&gt;&gt;&gt; </strong>tel[&#39;guido&#39;] = 4127<br><strong>&gt;&gt;&gt; </strong>tel<br>{&#39;jack&#39;: 4098, &#39;sape&#39;: 4139, &#39;guido&#39;: 4127}<br><strong>&gt;&gt;&gt; </strong>tel[&#39;jack&#39;]<br>4098<br><strong>&gt;&gt;&gt; del</strong> tel[&#39;sape&#39;]<br><strong>&gt;&gt;&gt; </strong>tel[&#39;irv&#39;] = 4127<br><strong>&gt;&gt;&gt; </strong>tel<br>{&#39;jack&#39;: 4098, &#39;guido&#39;: 4127, &#39;irv&#39;: 4127}<br><strong>&gt;&gt;&gt; </strong>list(tel)<br>[&#39;jack&#39;, &#39;guido&#39;, &#39;irv&#39;</pre><p><strong>Sequences and Tuples</strong></p><pre><strong>Sequences<br>&gt;&gt;&gt; </strong>t = 12345, 54321, &#39;hello!&#39;<br><strong>&gt;&gt;&gt; </strong>t[0]<br>12345</pre><pre><strong>Tuples<br>&gt;&gt;&gt; </strong>t<br>(12345, 54321, &#39;hello!&#39;)<br><strong>&gt;&gt;&gt; </strong><em># Tuples may be nested:</em><br><strong>... </strong>u = t, (1, 2, 3, 4, 5)<br><strong>&gt;&gt;&gt; </strong>u<br>((12345, 54321, &#39;hello!&#39;), (1, 2, 3, 4, 5))<br><strong>&gt;&gt;&gt; </strong><em># Tuples are immutable:</em><br><strong>... </strong>t[0] = 88888<br>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>TypeError: &#39;tuple&#39; object does not support item assignment<br><strong>&gt;&gt;&gt; </strong><em># but they can contain mutable objects:</em><br><strong>... </strong>v = ([1, 2, 3], [3, 2, 1])<br><strong>&gt;&gt;&gt; </strong>v<br>([1, 2, 3], [3, 2, 1])</pre><p><strong>Set</strong></p><pre><strong>&gt;&gt;&gt; </strong>basket = {&#39;apple&#39;, &#39;orange&#39;, &#39;apple&#39;, &#39;pear&#39;, &#39;orange&#39;, &#39;banana&#39;}<br><strong>&gt;&gt;&gt; </strong>print(basket)                      <em># show that duplicates have been removed</em><br>{&#39;orange&#39;, &#39;banana&#39;, &#39;pear&#39;, &#39;apple&#39;}<br><strong>&gt;&gt;&gt; </strong>&#39;orange&#39; <strong>in</strong> basket                 <em># fast membership testing</em><br>True<br><strong>&gt;&gt;&gt; </strong>&#39;crabgrass&#39; <strong>in</strong> basket<br>False</pre><h4><strong>2. Data Type</strong></h4><ul><li>String/Integer/Float/Boolean</li></ul><h4>3. Data Format (=File Format)</h4><ul><li>Datastore/RDBS/CSV/JSON/Excel/HTML/Text/Image</li></ul><h3>Processes to transform data into valuable information</h3><p>In the case of AI/ML projects, the workflow can be described as shown in figure 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qkx3xC8usMuOjpFO5jvjMA.png" /><figcaption>Figure 3 created by Jesse Tetsuya</figcaption></figure><p>First, the input data is collected and formatted based on <strong>the data translation measurements</strong> mentioned in the above section. The input data can be <strong>RDBS, CSV, JSON, Excel, HTML, Text, Image, etc. as mentioned in the previous section.</strong></p><p>After that, these input data is imported into machine learning API. The machine learning API is usually composed of the three procedures of code related to<strong> the preparation code for accessing data, pre-processing data, and machine learning algorithms. The data structure and data type need to be differently manipulated and processed depending on the algorithms before the data is passed into machine learning models.</strong></p><p>Finally, the input data, which do not represent valuable meaning clearly for humans, <strong>is transformed into valuable information by going through the machine learning APIs shown in figure 3.</strong> Then, it is received as useful information by humans.</p><h3>References</h3><ul><li><a href="https://searchsqlserver.techtarget.com/definition/information">What is information? - Definition from WhatIs.com</a></li><li><a href="https://searchdatamanagement.techtarget.com/definition/data">What is data? - Definition from WhatIs.com</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ff4445802cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/data-translation-cycles-in-ai-ml-projects-2ff4445802cd">Data Translation Cycles in AI/ML projects</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>