<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://an-minyoung.github.io/feed.xml" rel="self" type="application/atom+xml"/><link href="https://an-minyoung.github.io/" rel="alternate" type="text/html" hreflang="en"/><updated>2026-07-31T21:41:05+00:00</updated><id>https://an-minyoung.github.io/feed.xml</id><title type="html">Minyoung An</title><subtitle>Minyoung An | Postdoctoral Fellow, Walter H. Shorenstein Asia-Pacific Research Center, Stanford University </subtitle><entry><title type="html">Google Gemini updates: Flash 1.5, Gemma 2 and Project Astra</title><link href="https://an-minyoung.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra/" rel="alternate" type="text/html" title="Google Gemini updates: Flash 1.5, Gemma 2 and Project Astra"/><published>2024-05-14T00:00:00+00:00</published><updated>2024-05-14T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra/"><![CDATA[<p>Gemini breaks new ground with a faster model, longer context, AI agents and moreLearn more:Learn more:Learn more:Models &amp; ResearchProductsInfrastructure &amp; cloudTechnology Learn more: ProductsPlatformsDevices Learn more: Outreach &amp; initiativesLeadershipInside Google Learn more: May 14, 2024 We’re introducing a series of updates across the Gemini family of models, including the new 1.5 Flash, our lightweight model for speed and efficiency, and Project Astra, our vision for the future of AI assistants. Demis HassabisCEO of Google DeepMind, on behalf of the Gemini teamIn December, we launched our first natively multimodal model Gemini 1.0 in three sizes: Ultra, Pro and Nano. Just a few months later we released 1.5 Pro, with enhanced performance and a breakthrough long context window of 1 million tokens.Developers and enterprise customers have been putting 1.5 Pro to use in incredible ways and finding its long context window, multimodal reasoning capabilities and impressive overall performance incredibly useful.We know from user feedback that some applications need lower latency and a lower cost to serve. This inspired us to keep innovating, so today, we’re introducing Gemini 1.5 Flash: a model that’s lighter-weight than 1.5 Pro, and designed to be fast and efficient to serve at scale.Both 1.5 Pro and 1.5 Flash are available in public preview with a 1 million token context window in Google AI Studio and Vertex AI. And now, 1.5 Pro is also available with a 2 million token context window via waitlist to developers using the API and to Google Cloud customers.We’re also introducing updates across the Gemini family of models, announcing our next generation of open models, Gemma 2, and sharing progress on the future of AI assistants, with Project Astra.Context lengths of leading foundation models compared with Gemini 1.5’s 2 million token capability1.5 Flash is the newest addition to the Gemini model family and the fastest Gemini model served in the API. It’s optimized for high-volume, high-frequency tasks at scale, is more cost-efficient to serve and features our breakthrough long context window.While it’s a lighter weight model than 1.5 Pro, it’s highly capable of multimodal reasoning across vast amounts of information and delivers impressive quality for its size.The new Gemini 1.5 Flash model is optimized for speed and efficiency, is highly capable of multimodal reasoning and features our breakthrough long context window.1.5 Flash excels at summarization, chat applications, image and video captioning, data extraction from long documents and tables, and more. This is because it’s been trained by 1.5 Pro through a process called “distillation,” where the most essential knowledge and skills from a larger model are transferred to a smaller, more efficient model.Read more about 1.5 Flash in our updated Gemini 1.5 technical report, on the Gemini technology page, and learn about 1.5 Flash’s availability and pricing.Over the last few months, we’ve significantly improved 1.5 Pro, our best model for general performance across a wide range of tasks.Beyond extending its context window to 2 million tokens, we’ve enhanced its code generation, logical reasoning and planning, multi-turn conversation, and audio and image understanding through data and algorithmic advances. We see strong improvements on public and internal benchmarks for each of these tasks.1.5 Pro can now follow increasingly complex and nuanced instructions, including ones that specify product-level behavior involving role, format and style. We’ve improved control over the model’s responses for specific use cases, like crafting the persona and response style of a chat agent or automating workflows through multiple function calls. And we’ve enabled users to steer model behavior by setting system instructions.We added audio understanding in the Gemini API and Google AI Studio, so 1.5 Pro can now reason across image and audio for videos uploaded in Google AI Studio. And we’re now integrating 1.5 Pro into Google products, including Gemini Advanced and in Workspace apps.Read more about 1.5 Pro in our updated Gemini 1.5 technical report and on the Gemini technology page.Gemini Nano is expanding beyond text-only inputs to include images as well. Starting with Pixel, applications using Gemini Nano with Multimodality will be able to understand the world the way people do — not just through text, but also through sight, sound and spoken language.Read more about Gemini 1.0 Nano on Android.Today, we’re also sharing a series of updates to Gemma, our family of open models built from the same research and technology used to create the Gemini models.We’re announcing Gemma 2, our next generation of open models for responsible AI innovation. Gemma 2 has a new architecture designed for breakthrough performance and efficiency, and will be available in new sizes.The Gemma family is also expanding with PaliGemma, our first vision-language model inspired by PaLI-3. And we’ve upgraded our Responsible Generative AI Toolkit with LLM Comparator for evaluating the quality of model responses.Read more on the Developer blog.As part of Google DeepMind’s mission to build AI responsibly to benefit humanity, we’ve always wanted to develop universal AI agents that can be helpful in everyday life. That’s why today, we’re sharing our progress in building the future of AI assistants with Project Astra (advanced seeing and talking responsive agent).To be truly useful, an agent needs to understand and respond to the complex and dynamic world just like people do — and take in and remember what it sees and hears to understand context and take action. It also needs to be proactive, teachable and personal, so users can talk to it naturally and without lag or delay.While we’ve made incredible progress developing AI systems that can understand multimodal information, getting response time down to something conversational is a difficult engineering challenge. Over the past few years, we’ve been working to improve how our models perceive, reason and converse to make the pace and quality of interaction feel more natural.Building on Gemini, we’ve developed prototype agents that can process information faster by continuously encoding video frames, combining the video and speech input into a timeline of events, and caching this information for efficient recall.By leveraging our leading speech models, we also enhanced how they sound, giving the agents a wider range of intonations. These agents can better understand the context they’re being used in, and respond quickly, in conversation.With technology like this, it’s easy to envision a future where people could have an expert AI assistant by their side, through a phone or glasses. And some of these capabilities are coming to Google products, like the Gemini app and web experience, later this year.We’ve made incredible progress so far with our family of Gemini models, and we’re always striving to advance the state-of-the-art even further. By investing in a relentless production line of innovation, we’re able to explore new ideas at the frontier, while also unlocking the possibility of new and exciting Gemini use cases.Learn more about Gemini and its capabilities.Collection Sign up for our newsletters with product updates, event information, special offers, and more. Done. Just one step more. Check your inbox to confirm your subscription.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>You can also subscribe with a different email address.
  
        Your information will be used in accordance with Google's privacy policy. You may opt out at any time.
</code></pre></div></div>]]></content><author><name></name></author><category term="external-posts"/><category term="google"/><summary type="html"><![CDATA[We’re sharing updates across our Gemini family of models and a glimpse of Project Astra, our vision for the future of AI assistants.]]></summary></entry><entry><title type="html">Displaying External Posts on Your al-folio Blog</title><link href="https://an-minyoung.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog/" rel="alternate" type="text/html" title="Displaying External Posts on Your al-folio Blog"/><published>2022-04-23T23:20:09+00:00</published><updated>2022-04-23T23:20:09+00:00</updated><id>https://an-minyoung.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog/"><![CDATA[<h3>External Posts on Your al-folio Blog</h3> <p>If you prefer publishing blog posts on medium.com or other external sources, starting version v0.5.0, <a href="https://github.com/alshedivat/al-folio">al-folio</a> lets you to display your external posts in the blog feed of your website! 🎉🎉</p> <p>Configuring external sources of super simple. After upgrading to v0.5.0, just add the following section to your _config.yml:</p> <pre>external_sources:<br />  - name: medium.com  # name of the source (arbitrary string)<br />    rss_url: <a href="https://medium.com/@al-folio/feed">https://medium.com/@&lt;your-medium-username&gt;/feed</a></pre> <p>The example above adds your medium.com blog post feed as an external source. But you can add arbitrary RSS feeds as sources.</p> <p>Any questions or suggestions? 👉 Start <a href="https://github.com/alshedivat/al-folio/discussions">a discussion on GitHub</a>!</p> <p><img src="https://medium.com/_/stat?event=post.clientViewed&amp;referrerSource=full_rss&amp;postId=b60a1d241a0a" width="1" height="1" alt=""/></p>]]></content><author><name></name></author><category term="external-posts"/><category term="medium"/></entry><entry><title type="html">JS Development Techniques Applied to Glassdoor</title><link href="https://an-minyoung.github.io/blog/2021/glassdoor/" rel="alternate" type="text/html" title="JS Development Techniques Applied to Glassdoor"/><published>2021-07-10T00:00:00+00:00</published><updated>2021-07-10T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2021/glassdoor</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2021/glassdoor/"><![CDATA[<h2 id="glassdoor">Glassdoor</h2> <p>My girlfriend is looking for a new position. As she goes through the process it became important to understand more about who we were reaching out to. Enter Glassdoor. This isn’t a plug, that’s just what they do. In order to read reviews, they ask that you submit a review of your own first. I wanted to test that.</p> <h3 id="site-navigation">Site Navigation</h3> <p>Navigating Glassdoor is easy enough. There’s a search bar, entering the company name and selecting the result will take you to their page. This is where the adventure begins.</p> <div class="img_row"> <img class="col three" src="/assets/img/glassdoor/1.png"/> </div> <div class="col three caption"> Figure 1: Lock screen presented to new users </div> <p>As you can see navigation stops once this is presented. If the browser takes awhile to load sometimes you can scroll and peak at the other information, but once the lock loads that stops. Each link is also a separate page, which forces the browser to reload the lock.</p> <p>If we open up the console we can look at what is creating the lock.</p> <div class="img_row"> <img class="col three" src="/assets/img/glassdoor/highlight.gif"/> </div> <div class="col three caption"> Figure 2: Identifying the lock elements </div> <h3 id="console-navigation">Console Navigation</h3> <p>Hovering over the items we see “hardsellContainer”, which sounds exactly like something we’re looking for, containing the display lock elements. One of the elements is the container for the social media login options. Another element creates the shadowing effect, establishing the webpage as a background for the social media links. Because of the hierarchal nature of elements, deleting the parent element deletes any children elements.</p> <div class="img_row"> <img class="col three" src="/assets/img/glassdoor/delete.gif"/> </div> <div class="col three caption"> Figure 3: Deleting the lock elements </div> <p>Deleting the lock elements allows us to see the company’s information but still prevents us from scrolling. There’s a few mechanisms that would prevent a page from scrolling, but a common one is the <code class="language-plaintext highlighter-rouge">overflow</code> property. If we inspect the main body of the page we see that the <code class="language-plaintext highlighter-rouge">overflow</code> property is set to <code class="language-plaintext highlighter-rouge">hidden</code>. Unchecking it should allow the user to scroll at will. If that’s not the case, check the other elements for the <code class="language-plaintext highlighter-rouge">overflow</code> property to see if it was redefined.</p> <div class="img_row"> <img class="col three" src="/assets/img/glassdoor/walmart.gif"/> </div> <div class="col three caption"> Figure 4: Entire unlock process </div> <h2 id="discussion">Discussion</h2> <p>I’m quite surprised at how easy it was to get around Glassdoor’s security. Granted, it’s not anything you can’t already get for free (so long as you have a social media account), but that it’s 4 clicks start-to-finish to circumvent a well presented security feature at a well-known company. It’s also interesting to think about the of the barrier of entry to do this; a web browser you’re already using, and its console. Anyone who has watched a 5 minute intro video into web design is already intimately familiar with the tools needed to do this. It sort of begs the question what other sites are like this, and how can they be circumvented. While there’s entire fields dedicated to that, this is from the perspective of someone <strong>not</strong> in those fields.</p> <p>I used Chrome for this, Firefox or Safari should work with some tweaks.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Using the Console to Access Review Information]]></summary></entry><entry><title type="html">Microscopy and Image Analysis</title><link href="https://an-minyoung.github.io/blog/2020/microscopy/" rel="alternate" type="text/html" title="Microscopy and Image Analysis"/><published>2020-06-09T00:00:00+00:00</published><updated>2020-06-09T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2020/microscopy</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2020/microscopy/"><![CDATA[<h3 id="fiji">FIJI</h3> <p><a href="https://imagej.net/Fiji">FIJI</a> is an open source image analysis tool for the scientific community. This post demos how to use some of the tools FIJI has, including data collection techniques.</p> <h3 id="initial-data">Initial Data</h3> <div class="img_row"> <img class="col three" src="/assets/img/fiji/SACs_color.png"/> </div> <div class="col three caption"> Figure 1: Original image </div> <p>The image for this demo is of starburst amacrine cells (SACs), interneurons in the retina. The image is a single channel .tif, 512x512 pixels, with each pixel representing 0.62 microns. With this information we definitively measure how big each cell is.</p> <h4 id="brightness--contrast">Brightness &amp; Contrast</h4> <p>The first thing I do is adjust the brightness and contrast. By looking at the histogram we can see that the image is very dark, more dark than it needs to be. Lowering the maximum value fills out the range of present colors. The difference is clear in Figure 2.</p> <div class="img_row"> <img class="col two" src="/assets/img/fiji/fig_02a.png"/> <img class="col two" src="/assets/img/fiji/fig_02b.png" style="float: right"/> </div> <div class="col three caption"> Figure 2: left, unaltered maximum; right, fitted maximum </div> <p>It’s important in this step to not over-saturate the image by raising or lowering the minimum/maximum values. This step is to present the information within the image as a whole. Tweaking and refining will come later.</p> <p>For this demo I want to look at the cells, not the nebulous background or nodelets. Given that, the image doesn’t need to be as bright. However, it’s important to note that brightening the image revealed more cells and provided better definition. Where this middle ground is depends on the observer and whatever their interests are.</p> <h4 id="threshold">Threshold</h4> <p>Thresholding is an important first step in many image analysis techniques. It converts the image to a black and white image. Here I adjust the histogram in the same fashion as before and focus it around the peak. That filters out the background while keeping true to the cell size and shape.</p> <div class="img_row"> <img class="col three" src="/assets/img/fiji/fig_03.png"/> </div> <div class="col three caption"> Figure 3: Initial image after apply the threshold. Note, adjusting for a dark background flips the histogram values </div> <p>Sometimes after adjusting the image, the subject matter may blend together. In this case applying the threshold created some peanut shaped objects. Watershed segmentation addresses the issue and cuts the “peanut” in half. Figure 4 highlights the effect.</p> <div class="img_row"> <img class="col two" src="/assets/img/fiji/fig_04a.png"/> <img class="col two" src="/assets/img/fiji/fig_04b.png" style="float: right"/> </div> <div class="col three caption"> Figure 4: Left, pre-watershed; Right, post-watershed </div> <h4 id="analyzing-the-image">Analyzing the Image</h4> <p>This is where the magic happens. Once the cells are properly individualized we can count and measure each cell. FIJI automatically does this. Since I’m interested in the size and position of the cells I’ve excluded any cells that are cropped by the edge. From here the data is exported to a .csv file.</p> <div class="img_row"> <img class="col three" src="/assets/img/fiji/fig_05.png"/> </div> <div class="col three caption"> Figure 5: FIJI can automatically count and size each cell. </div> <h3 id="matlab">MATLAB</h3> <p>The exported data contains a cell ID, area, and x/y position. First, I want to determine if the size of the cells fits any distribution. The Jarque-Bera Test tests the normality of a dataset and MATLAB has a built in function for this. Applying the JB test to the data gives a result of 1, meaning that the test rejects the hypothesis that the data (cell size) is normally distributed.</p> <p>We can also look at the nearest neighbor of each cell (see Figure 6).</p> <div class="img_row"> <img class="col three" src="/assets/img/fiji/fig_06.png"/> </div> <div class="col three caption"> Figure 6: Looking at each cell's nearest neighbor </div> <p>So the size of the cells aren’t interesting, but what about the spatial distribution of the cells? Using the data provided by the image, we can calculate the coefficient of variation:</p> <p>μ = 21.0440</p> <p>σ = 5.3968</p> <p>CoV = σ/μ = 0.26</p> <p>(units are in microns)</p> <p>Defining λ as the average distance of the nearest neighbor (21.0440), the Poisson coefficient of variation is:</p> <p>CoV = λ^(-1/2) = 0.22</p> <p>A Poisson distribution assumes that cells are “blind” to each other’s positions as they develop and can’t occupy the same space. The fact that these coefficients are close infers that these SACs are also blind as they develop.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Using FIJI/ImageJ to analyze cell development]]></summary></entry><entry><title type="html">Principal Component Analysis</title><link href="https://an-minyoung.github.io/blog/2020/principal_component_analysis/" rel="alternate" type="text/html" title="Principal Component Analysis"/><published>2020-05-13T00:00:00+00:00</published><updated>2020-05-13T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2020/principal_component_analysis</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2020/principal_component_analysis/"><![CDATA[<p> <a href=""></a><div class=""></div> <a href="https://github.com/alexanderhay2020/408/blob/master/hw/hw5/homework5.m"><div class="color-button">GitHub</div></a> </p> <h3 id="neuron-anatomy">Neuron Anatomy</h3> <p>Neurons generally have four functional regions; input, integration, conduction, and output. Inputs are generated current flowing in and out of the cell. Inputs are aggregated, and if triggered, generate an action potential and releasing neurotransmitters. In this exercise I examine the intracellular activity of a cell and determine how many presynaptic cells are providing an input, as well as the activity level of each input.</p> <div class="img_row"> <img class="col three" src="/assets/img/pca/fig_01.png"/> </div> <div class="col three caption"> Figure 1: General functional regions of the neuron </div> <h3 id="initial-data">Initial Data</h3> <p>To visualize the data I plotted it as a heat map. The left image shows all of the data, the right image displays fewer samples, highlighting the different inputs the cell is receiving.</p> <div class="img_row"> <img class="col three" src="/assets/img/pca/fig_02.png"/> </div> <div class="col three caption"> Figure 2: left, all of the sample data plotted; right, samples showing different responses </div> <p>The data is a series of voltage measurements over time; if we look at a covariance matrix (Figure 3) it would be able to show us how the voltage measured at each time point vary together.</p> <div class="img_row"> <img class="col three" src="/assets/img/pca/fig_03.png"/> </div> <div class="col three caption"> Figure 3: Covariance matrix of the cell voltage data </div> <h3 id="principal-component-analysis-pca">Principal Component Analysis (PCA)</h3> <p>From there we can run PCA on the data, seen in Figure 4. Three PCs stand out in that they explain more fractional variance than the other PCs, but ultimately we would need hundreds to explain all of the data. By plotting those three principal components we can clearly see three signal responses (Figure 5, left). Looking at the histogram (Figure 5, right) confirms that the 4th PC has a gaussian centered at 0, a strong indicator of noise.</p> <div class="img_row"> <img class="col" src="/assets/img/pca/fig_04.png"/> </div> <div class="col three caption"> Figure 4: Principal components plotted as percent of variance explained </div> <div class="img_row" style="margin-right:1.5rem; margin-left:1.5rem;"> <img class="col two" style="float:left; padding-right: 1rem;" src="/assets/img/pca/fig_05_l.png"/> <img class="col two" style="float:right; padding-left: 1rem;" src="/assets/img/pca/fig_05_r.png"/> </div> <div class="col three caption"> Figure 5: Left, signal response of principal components 1-3; right, histogram scores </div> <h3 id="k-means-classification-and-event-identification">K-means Classification and Event Identification</h3> <p>Now that we have a waveform with which to use, we can use a classifier. In this exercise I use the K-means tool in MATLAB to comb through the data and ‘classify’ the inputs based on the PCA, counting each time a synapse event occurs. In this example each event occurred 587, 108, and 127 times respectively. There’s a number of guides and videos on how K-means works.</p> <p><img class="col three" src="/assets/img/pca/fig_06.png"/> </p> <div class="col three caption"> Figure 6: Results of K-means classification </div>]]></content><author><name></name></author><summary type="html"><![CDATA[Using PCA to determine number of presynaptic inputs of a cell]]></summary></entry><entry><title type="html">Function Approximation Using Radial Basis Functions</title><link href="https://an-minyoung.github.io/blog/2020/radial_basis_functions/" rel="alternate" type="text/html" title="Function Approximation Using Radial Basis Functions"/><published>2020-01-15T00:00:00+00:00</published><updated>2020-01-15T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2020/radial_basis_functions</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2020/radial_basis_functions/"><![CDATA[<p> <a href=""></a><div class=""></div> <a href="https://github.com/alexanderhay2020/469_bme/blob/master/ps1/py/part1.py"><div class="color-button">GitHub</div></a> </p> <h3 id="color-specific-photoreceptors---cones">Color Specific Photoreceptors - Cones</h3> <p>Inside the retina are cone cells, photosensitive cells that differentiate color. Humans have 3 different types of cones; (S)mall, (M)edium, and (L)arge, corresponding to the length of the wavelength that excites it. The excitement amplitudes of each type of cone is perceived to us as color, and <a href="/assets/img/Figure_5.gif">the color perceived is the sum of each cone response</a>.</p> <div class="img_row"> <img class="col three" src="/assets/img/figure_5.gif"/> </div> <div class="col three caption"> The color perceived is the sum of each cone response </div> <h3 id="radial-basis-functions">Radial Basis Functions</h3> <p>A Radial Basis Function (RBFs) is a function whose value depends the distance between a query point and a fixed point. For this exercise I used the Gaussian Function:</p> \[h(x)=exp(-\frac{(x-c^2)}{r^2})\] <ul> <li><em>x</em> is the query point</li> <li><em>c</em> is some fixed point, 0 if distance is measured from origin</li> <li><em>h(x)</em> is the RBF</li> </ul> <p>By using multiple RBFs you can approximate a function. By multiplying the RBF by some weight, summing a network of RBFs can approximate a function:</p> \[f(x) = \sum_{j=1}^{m} w_j h_j(x)\] <ul> <li><em>h(x)</em> is the RBF</li> <li><em>w</em> is the weight for the RBF</li> <li><em>j</em> in the index for <em>m</em> samples of x</li> </ul> <p>The weight vector can be found using linear regression, ultimately leading to this equation:</p> \[\overrightarrow{w} = (H^TH)^{-1}H^T\overrightarrow{y}\] <ul> <li><em>H</em> is the <em>design matrix</em> of <em>h(x)</em>, or a <em>nxm</em> matrix of <em>n</em> samples and <em>m</em> RBFs</li> <li><em>y</em> is f(x) vectorized</li> </ul> <p>In this exercise we have the following dataset:</p> <ul> <li><em>x</em> is drawn from a uniform random distribution, from <em>-10 &lt; n &lt; 10; n=1,000</em></li> <li><em>y = 2x + e</em>; e is a normally distributed noise vector, $μ = 1, σ = 0$</li> <li>Use 48 RBFs, between -12 and 12 @ every 0.5 along the x axis</li> </ul> <p><a href="https://alexanderhay2020.github.io/alexanderhay2020.github.io//assets/img/Figure_1.png">Fig. 1</a> - Dataset visualized</p> <p><a href="https://alexanderhay2020.github.io/alexanderhay2020.github.io//assets/img/Figure_2.png">Fig. 2</a> - 48 RBFs plotted</p> <p><a href="https://alexanderhay2020.github.io/alexanderhay2020.github.io//assets/img/Figure_3.png">Fig. 3</a> - Function approximation</p> <p><a href="https://alexanderhay2020.github.io/alexanderhay2020.github.io//assets/img/Figure_4.png">Fig. 4</a> - Error analysis</p> <div class="img_row"> <img class="col one first" src="/assets/img/Figure_1.png"/> <img class="col one" src="/assets/img/Figure_2.png"/> </div> <div class="img_row"> <img class="col one first" src="/assets/img/Figure_3.png"/> <img class="col one" src="/assets/img/Figure_4.png"/> </div> <p>Modeling photoreceptor response provides insight to how information is gathered and processed at the cellular level. It’s the network of these cone cells that provide the stimulus we interpret as color.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Using radial basis functions to approximate a linear mapping]]></summary></entry><entry><title type="html">Computing Logic Funcitons using Perceptrons</title><link href="https://an-minyoung.github.io/blog/2019/perceptrons/" rel="alternate" type="text/html" title="Computing Logic Funcitons using Perceptrons"/><published>2019-11-20T00:00:00+00:00</published><updated>2019-11-20T00:00:00+00:00</updated><id>https://an-minyoung.github.io/blog/2019/perceptrons</id><content type="html" xml:base="https://an-minyoung.github.io/blog/2019/perceptrons/"><![CDATA[<p> <a href=""></a><div class=""></div> <a href="/assets/pdf/perceptron.pdf"><div class="color-button">Report</div></a> <a href="https://github.com/alexanderhay2020/alexanderhay2020.github.io/blob/master/assets/py/"><div class="color-button">GitHub</div></a> </p> <h3 id="emulated-neurons">Emulated Neurons</h3> <p>Neural networks are built on units called neurons, and for this exercise a special neuron called a perceptron is used. Perceptrons are special in that they can represent fundamental logic functions: AND, OR, NAND, NOR. Though a perceptron can’t represent XAND or XOR, layered perceptrons can, thus all logic functions can potentially be built using a layered network structure.</p> <p> <img src="/assets/img/nn_01.png" width="511" height="286" alt=""/> <br/> <a href="https://medium.com/@lucaspereira0612/solving-xor-with-a-single-perceptron-34539f395182"><em>images</em></a><em> showing perceptrons' logic structure</em> </p> <p>Perceptrons work by multiplying a vector of inputs by a weight vector and passing the sum of that input-weight vectors through an activation function. For this exercise I used the sigmoid function, but there are many others. Weights are [nxm] matrices, where n is the dimension of the input and m is the dimension of the output.</p> <p> <img src="/assets/img/nn_02.png" alt=""/> <br/> <em> image showing perceptron model</em> </p> <p><br/></p> <p>Here is a sketch algorithm to implement a perceptron node:</p> <p><br/> \(\Sigma (x_iw_i ) = x_1w_1 + x_2 w_2 + ... + x_nw_n\)</p> <p>\(\sigma = \frac{1}{1+e^{\Sigma (x_iw_i )}}\) <br/></p> <ul> <li><em>x</em> is the sample input</li> <li><em>w</em> is the the associated weight for the input sample</li> </ul> <p>For the perceptron to work properly, the weights need to be adjusted according to the desired output. To calculate and adjust the error we first subtract the predicted output from the actual output.</p> <p>\(\epsilon=y-\sigma\) <br/></p> <ul> <li><em>ϵ</em> is the error</li> <li><em>y</em> is the acutal output</li> <li><em>σ</em> is defined above</li> </ul> <p>Using gradient descent, we find the adjustment needed for the weights by computing the derivative of the sigmoid function and multiplying that by the error to give us the final adjustment for the weights:</p> <p>\(\sigma' = \sigma (1- \sigma)\) <br/></p> <ul> <li><em>σ’</em> is the sigmoid derivative when given σ as above</li> </ul> <p>\(adjustment = \epsilon*\sigma'\) <br/></p> \[w_i=w_i+ \hat{x}^T \cdot adjustments\] <p>Networked together, perceptrons can be immensely powerful and are the foundations by which many neural nets are built. These new weights wouldn’t have changed much, but over many iterations they converge to their proper values of minimizing error. This method of adjusting the weights is called backpropagation.</p> <p>To test the algorithm a small, simple sample set was used to provide easy-to-interpret results. The table below shows the following dataset such that the output is 1 if first or second columns contained a 1, disregrading the third column:</p> <table> <thead> <tr> <th> </th> <th>Variable 1</th> <th>Variable 2</th> <th>Variable 3</th> <th>Output</th> </tr> </thead> <tbody> <tr> <td>Input 1</td> <td>0</td> <td>0</td> <td>1</td> <td>0</td> </tr> <tr> <td>Input 2</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> </tr> <tr> <td>Input 3</td> <td>1</td> <td>0</td> <td>1</td> <td>1</td> </tr> <tr> <td>Input 4</td> <td>0</td> <td>1</td> <td>1</td> <td>1</td> </tr> </tbody> </table> <p> <a href=""></a><div class=""></div> <a href="https://github.com/alexanderhay2020/alexanderhay2020.github.io/blob/master/assets/py/perceptron.py"><div class="color-button">perceptron.py</div></a> </p> <p><a href="https://github.com/alexanderhay2020/alexanderhay2020.github.io/blob/master/assets/py/perceptron.py">perceptron.py</a> demonstrates the algorithm and predicted output. Given the input array and initial weights adjusted 200​ times, the predicted results are as follows:</p> <table> <thead> <tr> <th> </th> <th>Variable 1</th> <th>Variable 2</th> <th>Variable 3</th> <th>Output</th> </tr> </thead> <tbody> <tr> <td>Input 1</td> <td>0</td> <td>0</td> <td>1</td> <td>0.135</td> </tr> <tr> <td>Input 2</td> <td>1</td> <td>1</td> <td>1</td> <td>0.999</td> </tr> <tr> <td>Input 3</td> <td>1</td> <td>0</td> <td>1</td> <td>0.917</td> </tr> <tr> <td>Input 4</td> <td>0</td> <td>1</td> <td>1</td> <td>0.917</td> </tr> </tbody> </table> <p>Given an infinite number of iterations the algorithm would converge to either 0 or 1, but in 200 iterations our results are close enough to see a clear distinction.</p> <p> <a href=""></a><div class=""></div> <a href="https://github.com/alexanderhay2020/alexanderhay2020.github.io/blob/master/assets/py/classifier.py"><div class="color-button">classifier.py</div></a> </p> <p>Applied to a larger dataset, <a href="https://github.com/alexanderhay2020/alexanderhay2020.github.io/blob/master/assets/py/classifier.py">classifier.py</a>, we can create a linear classifier.</p> <p> <img src="/assets/img/Figure_2-1.png" width="50%;" height="50%;" alt=""/><img src="/assets/img/Figure_2-2.png" width="50%;" height="50%;" alt=""/> <br/> <em>Left: Initial 2D dataset, Right: Perceptron classifier results</em> </p> <p> <img src="/assets/img/Figure_2-4.png" width="50%;" height="50%;" alt=""/><img src="/assets/img/Figure_2-5.png" width="50%;" height="50%;" alt=""/> <br/> <em>Left: Initial validation dataset, Right: Perceptron validation classifier results</em> </p> <p>The graph below shows the network error over 500 iterations. As expected the initial error is very high due to the weights being initially random. The error quicky drops after ~30 iterations, but never quite reaches zero. In this case error is ~4%, reflected in the misclassifed samples in both images on the right.</p> <p> <img src="/assets/img/Figure_2-3.png" width="50%;" height="50%;" alt=""/> <br/> <em>Network error percentage drops after each epoch, indicating a model is being learned</em> </p>]]></content><author><name></name></author><summary type="html"><![CDATA[Using layered perceptrons to compute logic functions]]></summary></entry></feed>