<?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 Edi Sugiarto on Medium]]></title>
        <description><![CDATA[Stories by Edi Sugiarto on Medium]]></description>
        <link>https://medium.com/@edi.sugi1996?source=rss-faaade78bf4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*F_nVfJFKXsEazBf9-E5rMg.png</url>
            <title>Stories by Edi Sugiarto on Medium</title>
            <link>https://medium.com/@edi.sugi1996?source=rss-faaade78bf4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 07:40:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@edi.sugi1996/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[Smoke Test: 5-min Python Review for Data Scientist]]></title>
            <link>https://medium.com/@edi.sugi1996/smoke-test-python-review-for-data-scientist-9a96b7f0fc7f?source=rss-faaade78bf4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a96b7f0fc7f</guid>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Edi Sugiarto]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 16:35:02 GMT</pubDate>
            <atom:updated>2024-05-02T11:04:37.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*7hZvL993Gujx5MUB8vACvA.png" /><figcaption>Image: hotpot.ai</figcaption></figure><p>Jarang kita jumpai review sekaligus overview, skillset python apa yang dibutuhkan oleh Data Scientist. Artikel ini ditujukan sebagai referensi bagi aspiring data scientist untuk mengetahui topik-topik mana yang perlu dipelajari lebih lanjut. Topik yang akan dicover:</p><ul><li>Tipe-tipe data (built-in) pada Python</li><li>Arithmetic, comparison, and logical operators</li><li>Variables dan konvensi penamaan</li><li>Conditional statements (if, else)</li><li>Iterasi pada Python (for, while, enumerate)</li><li>Loop control (continue, break, pass, try except)</li><li>Indexing, slicing, unpacking</li><li>List vs dictionary</li><li>List and dictionary comprehension</li><li>Memoization</li><li>Set operation</li><li>Function, map function, lambda function</li></ul><h3>Tipe-tipe (built-in) data pada Python</h3><p>Berikut adalah tipe-tipe data pada Python</p><h4>Tipe Numeric: <strong>int, float, complex</strong></h4><p>Int→ integer, bilangan bulat<br>Float→ bilangan desimal<br>Complex→ bilangan kompleks</p><h4>Tipe Text:<strong> str (string)</strong></h4><p>String merupakan tipe data text pada Python. Data dapat berupa text apapun</p><h4>Tipe Sequence: <strong>list, tuple</strong></h4><p>List dan tuple merupakan kumpulan elemen berurutan yang bisa diakses dengan angka urutan indeks. Perbedaan:<br>list→ mutable, more memory<br>tuple→ immutable (tidak dapat diubah), less memory</p><h4>Tipe Mapping: <strong>dict</strong></h4><p>Dict (dictionary) adalah tipe data pasangan key:value. Secara sederhana, dictionary adalah list on steroid. Apabila kita mengakses list dengan angka indeks, kita dapat mengakses nilai dictionary dengan memanggil ‘key’nya. Hal ini memungkinkan kita untuk menamai indeks dengan hal apapun yang kita inginkan.</p><h4>Tipe set: <strong>set, frozenset</strong></h4><p>Set dan frozenset adalah kumpulan elemen tak berurutan tanpa duplikat. Perbedaannya adalah frozenset bersifat immutable</p><h4>Tipe boolean: <strong>bool</strong></h4><p>Bool adalah nilai kebenaran yang dinyatakan dengan True / False</p><h3>Arithmetic, Comparison, and Logical Operators</h3><pre>&quot;&quot;&quot;<br>Arithmetic Operators<br>+  addition<br>-  substraction<br>*  multiplication<br>/  division<br>// floor division<br>%  modulus<br>** power<br>=  assignment operator<br><br>Comparison Operators<br>&gt;  greater than<br>&lt;  less than<br>== equal to<br>!= not equal to<br>&gt;= greater than or equal<br>&lt;= less than or equal<br><br>Logical Operators<br>and  True if both operands are True<br>or   True if either operands are True<br>not  True if operand is False<br>&quot;&quot;&quot;<br></pre><h3>Variables dan konvensi penamaan</h3><p>Variables merupakan wadah dan label untuk menyimpan data. Variabel tidak boleh:<br>- Berawalan angka<br>- Memakai spasi<br>- Berisikan karakter spesial (*, &amp;, ^, dll.)<br>- Menggunakan keywords bawaan Python seperti <strong>del </strong>atau <strong>list</strong></p><p>Namun boleh:<br>- Berisikan huruf<br>- Berisikan angka<br>- Menggunakan underscores<br>- Berawalan huruf atau underscores</p><h3>Conditional statements (if, elif, else)</h3><pre>a = 200<br>if a &gt; 300:<br>    print(&#39;a lebih besar dari 300&#39;)<br>elif a &gt;= 200:<br>    print(&#39;a berkisar antara 200-300&#39;)<br>else:<br>    print(&#39;a kurang dari 200&#39;)<br># &#39;a berkisar antara 200-300&#39;</pre><h3>Iterasi pada Python (for, while, range, enumerate)</h3><ul><li>For loop melakukan iterasi elemen per elemen</li><li>While loop melakukan iterasi hingga kondisi while menjadi False</li><li>Range merupakan fungsi generator dengan syntax: (start, end, step)</li><li>Enumerate menambahkan indeks pada elemen loop</li></ul><pre># Looping dengan For, Range<br>for x in range(5):<br>   print(x)<br>   # printing 0 --&gt; 4<br><br># Looping dengan For, Enumerate<br>a = [&#39;h&#39;, &#39;e&#39;, &#39;l&#39;, &#39;l&#39;, &#39;o&#39;]<br>for i, x in enumerate(a):<br>    print(i, x)<br>    # printing (0, h) (1, e) (2, l) (3, l) (4, o)<br><br># Looping dengan while:<br>a = &#39;a&#39;<br>while a!= &#39;Q&#39;:<br>    a = input(&#39;Input Q to quit&#39;)<br>    # akan end saat user menginput Q</pre><h3>Loop control (continue, break, pass, try except)</h3><ul><li>continue → skip code ke iterasi selanjutnya</li><li>break → stop looping immediately</li><li>pass → tidak melakukan apapun (digunakan sebagai filler pada saat testing code)</li><li>try, except → resolving dan menangkap error pada code</li></ul><pre>a_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]<br>sums = 0<br>for number in a_list:<br>    try: # try to do below<br>        if number % 2 == 0:<br>            continue # skip code below if number can be divided by 2<br>        sums += number # adds number to sum<br>        if sums &gt;= 10:<br>            break # ends iteration if sums total more than 10<br>        if sums &lt;= 10:<br>            pass # placeholder (need to be coded)<br>    except: # if error at trying, then do this<br>        print(&#39;value error&#39;)</pre><h3>Accessing index, slicing, unpacking</h3><pre>a_list = [&#39;h&#39;, &#39;e&#39;, &#39;l&#39;, &#39;l&#39;, &#39;o&#39;]<br>a_dict = {<br>    &#39;nama&#39; : &#39;John Doe&#39;,<br>    &#39;umur&#39; : 29<br>}<br><br># accessing list index and dict key<br>print(a_list[1]) # &#39;e&#39;<br>print(a_dict[&#39;nama&#39;]) # &#39;John Doe&#39; <br><br># slicing list<br>print(a_list[:3]) # [&#39;h&#39;, &#39;e&#39;, &#39;l&#39;]<br>print(a_list[::-1]) # reverse stepping<br>print(a_list[::2]) # stepping 2<br><br># unpacking<br>nama, umur = [&#39;John&#39;, 29]<br>print(nama, umur) # John 29<br><br># unpacking method<br>reversed_a, set_a = a_list[::-1], set(a_list)<br>print(reversed_a) # [&#39;o&#39;, &#39;l&#39;, &#39;l&#39;, &#39;e&#39;, &#39;h&#39;]<br>print(set_a) # tanpa urutan &#39;h&#39;, &#39;e&#39;, &#39;l&#39;, &#39;o&#39;</pre><h3>List and dictionary comprehension</h3><pre># [&#39;todo&#39; if &#39;cond&#39; else &#39;alts&#39; for i in &#39;iterable&#39; if &#39;filter&#39;]<br>a_range = range(10)<br><br># double x jika tidak bisa dibagi 2, <br># selainnya ambil x untuk rentang a_range, lakukan jika x &lt; 7<br>my_list = [x*2 if (x%2 != 0) else x for x in a_range if x&lt;7]<br>print(my_list) # [0, 2, 2, 6, 4, 10, 6]<br><br>a_list = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;]<br>b_list = [10, 20, 30, 40, 50]<br>my_dict = {k:v for (k,v) in zip(a_list, b_list) if (k!=&#39;a&#39; and v!=40)}<br>print(my_dict) # {&#39;b&#39;: 20, &#39;c&#39;: 30, &#39;e&#39;: 50}</pre><h3>Hash Map</h3><p>Hash map adalah sebuah teknik untuk menyimpan hasil perhitungan fungsi yang sudah dilakukan sebelumnya. Dengan cara ini, kita akan memiliki catatan atas apa yang telah kita lakukan. Dalam python, teknik ini seringkali dilakukan dengan dictionary.</p><pre># contoh irisan 3 list unique values<br>a_list = [&#39;h&#39;, &#39;a&#39;, &#39;l&#39;, &#39;o&#39;]<br>b_list = [&#39;b&#39;, &#39;o&#39;, &#39;l&#39;, &#39;a&#39;]<br>c_list = [&#39;c&#39;, &#39;a&#39;, &#39;m&#39;, &#39;e&#39;, &#39;l&#39;]<br>memo = dict()<br><br>for x in a_list:<br>    if x not in memo:<br>        memo[x] = 1<br>for y in b_list:<br>    if y in memo:<br>        memo[y] += 1<br>for z in c_list:<br>    if z in memo:<br>        memo[z] += 1<br><br>retrieve = []<br>for key, value in memo.items():<br>    if value == 3:<br>        retrieve.append(key)<br>print(retrieve) # [&#39;a&#39;, &#39;l&#39;]</pre><h3>Set operation</h3><p>Set merupakan tipe data <strong>unordered </strong>dengan <strong>unique values</strong>. Beberapa operasi set yang useful adalah sebagai berikut</p><pre>set1 = {1, 2, 3, 4, 5}<br>set2 = {4, 5, 6, 7}<br><br># returns all unique values<br>set1.union(set2)<br><br># return shared values<br>set1.intersection(set2)<br><br># return values in set 1, not appeared in set 2<br>set1.difference(set2)<br><br># return values not shared by both<br>set1.symmetric_difference(set2)</pre><h3>Function, map function, lambda function</h3><pre>a_range = range(6)<br><br>def squared(x):<br>    return x**2<br><br>a_squared = list(map(squared, a_range))<br>print(a_squared)<br># [0, 1, 4, 9, 16, 25]<br><br>a_squared_dict = {k:v for (k,v) in zip(a_range, map(squared, a_range))}<br>print(a_squared_dict)<br># {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}<br><br>a_cubed = list(map(lambda x: x**3, a_range))<br>print(a_cubed)<br># [0, 1, 8, 27, 64, 125]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a96b7f0fc7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Overview]]></title>
            <link>https://medium.com/@edi.sugi1996/data-science-overvie-6d4752830847?source=rss-faaade78bf4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d4752830847</guid>
            <dc:creator><![CDATA[Edi Sugiarto]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 15:48:24 GMT</pubDate>
            <atom:updated>2024-02-27T09:03:55.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-3QR1vFyU22F4bsy-9Hsw.png" /><figcaption>Generated with hotpot.ai</figcaption></figure><h3>What is a Data Science?</h3><p>Data science is the practice of using large amounts of data to find patterns and insights. This data can be structured or unstructured. It involves various techniques from statistics, mathematics, machine learning, and domain knowledge to solve real-world problems.</p><h4>A typical day for a data scientist might involve:</h4><ul><li>Extracting data from various sources,</li><li>Cleaning and preparing data for analysis,</li><li>Exploring and visualizing data to gain insight, as well as</li><li>Developing and evaluating machine learning models for predictive analysis</li></ul><h3><strong>Scope of a Data Scientist</strong></h3><blockquote><em>Data Scientist is a versatile data generalist. They encompass various skillset for data processing, enabling them to pursue more specialized career path in the future.</em></blockquote><ul><li><strong>Data Analytics</strong></li></ul><p>Data scientists are involved in the entire process of collecting, cleaning, and analyzing data. This includes analyzing specific questions using data and gaining insight</p><ul><li><strong>Big Data Processing</strong></li></ul><p>Big data is the raw material, a large and complex dataset that is difficult to process with traditional methods. A proper data scientist understand how to handle big data with SQL or other methods</p><ul><li><strong>Statistics</strong></li></ul><p>Statistics is a tool that data scientists use to analyze data. It provides methods for summarizing and interpreting data.</p><ul><li><strong>Machine Learning</strong></li></ul><p>Machine learning is a technique for computers to learn without being explicitly programmed. Data scientists use machine learning to build models that can make predictions or classifications.</p><ul><li><strong>Business Understanding</strong></li></ul><p>Data science is used to make better decisions about marketing, finance, and operations. A proper data scientists will need to understand business as a domain knowledge to create better insight.</p><h3><strong>Data Science Role in Industry</strong></h3><p><em>Data science is used in many different industries. Here are a few examples:</em></p><ul><li><strong>Healthcare</strong></li></ul><p>Data science can be used to develop new treatments, to improve patient care, and to reduce costs. For example, data scientists can analyze medical records to identify patients who are at risk of developing certain diseases.</p><ul><li><strong>Finance</strong></li></ul><p>Data science can be used to detect fraud and to assess risk. For example, data scientists can analyze financial transactions to identify patterns that are indicative of fraud.</p><ul><li><strong>Marketing</strong></li></ul><p>Data science can be used to target advertising and to measure the effectiveness of marketing campaigns. For example, data scientists can analyze customer data to identify which customers are most likely to respond to a particular marketing campaign.</p><ul><li><strong>Government</strong></li></ul><p>Data science can used to improve public policy, to combat crime, and to provide better services to citizens. For example, data scientists can analyze crime data to identify patterns that can help to prevent crime.</p><h3><strong>Why Pursuing Data Science?</strong></h3><blockquote><em>Data science is an emerging field with a versatility to pursue further career path.</em></blockquote><ul><li><strong>Intellectually Challenging</strong></li></ul><p>Data science involves solving complex problems using analytical and creative thinking, which appeals to individuals who enjoy intellectual challenges. It is also a constantly changing field as new technologies and techniques are developed. This makes it an exciting field to work in.</p><ul><li><strong>Impactful Work</strong></li></ul><p>Data science projects can have a significant impact on various aspects of society, from healthcare and finance to scientific research and environmental protection. Impactful work also means a growing demand as well as a stable career prospects</p><ul><li><strong>Versatility and Diversity</strong></li></ul><p>Data science is a field of well-rounded skillset which can be applied to various domains and industries, offering a diverse and exciting career path.</p><p><em>Reference: </em><a href="https://www.heavy.ai/learn/data-science"><em>https://www.heavy.ai/learn/data-science</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d4752830847" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Basic Statistics: Variables and Sampling]]></title>
            <link>https://medium.com/@edi.sugi1996/understanding-basic-statistics-a-beginners-guide-d9e17ed0cf5d?source=rss-faaade78bf4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9e17ed0cf5d</guid>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Edi Sugiarto]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 12:48:39 GMT</pubDate>
            <atom:updated>2023-11-11T14:07:06.443Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMWzwnDLfQFOUXuooVqofw.png" /></figure><h3>Introduction</h3><p>Statistics plays a crucial role in decision-making across various fields. This article aims to provide a simple yet comprehensive overview of basic statistics, covering definitions, types of variables, populations and samples, and types of probability sampling.</p><h3>What is Statistics?</h3><p>Statistics is the science of collecting, analyzing, interpreting, presenting, and organizing data. In simpler terms, it helps us make sense of information by using mathematical methods.</p><h3>Types of Variables</h3><p>In statistics, variables are characteristics or attributes that can take on different values. Variables are essential for collecting and analyzing data. There are two main types of variables: quantitative and qualitative.</p><h4>Quantitative Variables:</h4><ul><li>Discrete Variables: These variables can only take specific, distinct values and often represent counts. Examples include the number of students in a class, the number of cars in a parking lot, or the number of books on a shelf.</li><li>Continuous Variables: These variables can take any numeric value within a given range. They can have an infinite number of possible values, and there are no gaps between values. Examples include age, height, weight, and income.</li></ul><h4>Qualitative Variables (Categorical Variables)</h4><ul><li>Nominal Variables: These variables represent categories without any inherent order or ranking. Examples include gender, ethnicity, or types of fruits. Nominal variables are used for labeling and classification.</li><li>Ordinal Variables: These variables have categories with a clear order or ranking, but the differences between the categories are not precisely measurable. Examples include education levels (e.g., high school, bachelor’s, master’s) or customer satisfaction ratings (e.g., low, medium, high).</li></ul><p>Below is a table about cars, served as an illustration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNAoJA98LGfVkUKGgX4lYg.jpeg" /></figure><h3>Population and Sample</h3><h4>Population:</h4><p>A population refers to the entire group of individuals or instances about whom the researcher is interested in drawing conclusions. It includes all possible subjects that meet a certain set of specifications or criteria.</p><ul><li>Example: If you’re studying the average height of all adults in a country, the population would be all the adults in that country.</li></ul><h4>Sample:</h4><p>A sample is a subset of the population. It is a smaller group selected from the larger population for the purpose of conducting a study or analysis. The goal is for the sample to be representative of the population from which it is drawn.</p><ul><li>Example: If you cannot measure the height of every adult in a country, you might select a sample of 500 adults from various regions to represent the entire population.</li></ul><h3>Types of Probability Sampling</h3><h4>1. Simple Random Sampling:</h4><ul><li>Definition: In simple random sampling, each individual or element in the population has an equal chance of being selected, and each combination of elements has an equal chance of forming the sample.</li><li>Example: To select a simple random sample of students from a school, you could assign each student a number and use a random number generator to pick a specified number of students.</li></ul><h4>2. Systematic Sampling:</h4><ul><li>Definition: In systematic sampling, a starting point is randomly selected, and then every certain interval, individual is chosen from the list. The value of interval is determined by dividing the population size by the desired sample size.</li><li>Example: If you have a list of 100 employees and want a sample of 20, you might select every 5th person from the list (100/20 = 5).</li></ul><h4>3. Stratified Sampling:</h4><ul><li>Definition: In stratified sampling, the population is divided into subgroups or strata based on certain characteristics. Samples are then randomly selected from each stratum in proportion to their representation in the overall population.</li><li>Example: If studying students’ performance, you might divide them into strata based on grades (e.g., high, medium, low) and then randomly select samples from each stratum.</li></ul><h4>4. Cluster Sampling:</h4><ul><li>Definition: Cluster sampling involves dividing the population into clusters or groups, randomly selecting some clusters, and then including all members within those selected clusters in the sample.</li><li>Example: If studying a large city’s residents, you might randomly select several neighborhoods (clusters) and survey all individuals within those neighborhoods.</li></ul><figure><img alt="Types of samping, image= https://www.scribbr.com/methodology/sampling-methods/" src="https://cdn-images-1.medium.com/max/701/1*05-g0fZIa_DssUiGMx-IHw.png" /><figcaption>Illustration of sampling, image: <a href="https://www.scribbr.com/methodology/sampling-methods/">Scribbr</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9e17ed0cf5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>