<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MIH Media Lab</title>
	<atom:link href="http://ml.sun.ac.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://ml.sun.ac.za</link>
	<description>New Media research at Stellenbosch University</description>
	<lastBuildDate>Fri, 27 Jan 2017 20:02:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>some more ways our brain plays tricks on us</title>
		<link>http://ml.sun.ac.za/2015/04/01/some-more-ways-our-brain-plays-tricks-on-us/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-more-ways-our-brain-plays-tricks-on-us</link>
		<comments>http://ml.sun.ac.za/2015/04/01/some-more-ways-our-brain-plays-tricks-on-us/#comments</comments>
		<pubDate>Wed, 01 Apr 2015 18:48:32 +0000</pubDate>
		<dc:creator>jeanne-mariè loveday</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5400</guid>
		<description><![CDATA[in an interview with lee gomes, michael jordan (no, not the basketball player, the ieee fellow) stated that there are still many challenging, unsolved problems in computer vision, even though deep learning has given us a great tool in terms of certain types of image classification. although michael jordan had a thing or two to say [...]]]></description>
				<content:encoded><![CDATA[<p>in an <a href="http://bit.ly/1rnUAct">interview</a> with lee gomes, michael jordan (no, not the basketball player, the ieee fellow) stated that there are still many challenging, unsolved problems in computer vision, even though deep learning has given us a great tool in terms of certain types of image classification. although michael jordan had a <a href="http://bit.ly/1OORfCb">thing or two to say</a> about the interview that was published, it doesn’t appear as if he rebutted any of the statements made regarding computer vision.</p>
<p>as mentioned in the interview, even though deep learning can be used to classify the objects in some images, a method has not yet been found to enable computers to establish the full relation between objects. computers can also not fully comprehend the use of objects. for example, humans can easily find a place to sit even though there might not be traditional chairs in most situations. computers, however, find this considerably more difficult. (there has been some research into this, such as the article “what makes a chair a chair?” by h. grabner, j. gall and l. van gool)</p>
<p>what we often don’t consider is how the human brain is trained to interpret what is seen. even something as simple as recognising objects in a 2d image seems to be a learnt skill. in other words, even if we knew what objects looked like, and could recognise them all around us, the ability to recognise them on a photo seems to be a learnt skill. this is the conclusion that the author of “smart moves”, dr c. hannaford, a neurophysiologist and educator, has come to. in her book, she explains how she had visited a tribe that had never before been exposed to 2d images. when showing them pictures of a mountain range, they were completely unable to ‘see’ the mountain range (even though they were very familiar with mountain ranges). how their brains process visual information was not adapted to recognising objects in a 2d picture.  just as <a href="http://ml.sun.ac.za/2014/06/12/gestalt-theory/">gestalt theory</a> also reveals, therefore, what we see is not necessarily what is present.</p>
<p>an example of this is the blue-black vs white-gold dress that made its rounds on social media ‘recently’, and can be seen in figure 1.</p>
<div id="attachment_5401" class="wp-caption aligncenter" style="width: 207px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/dress.jpg"><img class="size-medium wp-image-5401" alt="dress" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/dress-197x300.jpg" width="197" height="300" /></a>
<p class="wp-caption-text">figure 1</p>
</div>
<p style="text-align: left;">not everyone sees this dress the same. some people immediately see it as a black-blue dress, whilst others see it as a white-gold dress. in essence, <a href="http://bit.ly/1HeBlvC">taken from this article that explains it in detail</a>, what happens is that the sharp outside light may cause your brain to think that you are looking at the shadowed version of the dress, and so compensates, and you see a white-gold dress. however, when people see it as a black-blue dress, the brain realises that the dress itself is also well-lit, and that the bright light isn&#8217;t to be taken into account when looking at the dress itself.</p>
<p style="text-align: left;">from this can be seen that our brains consider the surrounds when processing colour. whether that surrounds is something specific as the actual colour that surrounds the one in question, or whether it is from more of an idea such as a light-source or shadow.</p>
<p style="text-align: left;">consider the objects in figure 2.</p>
<div id="attachment_5411" class="wp-caption aligncenter" style="width: 272px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/middle-rect-separated.png"><img class="size-full wp-image-5411" alt="figure 2" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/middle-rect-separated.png" width="262" height="151" /></a>
<p class="wp-caption-text">figure 2</p>
</div>
<p>it appears in figure 2 as if the middle rectangle in the bigger rectangles are different colours. however, they are actually the same colour, as can be seen in figure 3. this effect is known as simultaneous contrast, and refers to how colours from different objects affect each other .</p>
<div id="attachment_5410" class="wp-caption aligncenter" style="width: 274px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/middle-rect-continuous.png"><img class="size-full wp-image-5410" alt="figure 3" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/middle-rect-continuous.png" width="264" height="39" /></a>
<p class="wp-caption-text">figure 3</p>
</div>
<p>the simultaneous contrast effect is most intense when the colours that interact with each other are complementary colours. complementary colours are the colours that are directly opposite one another on the colour wheel (as shown in figure 4).</p>
<div id="attachment_5412" class="wp-caption aligncenter" style="width: 310px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/colour-wheel.png"><img class="size-medium wp-image-5412" alt="figure 4" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/colour-wheel-300x290.png" width="300" height="290" /></a>
<p class="wp-caption-text">figure 4</p>
</div>
<p>this effect, together with colour theory and the colour wheel is used in many different applications. obvious places where it is used is in areas such as art, logo design and in the design of websites. a less obvious place it is used in is in choosing the colour of life rafts. as can be seen in the colour wheel in figure 4, orange is the complementary colour to blue. as the oceans appear blue in general, life rafts&#8217; colour has been chosen to be orange, since it is the colour that will stand out the most on blue.</p>
<p>as mentioned before, the idea of a shadow can also have an effect on how we perceive colours. as an example of this, consider the images in figure 5.</p>
<div id="attachment_5413" class="wp-caption aligncenter" style="width: 485px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/shadow-example.png"><img class=" wp-image-5413 " alt="figure 5" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2015/03/shadow-example.png" width="475" height="214" /></a>
<p class="wp-caption-text">figure 5</p>
</div>
<p>in the image to the left, it appears as if the blocks labelled &#8216;a&#8217; and &#8216;b&#8217; are of different colours. however, in the image to the right, it can be seen that the two blocks are actually the same colour. part of the reason for this &#8216;trick&#8217; is due to our brains seeing the shadow thrown by the green cylinder and in so doing, adapting our perception of the colour of block &#8216;b&#8217;. for the full reasoning behind this example, see <a href="http://bit.ly/1Ep8sPF">this article</a>.</p>
<p>the human brain is a complex system with extremely complex interactions. above are some simple examples of how our brains adapt to the information that is perceived. it is also adaptions like these that makes teaching a computer to gather the same information from of a scene as a human, more difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2015/04/01/some-more-ways-our-brain-plays-tricks-on-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dabbling in text mining to study ‘othering’ on Bonfiire Stellenbosch</title>
		<link>http://ml.sun.ac.za/2014/11/04/dabbling-in-text-mining-to-study-othering-on-bonfiire-stellenbosch/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dabbling-in-text-mining-to-study-othering-on-bonfiire-stellenbosch</link>
		<comments>http://ml.sun.ac.za/2014/11/04/dabbling-in-text-mining-to-study-othering-on-bonfiire-stellenbosch/#comments</comments>
		<pubDate>Tue, 04 Nov 2014 08:22:44 +0000</pubDate>
		<dc:creator>Johannes Jonker</dc:creator>
				<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Sentiment Analysis]]></category>
		<category><![CDATA[Social networks]]></category>
		<category><![CDATA[Bonfiire]]></category>
		<category><![CDATA[othering]]></category>
		<category><![CDATA[system dynamics]]></category>
		<category><![CDATA[text mining]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5375</guid>
		<description><![CDATA[Background For my Honours research project this year, I analysed ways of increasing user participation in blog-based social networks. My case study was Bonfiire, a multi-community network for discussion and debate, that I co-founded with a friend in 2012. Since the public launch of Bonfiire Stellenbosch (our first community, targeted at Stellenbosch University students and [...]]]></description>
				<content:encoded><![CDATA[<h3>Background</h3>
<p>For my Honours research project this year, I analysed ways of increasing user participation in blog-based social networks. My case study was <a href="http://bonfiire.com">Bonfiire</a>, a multi-community network for discussion and debate, that I co-founded with a friend in 2012. Since the public launch of <a href="http://bonfiire.com/stellenbosch" target="_blank">Bonfiire Stellenbosch</a> (our first community, targeted at Stellenbosch University students and alumni) in January 2013, we’ve seen the platform evolve into a vibrant virtual space for the discussion of campus issues. In my research project, I focused specifically on modelling Bonfiire using a <a href="http://www.apple.com">system dynamics</a> approach. However, along the way, I’ve stumbled across a number of interesting phenomena that I am very curious to examine further.</p>
<p>One of the things I’ve been wanting to do, is to <b>use text mining to gain insight into the focus and nature of discussion</b> on Bonfiire, as well as the way in which users express themselves. In recent years, there has been a growing interest in large-scale text mining as a means to gaining rich insights from unstructured (i.e. natural language) data sources. Bonfiire presents an interesting case in this regard, because blog posts by users are long (usually three to six paragraphs) and rich (packed with the writer’s sentiment towards and opinion on specific topics).</p>
<p>In this blog post, I’m going to use rudimentary text mining to answer the question: What were the main discussion topics in the months that saw the highest frequency of ‘othering’ words (“they”, “their”, “them”)? The time frame will be January 2013 to October 2014.</p>
<h3>The concept of ‘othering’, and measuring it in Bonfiire blog posts</h3>
<p>In <a href="http://en.wiktionary.org/wiki/othering">Wiktionary&#8217;s definition</a>, ‘othering’ refers to <b>“the process of perceiving or portraying someone or something as fundamentally different or alien”</b>. ‘Othering’ focuses on emphasising how one, or one’s group, differs from others, through using exclusionary language (“our culture”, “we condone such practices”, “they reject our idea”, “the leader is one of them”) and, in a broader sense, implicitly identifying the ‘other’ in a negative light. <a href="http://www.apple.com">This article</a> describes the language of ‘othering’ in greater detail.</p>
<p>Arguably the most rudimentary level at which ‘the other’ is indicated in the English language, is through the use of the words <b>“they”, “their” and “them”</b>, referring to out-groups in the third person. These words can easily be mined in large heaps of text. That is precisely what I intend to do, to measure to what an extent a post may be said to use ‘othering’ language. (Of course, my approach has a number of important limitations. Fear not; I discuss these later on.)</p>
<div>
<h3>My approach</h3>
<p>To do the above, I followed a number of steps:</p>
<ol>
<li>I parsed the content of all Bonfiire Stellenbosch blog posts in each of the months from January 2013 to October 2014.</li>
<li>I tallied the number of times the above-mentioned ‘othering’ words were used in each blog post, and divided this by the number of blog posts in the given month to obtain the average “othering words per post” number for each month.</li>
<li>I graphed this over time to see trends in the use of the use of ‘othering’ words.</li>
<li>I identified four months of interest, where the number of the ‘othering&#8217; words per post were particularly high.</li>
<li>For each of these months, I extracted the most-used tags (short words added to blog posts as metadata, by the writer) and visualised these in tag clouds.</li>
<li>Finally, I showed each of the tag clouds with the average number of ‘othering’ words per post for the given month, to see if anything interesting pops out.</li>
</ol>
<h3>The results</h3>
<p>I’ve created a short slideshow to show the results of the above. Watch it below, but first read these notes:</p>
<ul>
<li>At <b>00:13</b>, I’ve graphed the number of posts per month over the 22 month period, to serve as context. I’ve also indicated University holidays (December-January; June-July), where the posts per month understandably dip quite a bit, so that we can ignore those in the results.</li>
<li>At <b>00:24</b>, you’ll see the average number of ‘othering’ words per post graphed over time. I’ve indicated the four months of interest. Note that we can ignore July 2014 (“2014-07”), because the number of posts in that (holiday) month was too low to be meaningful.</li>
<li>From <b>00:39 onwards</b>, I show the tag clouds for the four months of interest.</li>
</ul>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/cqddIR4FXwI?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<h3>What’s interesting</h3>
<ul>
<li><b>February 2013</b> had an average of 5.625 ‘othering’ words per post. The biggest discussion topics (according to the number of tags) were “transformation” (discussing transformation at the university) and “src” (discussing the role of the Student Representative Council).</li>
<li><b>October 2013 </b>had an average of 6.625 ‘othering’ words per post. The biggest discussion topics were “#matiesdiversity” (discussing diversity at Stellenbosch, also on the basis of a blogging competition that asked “What does it mean to be a born free?”) and “#i-dont-have-sex” (discussing views on sexuality, on the basis of a related blogging competition).</li>
<li><b>March 2014</b> had an average of just over 6 ‘othering’ words per post, with big topics being “Human Rights”, “Critical thinking”, “apartheid”, “transformation”, “opinions” and “born free”.</li>
<li><b>October 2014 </b>had nearly 9 ‘othering’ words per post, with the four big topics being “language”, “diversity”, “DOOKOOM” (referring to the artist behind <a href="https://www.youtube.com/watch?v=kmgpDostEqk&amp;oref=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkmgpDostEqk&amp;has_verified=1">this controversial video</a>) and “Culture”, with “Sex” and “blackface” as further interesting points of discussion.</li>
</ul>
<h3>The catch, and what can be learnt</h3>
<p>At this point, before we get too excited about the insights above, I need to add a few disclaimers.</p>
<ol>
<li>The words I’ve chosen to represent ‘othering’ are naturally very limited; one could expand the choice of words (and perhaps even the types of expressions) that may be classified as ‘othering’ language.</li>
<li>“They”, “their” and “them” aren’t always used to refer to out-groups; they can also be used to refer to abstract concepts and other objects (for example, in this sentence: “human rights form the foundation of society; <b>they</b> preserve constructive human relations and without <b>them</b> we would be lost.”).</li>
<li>Due to time constraints, I haven’t included Afrikaans translations for the above words in my searches. Since a sizeable amount of Bonfiire Stellenbosch’s blog posts are in Afrikaans, it would be interesting to see how the picture changes if we include Afrikaans ‘othering’ words.</li>
</ol>
<p>Nevertheless, if we take the relationship between months with high numbers of ‘othering’ words and the topics discussed in that month (as depicted through the tags) at face value, it would seem that the topics mentioned above necessitate — or promote — the use of ‘othering’ language. Anecdotally, this seems to make perfect sense for polarising issues where identity is the focus (e.g. transformation, diversity, views of sexuality, language, etc.) and where people will necessarily need to write in terms of ‘us’ and ‘them’. It could be very interesting to supplement these quantitative indicators with a qualitative examination of blog post content in the months of interest.</p>
<p>Holistically speaking, I am surprised at how such a rudimentary indicator as the average number of ‘othering’ words per post, when brought into view of the actual topics of discussion, can yield relatively interesting results. If anything, I think this illustrates — albeit at a very superficial level — how text mining can serve as point of departure for further qualitative analyses.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/11/04/dabbling-in-text-mining-to-study-othering-on-bonfiire-stellenbosch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Predicting the future with Machine Learning</title>
		<link>http://ml.sun.ac.za/2014/10/22/predicting-the-future-with-machine-learning/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=predicting-the-future-with-machine-learning</link>
		<comments>http://ml.sun.ac.za/2014/10/22/predicting-the-future-with-machine-learning/#comments</comments>
		<pubDate>Wed, 22 Oct 2014 11:42:18 +0000</pubDate>
		<dc:creator>Manrich van Greunen</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5330</guid>
		<description><![CDATA[The future is uncertain. Luckily by using some machine learning &#8216;black magic&#8217; we will look into ways to predict the future. Hopefully in the blog post I can demystify some of the magic. Predicting the future, or to be more specific, Forecasting the future has been one of man&#8217;s fascinations for centuries. From ancient Babylon&#8217;s forecasters, weathermen [...]]]></description>
				<content:encoded><![CDATA[<p>The future is uncertain. Luckily by using some machine learning &#8216;black magic&#8217; we will look into ways to predict the future. Hopefully in the blog post I can demystify some of the magic. Predicting the future, or to be more specific, <strong>Forecasting</strong> the future has been one of man&#8217;s fascinations for centuries. From ancient Babylon&#8217;s forecasters, weathermen reporting the forecast on tomorrow&#8217;s weather, forecasting future changes in the stock markets to provisioning of staff members in call-centres, predicting the future has become part of our human &#8216;evolution&#8217;.</p>
<p>In this post I will focus on forecasting from data which is referred to as <strong>Time series </strong>data. Time series is data that changes over time and is captured in (time, value) or (x, y) pairs with x being time. Examples of time series data include stock prices, yearly rainfall, inflation, profits, etc. The area I am interested  in is the load on a server in the cloud.</p>
<h4>Classical Machine Learning</h4>
<p>Before explaining how to predict on time series, let us first discuss machine learning. Classical machine learning aims to classify data into a categories termed <em>classes</em>. A well known case is one where we have data points collected from flowers that belong to the Iris family (either Setosa, Virginica or Versicolor). For each flower sample the following was measured: the length and width of the sepals and petals and these four measurements form what machine learning refers to as <strong>features</strong>. Using these features we train a classifier (a mathematical model) with some of the data collected, in each training case telling the model what species the particular sample belongs to (also called a label). After the classifier-model has been taught, it is tested by presenting a new sample with the label unknown and makes a prediction on which species the new sample belongs. This is called statistical classification with supervised learning and you can find more information <a href="http://en.wikipedia.org/wiki/Statistical_classification">here</a>.</p>
<h4>Time series</h4>
<p>Classical machine learning uses features, like the petal and sepal lengths of flowers or the symptoms presented by a patient or elements in a wine in order to make some decision on a new sample. In contrast time series do not contain a collection of features, but rather a value at each time step. Time series prediction assumes that the future depends on the past and using this assumption it views each time step back; x[t-1], x[t-2], &#8230; as features. Time series typically also has one or more of the following characteristics; is contains randomness, follows a trend and has seasonal and/or cyclical behaviour. Predicting or forecasting a value (or set of values) into the future is the &#8216;decision&#8217; the machine learning model must make. The question now is how do one approach a time series predication problem?</p>
<h4>Steps in forecasting</h4>
<p>The following is the generic steps in forecasting time series:</p>
<ol>
<li><span style="line-height: 13px;">Define the problem to be solved. It is vital to consider of the what the end result of the forecast will be and how the forecast result will be used.</span></li>
<li>Gather data. The saying is &#8220;There is no data like more data&#8221;, more data enables better training, testing and validation.</li>
<li>Explore your data. Use statistical tools to plot different information plots and determine the characteristics of your data; does it contain patterns, is it too random or does it follow a trend.</li>
<li>Choose models and fit them. This can be simple models such as using the mean of past data-points or complex approaches such as Neural networks. I will give a brief overview of models currently applied to time series, below.</li>
<li>Evaluate your model accuracy. This entails measuring error metrics and optimising model parameters.</li>
</ol>
<p>I will now discuss steps 3-5 in more depth. Step 1 and 2 are straightforward and depends one the specific problem you are facing.</p>
<p><strong>3. Explore your data:</strong> Exploratory Data Analysis aims to  give insight into the data, discovering the structure, behaviour, patterns, outliers and other information to help with choosing a forecasting model. A key assumption of time series prediction is that the data is <em>Stationary.</em> A Stationary process&#8217;s joint probability distribution does not change over time (read more <a href="http://en.wikipedia.org/wiki/Stationary_process">here</a>). Tools to determine stationarity include calculating the Auto-correlation of the data or using the <a title="Augmented Dickey–Fuller test" href="http://ml.sun.ac.za/wiki/Augmented_Dickey%E2%80%93Fuller_test">Augmented Dickey–Fuller test</a>. Another important characteristic of your data to explore is to determine if the data follows a trend or contains a seasonal behaviour. Some model are not capable of accurately predicting on data which contains a trend or periodic pattern and thus one will typically remove these behaviour through transforming the data (ie. using FFT or first order differencing).</p>
<p><strong>4. Choose and fit models:</strong> The simplest &#8216;model&#8217; is calculating a mean over the past few samples and using this as a prediction. One step up is to plot a Histogram of your data and use the average of the samples in the most significant bin (the bin in which the majority of samples fall). <a title="Moving Average (MA)" href="http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc42.htm">Moving Average (MA)</a> models calculates a average of the samples in a sliding window over time, with <a title="" href="http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc43.htm">Exponential Smoothing</a> weighting each lagged sample exponentially less. <a title="Auto-Regressive models" href="https://www.otexts.org/fpp/8/3">Auto-Regressive (AR) models</a> aims to fit a function<em> f(t)</em> to a prediction <em>y(t) = f(t) + e</em>, where <em>e</em> captures the random error in the data. Combining MA and AR models give ARMA(p,q) models with order (p,q) defining the order of AR(p) and MA(q) respectively.</p>
<p>More advanced models include <a title="Markov chains" href="http://en.wikipedia.org/wiki/Markov_chain">Markov chains</a> and <a title="Neural network" href="http://en.wikipedia.org/wiki/Artificial_neural_network">Neural networks</a>. The idea is that one can discriminate a time series&#8217; values into <em>M</em> bins, which then denotes <em>M states</em> and using a Markov model, predict the probability of transitioning from one state to another for each time step. Neural network aim to learn patterns from past values and predict a new value or a probability distribution for a set of values into the future. Other advanced methods include combining different models or vectorising a collection of time series data in order to improve model accuracy.</p>
<p><strong>5. Model Evaluation:</strong> After fitting a model and forecasting some values, it is vital to be able to measure the accuracy of both the model and the predictions. The typical metric to use is to calculate the Root Mean Squared of the Error (RMSE) also referred to as the Root Mean Squared Deviation (RMSD); calculated by : <img alt="\operatorname{RMSD}=\sqrt{\frac{\sum_{t=1}^n (\hat y_t - y_t)^2}{n}}." src="http://upload.wikimedia.org/math/1/7/8/178fa5467023c5c58732c8e71509cde3.png" /> With <img alt="\hat y_t" src="http://upload.wikimedia.org/math/b/1/8/b1859f53476576f41148b5ef77bafa19.png" /> being the predicted value and <img alt="y" src="http://upload.wikimedia.org/math/4/1/5/415290769594460e2e485922904f345d.png" /> the actual value at time <em>t. </em>More information on error metrics can be found <a href="http://en.wikipedia.org/wiki/Errors_and_residuals_in_statistics">here</a>.</p>
<h4>Conclusion</h4>
<p>The future is still uncertain, but using <strong>Forecasting</strong> models in machine learning, I conjured some &#8216;magic&#8217; to enable us to predict the future. This blog post briefly covered classical machine learning, namely classification with supervised learning and the focus was on the steps to take when forecasting on time series data. I discussed the popular models currently being applied to time series and also mentioned advanced approaches using Markov models or Neural networks.</p>
<h4>Useful resources</h4>
<ul>
<li><span style="line-height: 13px;">Online statistics e-book: <a title="Forecasting: principles and practice" href="https://www.otexts.org/fpp/">Forecasting: principles and practice</a></span></li>
<li>Engineering Statistical handbook: <a title="NIST/SEMATECH e-Handbook of Statistical Methods" href="http://www.itl.nist.gov/div898/handbook/">NIST/SEMATECH e-Handbook of Statistical Methods</a></li>
<li>Python Machine learning library: <a title="scikit-learn" href="http://scikit-learn.org/stable/index.html"> Scikit-learn</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/10/22/predicting-the-future-with-machine-learning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Development &#8211; A Useful Skill</title>
		<link>http://ml.sun.ac.za/2014/10/09/web-development-a-useful-skill/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=web-development-a-useful-skill</link>
		<comments>http://ml.sun.ac.za/2014/10/09/web-development-a-useful-skill/#comments</comments>
		<pubDate>Thu, 09 Oct 2014 19:43:12 +0000</pubDate>
		<dc:creator>Wessel Wessels</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5323</guid>
		<description><![CDATA[Why I started web development I&#8217;m a person that loves coming up with new ideas. My friends and family know this all too well. From drive-through grocery shops to fully automated peer-to-peer community courier services. Doesn&#8217;t matter how absurd, I just like new ideas. The problem is implementing these ideas. They usually cost a lot [...]]]></description>
				<content:encoded><![CDATA[<h3>Why I started web development</h3>
<p>I&#8217;m a person that loves coming up with new ideas. My friends and family know this all too well. From drive-through grocery shops to fully automated peer-to-peer community courier services. Doesn&#8217;t matter how absurd, I just like new ideas.</p>
<p>The problem is implementing these ideas. They usually cost a lot of money and take a lot of time to build. That means you probably have to stop what you are doing and try to realise your idea. You will probably require some funding from investors. Unfortanately, the odds of your idea taking off is very small. If it fails, a lot of time and money will have been wasted.</p>
<p>Thats why I started web development. If you have some idea for a cool website or service, development of a basic protoype can be done relatively quickly and inexpensively. You can build a word game, a braai app or even a new social media app. Whatever you can think of.</p>
<p>You can test the viability of your idea and if it fails, you won&#8217;t owe anyone a lot of money and you can try again on a new idea. You are also not limited to focussing on one idea at a time. You can try many ideas in parallel, especially since you can reuse a lot that you learn in one idea in another.</p>
<h3>Starting with web development</h3>
<p>Starting with web development can be a daunting task. The biggest issue I faced is &#8220;where do I begin?&#8221;. There are so many tools available. HTML, CSS, JavaScript, PHP, Python, Ruby and MySQL are just some of the phrases you will come upon. But which of these do you need?</p>
<p>The first thing I started to learn was basic HTML. It is easy enough to use, but you soon find that your site looks like it was made in 1991 by a 10 year old. Thats when I started learning CSS. Suddenly, the website looked a lot prettier. After everything looked pretty, I realised my website doesn&#8217;t do anything. It&#8217;s called a static website. Its usually used to give information and is not used for interacting with users.</p>
<p>I realised I needed a backend scripting language in my arsenal. I decided to learn PHP, probably because Facebook uses it. Along with PHP, I learned to use MySQL databases. As soon as I got the hang of HTML, CSS, PHP and MySQL, I was at a point where I could start building primitive sites.<br />
The biggest problem I ran into is that all of these tools are used together, so you need a basic knowledge of all of them to actually start using them.</p>
<h3>Humble beginnings</h3>
<p>My first real site was www.helpacar.com, a service where you alert people anonymously that their car&#8217;s lights are left on. The site doesn&#8217;t look great, but it works.</p>
<p>For a long time, I continued developing sites like these. They were all functional, but didn&#8217;t feel like the other sites on the Internet. Something was still missing.</p>
<h3>The missing link</h3>
<p>Not having to reload your entire page when you click on a button. That is what was missing. AJAX is what I had to learn next, which meant I had to learn JavaScript first. After getting AJAX requests working in pure JavaScript, I learned of a library called jQuery that made everything a lot easier. jQuery lets you accomplish a lot more in less code. Thats where I learned a valuable lesson: <strong>Don&#8217;t do everything from scratch.</strong> It is a lesson that I am still learning to this day. I am still doing many of my development in pure php, even though there are good frameworks available. Getting to learn a framework takes more time in the beginning, but it definately pays of in the long run.</p>
<p>Another nice framework that I learned to use is Twitter&#8217;s Bootstrap, an amazing and free frontend CSS framework that is used by countless websites.</p>
<h3>Tools you will need</h3>
<p>Firstly, you will need a place to host your website. To get started, you can host your site on your own computer. You will need to install webserver software. I would recommend installing XAMPP. XAMPP stands for cross-platform Apache MySQL PHP Perl. It can be installed on Windows, Mac and Linux. After you have made your site, you can move it to a hosting provider and host it online.</p>
<p>There are many, many tutorials available on the Internet to teach you web development. It&#8217;s the Internet teaching the Internet how do program for the Internet. Guides and tutorials are great. However, I feel the best way to learn is to get a small project and try to make it work. By struggling and figuring it out, you learn a lot more than from a tutorial.</p>
<p>One of the most useful sites that I use on a daily basis is <a title="w3schools.com" href="http://www.w3schools.com">w3schools.com</a>. It has references and guides for almost everything you will need.</p>
<p>The last tool you will need is your imagination. Be creative.</p>
<p>Try new things and make the Internet a better place.</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/10/09/web-development-a-useful-skill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apace Maven and Webhosting Services Comparisons</title>
		<link>http://ml.sun.ac.za/2014/09/19/apace-maven-and-webhosting-services-comparisons/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apace-maven-and-webhosting-services-comparisons</link>
		<comments>http://ml.sun.ac.za/2014/09/19/apace-maven-and-webhosting-services-comparisons/#comments</comments>
		<pubDate>Fri, 19 Sep 2014 09:33:01 +0000</pubDate>
		<dc:creator>Daniël Schoonwinkel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Internet Policy]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5278</guid>
		<description><![CDATA[I would like to share some utilities and useful insights that I have discovered during my first year of masters research. These include Apache Maven, a very useful dependency resolution and build automation utility for Java as well as my experiences with different free or partially free Web hosting services. Apache Maven What is Apache [...]]]></description>
				<content:encoded><![CDATA[<p>I would like to share some utilities and useful insights that I have discovered during my first year of masters research. These include Apache Maven, a very useful dependency resolution and build automation utility for Java as well as my experiences with different free or partially free Web hosting services.</p>
<h3>Apache Maven</h3>
<h2>What is Apache Maven?</h2>
<p>Apache Maven is a very powerful and useful tool for Java programmers. Its main feature is automatic dependency resolution, but it is also very customizable to include Java build options, JUnit testing and Javadoc generation.</p>
<h2>Installing Apache Maven</h2>
<p>Download the appropriate Apache Maven archive: <em>apache-maven-3.2.3-bin.tar.gz</em> for OSX/Unix or <em>apache-maven-3.2.3-bin.zip</em> for Windows from <a href="http://maven.apache.org/download.cgi">Here</a>. Untar/Unzip and follow the instructions README.txt, included in the archive. More instructions available <a href="http://maven.apache.org/download.cgi#Installation">here</a></p>
<h2>Using Maven from commandline</h2>
<p>The default build script for an Apache Maven can be generated by using the following command on commandline:</p>
<p><code>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false</code></p>
<p>This will create a new Maven project in the current directory called myapp. Calling <code>mvn clean install</code> from the commandline will build the App.java source, which represents the &#8220;Hello World&#8221; of Maven projects. Run &#8220;Hello World&#8221; with <code>java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App</code></p>
<p>For more advanced projects, it is important to understand the principles of how Maven works before attempting to change the generated pom.xml to include more dependencies and build options. Maven processes Java source in different life-cycle phases called goalds. According to <a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html">Maven in 5 minutes:</a></p>
<p>Although hardly a comprehensive list, these are the most common <i>default</i> lifecycle phases executed.</p>
<ul>
<li><b>validate</b>: validate the project is correct and all necessary information is available</li>
<li><b>compile</b>: compile the source code of the project</li>
<li><b>test</b>: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed</li>
<li><b>package</b>: take the compiled code and package it in its distributable format, such as a JAR.</li>
<li><b>integration-test</b>: process and deploy the package if necessary into an environment where integration tests can be run</li>
<li><b>verify</b>: run any checks to verify the package is valid and meets quality criteria</li>
<li><b>install</b>: install the package into the local repository, for use as a dependency in other projects locally</li>
<li><b>deploy</b>: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.</li>
</ul>
<p>There are two other Maven lifecycles of note beyond the <i>default</i> list above. They are</p>
<ul>
<li><b>clean</b>: cleans up artifacts created by prior builds</li>
</ul>
<ul>
<li><b>site</b>: generates site documentation for this project</li>
</ul>
<p>These life-cycle goals are specified in the pom.xml. Most of these life-cycle goals are included by default, but every goal can be customized to use specific settings. More information at <a href="http://maven.apache.org/guides/getting-started/index.html">Maven Getting Started</a></p>
<p>The dependecy resolution part of Maven is specified by the <code>&lt;dependency&gt;</code> tags in the XML. For example, including JUnit testing in the build (included by default, but specific versions can be specified), use the following code:</p>
<p><code>&lt;dependencies&gt;<br />
  &nbsp; &lt;dependency&gt;<br />
  &nbsp; &nbsp; &lt;groupId&gt;junit&lt;/groupId&gt;<br />
  &nbsp; &nbsp; &lt;artifactId&gt;junit&lt;/artifactId&gt;<br />
  &nbsp; &nbsp; &lt;version&gt;3.8.1&lt;/version&gt;<br />
  &nbsp; &nbsp; &lt;scope&gt;test&lt;/scope&gt;<br />
  &nbsp; &lt;/dependency&gt;<br />
 &lt;/dependencies&gt;<br />
</code><br />
Check the <a href="http://mvnrepository.com/artifact/org.apache.maven.plugins">Maven Repository</a> for more plugins.</p>
<h2>Using Maven in Eclipse</h2>
<p>Apache Maven can also be used with Eclipse. To install follow these steps:</p>
<ul>
<li>Download the latest Eclipse</li>
<li>In Eclipse: Help->Install New Software: Enter <strong>http://download.eclipse.org/technology/m2e/releases</strong></li>
<li>Create a Maven Project</li>
</ul>
<p>The pom.xml file can be edited in Eclipse, and the different life-cycle goals can be set as Build configurations. For a quick start, use <code>clean install</code>, which will clean, compile, test and package the project. </p>
<h2>Maven Wrap-Up</h2>
<p>There are many other settings and configurations available with Maven, but would be too long and complicated to explain here. Check the official <a href=http://maven.apache.org/index.html>Apache Maven</a> site for more details.</p>
<h3>Web Hosting Services</h3>
<p>Various websites offer free or trail period Web Hosting Services, and this section is dedicated draw a comparison between the options. However, this post will focus on the lightweight and easy to setup websites, and not a production ready, heavy duty hosting solutions. </p>
<h2>FreeHostingNoAds.net</h2>
<p>The first hosting solution is completely free, but with some restrictions. According to the <a href=http://freehostingnoads.net>website</a>, here is the list:  </p>
<ul>
<li>20GB of Storage</li>
<li>200GB of Traffic to and from your site per month</li>
<li>Free subdomain @t15.org</li>
<li>3 versions of PHP available, MySQL, FTP, POP3 Email, SSH Console</li>
<li>Free subdomain @t15.org</li>
<li>Free website builder</li>
</ul>
<p>However, what is not included in this list is the <strong>restriction on file creation</strong>. This poses a problem for PHP scripts that create a local cache, such as Google+ Sign-in. Also, it has a 30-day inactivity shut-down. If there was no activity, the site is suspended. However, for most other applications, this lightweight solution is adequate. Usage is as simple as uploading the PHP files to the public_html folder using FileZilla or other ftp client.</p>
<h2>Amazon Web Services</h2>
<p>Although not free, <a href=http://aws.amazon.com/>Amazon Web Services(AWS)</a> provides a limited Infrastructure-as-a-Service(IaaS), that is virtual machines in the cloud, for a 1-year trail period. This free <a href=http://aws.amazon.com/free/>Service</a> provides the following resources:</p>
<ul>
<li>750 hours of computational usage / up-time per year</li>
<li>750 hours of relational database use, 20GB of database storage</li>
<li>30GB of general storage</li>
<li>Linux and Windows Server images available</li>
<li>Read/write access according to Linux or Windows defaults</li>
<li>15GB of total out-bound data transfer for the 12 month period</li>
<li>Free trail period to 12 month period, can continue at $0.013 per hour for a micro instance after 12 month period.</li>
</ul>
<p>This offering is limited, but could be used for a basic prototyping of a website. If more computing power is required, it can be easily added on at relatively good pricing. For a basic web server setup, follow <a href=http://imjustinbraun.com/aws-setup-lamp-serve/>this</a> tutorial</p>
<h2>Google App Engine</h2>
<p>Google App Engine is a Platform-as-a-Service(PaaS) which not only hosts websites, but can also host executables written in Java, Python and Go.</p>
<p>There are various <a href=https://developers.google.com/appengine/docs/quotas>limits</a> on the free service: </p>
<ul>
<li>5GB of general storage</li>
<li>28 instance hours per day (Auto-scaling)</li>
<li>100 E-mails per day</li>
<li>1GB of outgoing bandwidth per day</li>
<li>CloudSQL not included, basic package costs $0.36 per day for 0.5GB of database storage</li>
</ul>
<p>Check <a href=https://developers.google.com/appengine/docs/whatisgoogleappengine>this</a> link for more information on deployment of an app. </p>
<h2>Webhosting Wrap-up</h2>
<p>In comparison: FreeHostingNoAds.net provides easy-to-use and free hosting, but with file write restrictions. Both Amazon and Google App Engine have stronger storage restrictions, but more flexibility. Google App Engine also provides auto-scaling of instances to accommodate larger peak loads.</p>
<p>Thank you for reading this blogpost, hope it helps! <img src='http://ml.sun.ac.za/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/09/19/apace-maven-and-webhosting-services-comparisons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struggles with GPUs and Ubuntus</title>
		<link>http://ml.sun.ac.za/2014/07/31/struggles-with-gpus-and-ubuntus/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=struggles-with-gpus-and-ubuntus</link>
		<comments>http://ml.sun.ac.za/2014/07/31/struggles-with-gpus-and-ubuntus/#comments</comments>
		<pubDate>Thu, 31 Jul 2014 13:56:03 +0000</pubDate>
		<dc:creator>Ryno Fourie</dc:creator>
				<category><![CDATA[3D Technology]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5244</guid>
		<description><![CDATA[Over the last year or so I&#8217;ve been working on Ubuntu OSs, conducting my research and writing my thesis. While writing the thesis isn&#8217;t an issue when it comes to hardware technicalities, I cannot say the same for the coding side of my Master&#8217;s. My research primarily focuses on optimizing simulations based on cellular automata, [...]]]></description>
				<content:encoded><![CDATA[<p>Over the last year or so I&#8217;ve been working on Ubuntu OSs, conducting my research and writing my thesis. While writing the thesis isn&#8217;t an issue when it comes to hardware technicalities, I cannot say the same for the coding side of my Master&#8217;s.</p>
<p>My research primarily focuses on optimizing simulations based on cellular automata, and in order to do so, I&#8217;ve been utilizing NVIDIA GPUs. I started off using a laptop with a mobile-series GPU. What I did not know at the time of purchase was that Intel and NVIDIA had devised a strategy to save battery life. This strategy is known as Optimus, and essentially what it entails is that the more battery-intensive GPU is only utilized for heavy graphical processing and other forms of rendering. General usage reverts back to using the built-in CPU graphics processor which is less battery intensive. Although this strategy works perfectly fine (as far as I know) on Windows OSs, it does not really work all that well on Ubuntu. First off, if you decide to boot directly into Ubuntu when switching on the laptop, Ubuntu cannot establish proper low-end communication with the battery checker, and a strange glitch tends to occur 90% of the time&#8230; The GPU fan will spin at full speed, Ubuntu does not know how much battery life the laptop has left, and whether the laptop is plugged-in or not. The battery indicator LED will also constantly flash.</p>
<p>I did quite some research on this issue, and found two solutions. The one solution (tested by other people across the planet with the same problem as I had) installed an Optimus driver simulator (specifically developed for Ubuntu 12.04+), known as Bumblebee. However, when I discovered Bumblebee, it was still in its infancy and there were still a lot of issues reported, especially with later model GPUs, like the one I have.<br />
The other solution (which I stuck to) is a lot more simple, and it involves first booting into Windows, with the laptop <strong>not</strong> plugged-in, using a bit of battery, and then restarting and logging into Ubuntu. Luckily, I replaced the stock hard-drive with a solid-state hard-drive to speed-up boot-up times.</p>
<p>When I started learning CUDA later last year, I eventually had to get the GPU working, which meant that I would have to try and install drivers for the GPU. But this meant that I might have to try and install Bumblebee, because at that time I thought that I&#8217;d be using the GPU as the primary rendering device. How fortunate I was that this process of getting the GPU to &#8216;work&#8217; did not require me to hack the system. After I installed CUDA, Ubuntu was able to communicate with the GPU and send it request to perform work, without me having to use it as the primary rendering device.</p>
<p>Thus, I was able to learn and apply CUDA for my research. The GPU in my laptop is pretty much just a chunk of supercomputing power when I&#8217;m logged in on Ubuntu. But, it gets the job done.</p>
<p>More recently I decided to get a desktop system, with a desktop GPU (which are more powerful than their mobile counterparts), so that I can generate more data for my thesis. After acquiring the desktop system, the whole process of installing Ubuntu and installing GPU drivers had to be performed again. This time around I wasn&#8217;t really bothered (at first) since I wasn&#8217;t dealing with a system that uses Optimus. However, getting the GPU to work as I first intended it to do, turned out to be quite difficult&#8230;</p>
<p>The plan was to install the drivers and then use the GPU as the primary rendering device (and not the on-board GPU). Unfortunately, the driver that accompanies the latest release of CUDA doesn&#8217;t properly support the GPU that I decided to get, as well as the latest release of Ubuntu. It does allow me to communicate with the GPU, but NVIDIA X-Server does not start properly and thus the GPU cannot be used as the primary rendering device. So I had to revert to using the on-board GPU to display the goods. After a couple of days of persistence I did manage to set up a proper working environment.</p>
<p>So what I&#8217;ve learned over the last year or so is that, if you are interested in this line of research, i.e. using GPUs for general computation, make sure that the hardware you have at your disposal can be used as you have intended. If you are planning on purchasing new hardware, make sure that the operating system you intend to use, does have support for <strong>all</strong> of the hardware (yes you: graphics and networking) or that there are proper ways to getting your hardware to work. In terms of using something like CUDA, make sure that you are installing it on a supported operating system. And as far as you can, FOLLOW OFFICIAL INSTRUCTIONS when installing drivers and software on operating systems such as Ubuntu (and other Linux based operating systems). Finally, be persistent; that is what helped me to set up my working environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/07/31/struggles-with-gpus-and-ubuntus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sound Synthesis, an Overview</title>
		<link>http://ml.sun.ac.za/2014/07/25/sound-synthesis-an-overview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sound-synthesis-an-overview</link>
		<comments>http://ml.sun.ac.za/2014/07/25/sound-synthesis-an-overview/#comments</comments>
		<pubDate>Fri, 25 Jul 2014 12:52:27 +0000</pubDate>
		<dc:creator>Rynhardt Kruger</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[Procedural Content Generation]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5208</guid>
		<description><![CDATA[Often when I listen to game produced audio (either when playing an audio game, or looking over the shoulder of a sighted player), it struck me how sounds resulting from consecutive similar actions sound exactly the same. A good example of this is the sound of an opening door. In most games one can open [...]]]></description>
				<content:encoded><![CDATA[<p>Often when I listen to game produced audio (either when playing an audio game, or looking over the shoulder of a sighted player), it struck me how sounds resulting from consecutive similar actions sound exactly the same. A good example of this is the sound of an opening door. In most games one can open a door 10 times, and each time it will sound exactly like the other times. This effect can also be noticed with most musical keyboards, especially with the wind and string instruments. In real life the sound of an action is dependent on many factors, including the environment in which the action occurs, the velocity of the action, and whether a random cosmic disturbance took place that very moment. Some games try to simulate this variation by having more than 1 sound assigned to an action, playing a sound at random each time the action occurs. Pitch variation is also used by both games and musical keyboards to simulate differences in sound, but the observant listener will still detect the similarities.</p>
<p>This problem is do to the fact that sound effects are mostly produced by playing sound waves from storage. A possible alternative to this approach is to use sound synthesis for some action sounds. This will enable more variety in sound effects, and will also save storage space &#8212; which may be especially useful in a mobile setting. This was indeed the method employed on the early game consoles, when the sound chip consisted of nothing more than 3 tone generators and a noise generator. Some people may be concerned about the artificial nature of synthesized audio for sound effects, but it is important to remember that many sounds in both games and movies are already artificial. The classical &#8220;dish!&#8221; sound often employed during fist fights is one example. As any one who has ever witnessed a bar fight can attest, fists don&#8217;t sound that way in real life. This sound was traditionally produced by hitting the end of an empty toilet roll close to a microphone.</p>
<p>There exist a number of sound synthesis methods, each with it&#8217;s strengths and weaknesses. Additive sound synthesis works by the principal that all periodical wave forms can be produced by adding sine waves of different frequency&#8217;s and amplitudes together. This proved to be time consuming to do with hardware synthesizers, and hence this synthesis method went out of favor. This is however becoming more popular again as it is easy to do in code. A program demonstrating this synthesis method is Spear (www.klingbeil.com/spear/). Frequency modulation synthesis (FM synthesis) is another synthesis method that is similar to FM radio in principal. The most basic setup involves a carrier sine wave with a frequency determined by the amplitude of another sine wave called the modulator. More complex setups involve different wave shapes, or modulators chained together. FM synthesis can be used to create approximations of existing sounds and was used extensively in MIDI synthesis chips of early cellphones. Subtractive synthesis is yet another synthesis method by which an initial wave form is shaped by subtracting wave forms from it. It can for instance be used to generate the &#8220;dish!&#8221; sound by starting with white noise, subtracting all sound but a narrow frequency band, and applying an envelope to it (varying it&#8217;s amplitude over time to produce an attack at the beginning of the sound, and a fast decay towards the end).</p>
<p>Programming languages exist which are specifically designed for sound synthesis and the researching of synthesis methods. The oldest language still in use is the CSound language (www.csounds.com), which attempts to be the &#8220;C&#8221; of synthesis languages. The following is an example of CSound code &#8212; the definition of a basic FM synthesizer.</p>
<p>instr 1 ; start of an instrument definition<br />
amod oscils 300, 880, 0 ; modulator sine oscillator &#8212; arguments are amplitude, frequency, and phase<br />
acar oscils 10000, amod+440, 0 ; Carrier oscillator with frequency equal to 440 (A above middle C) added to modulator<br />
out acar ; send sound to output (sound card or file)<br />
endin ; end instrument definition</p>
<p>CSound contains over 1000 unit generators (routines that produce sound samples). Super Collider (supercollider.sf.net) is another synthesis language, but designed for real-time sound synthesis and live coding. Live coding involves writing code live as to produce sound while a sound performance is happening.</p>
<p>Sound synthesis can not replace all sound effects, many sounds are very hard to produce with current synthesis methods. It can, however, be used for many sound effects which are currently prerecorded and played from storage. It is especially suitable for sounds which are artificial by nature (the &#8220;dish!&#8221; mentioned above, or the sound of electric equipment). It can also be used to process recorded sound, as to add more variation in sound effects. I hope to see more sound synthesis being employed in the future, specifically in games.</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/07/25/sound-synthesis-an-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gestalt theory</title>
		<link>http://ml.sun.ac.za/2014/06/12/gestalt-theory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gestalt-theory</link>
		<comments>http://ml.sun.ac.za/2014/06/12/gestalt-theory/#comments</comments>
		<pubDate>Thu, 12 Jun 2014 09:20:18 +0000</pubDate>
		<dc:creator>jeanne-mariè loveday</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5164</guid>
		<description><![CDATA[&#8220;the whole is other than the sum of the parts&#8221; &#8211; kurt koffka this oft-used quote, by koffka, can be used to summarise gestalt theory in a single sentence. this theory deals with the fact that very often the &#8216;whole&#8217; that we experience/see/hear is not the same as merely dissecting something into pieces and adding [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><em>&#8220;the whole is other than the sum of the parts&#8221; &#8211; kurt koffka</em></p>
<p style="text-align: left;">this oft-used quote, by koffka, can be used to summarise gestalt theory in a single sentence. this theory deals with the fact that very often the &#8216;whole&#8217; that we experience/see/hear is not the same as merely dissecting something into pieces and adding them together. there are various ways in which we process input in such a way that we actually perceive more than is present, or perceive it differently. for example, consider the well-known image of a rubin vase in figure 1. this image is actually of a white vase on a black background, but sometimes it is perceived as two black profiles of faces on a white background.</p>
<div id="attachment_5167" class="wp-caption aligncenter" style="width: 208px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/rubin.jpg"><img class="size-full wp-image-5167" alt="figure 2: rubin vase" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/rubin.jpg" width="198" height="202" /></a>
<p class="wp-caption-text">figure 1: rubin vase</p>
</div>
<p>there are various principles that influence what we actually see in an image. some of these principles will be discussed below, but this is in no way an exhaustive list of the principles of gestalt theory. some of these principles are of greater influence than others and so can override the effects of another principle.</p>
<p><strong>law of simplicity</strong></p>
<p>this law, also known as the law of prägnanz or the law of good form, states that when we see a complex shape, we may perceive it as consisting of simpler components. an example of this can be seen in figure 2 and figure 3. the complex object given in figure 2 might easily be perceived as a triangle, circle and rectangle (as indicated in figure 3) instead of a the new whole complex object.</p>
<div id="attachment_5170" class="wp-caption aligncenter" style="width: 152px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/pragnanz_black.png"><img class=" wp-image-5170 " alt="figure 2: complex structure" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/pragnanz_black.png" width="142" height="138" /></a>
<p class="wp-caption-text">figure 2: complex structure</p>
</div>
<div id="attachment_5171" class="wp-caption aligncenter" style="width: 156px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/pragnanz_colour.png"><img class="wp-image-5171 " alt="figure 3: " src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/pragnanz_colour.png" width="146" height="141" /></a>
<p class="wp-caption-text">figure 3: simpler components</p>
</div>
<p>this fundamental aspect of gestalt theory can also be used to explain why we often see familiar shapes when looking at clouds. we want to perceive the most simplistic forms, and forms which we have previously encountered are familiar to us, and &#8216;less complex&#8217;.</p>
<p><strong><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/pragnanz_colour.png"><br />
</a>figure-ground </strong></p>
<p>the rubin vase, that can be seen in figure 1, is a good example how the figure-ground principle can cause us to stumble in our perception of what we are seeing. when looking at an image, the image is decomposed into a <em>figure</em> and <em>background</em>. for example, in figure 2 the complex object in black is seen as the <em>figure</em> and the surrounding white space is perceived as the <em>background</em>. on a white page with black print on it, the white is perceived as the background whereas the black print on it is perceived to be the <em>figure</em>. with images such as the rubin vase, however, whether the white space or the black space is seen as the figure, the perceived figure is an object that most of us will be familiar with us (a vase or a face). the edges separating the <em>figure</em> and <em>background</em> is often interpreted as belonging to the object. this aspect of gestalt theory can be used to explain why camouflage works so well. instead of being in contrast with the background, camouflage enables animals (or the wearer of camouflage clothing) to blend into the background by using the same colours, and possibly similar textures, as the background and in so doing  making it difficult to distinguish a <em>figure</em>, especially if no <em>figure</em> is expected.</p>
<p><strong>proximity</strong></p>
<p>proximity is defined as &#8220;nearness in space, time, or relationship&#8221;, by the oxford dictionary. understandably then, the proximity principle in gestalt theory states that objects which are near each other are considered to be together / part of one greater object. the objects which are near each other do not necessarily have to look alike for the proximity principle to take effect. for example, consider figure 4. even though the rectangles are all similar, and the circles are all similar, the perceived groupings are that there is one group at the top left, and another at the bottom right, both consisting of circles and rectangles.</p>
<div id="attachment_5178" class="wp-caption aligncenter" style="width: 310px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/proximity_close.png"><img class="size-medium wp-image-5178" alt="figure 4: proximity principle" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/proximity_close-300x222.png" width="300" height="222" /></a>
<p class="wp-caption-text">figure 4: proximity principle</p>
</div>
<p>&nbsp;</p>
<p><strong>similarity</strong></p>
<p>the similarity principle sates that objects that look similar will be perceived together. similarity can be in the areas of shape, size, orientation and colour. one example of this principle can be seen in figure 5. even though all the objects are rectangles of the same size, the black rectangles and blue rectangles may be perceived as two different groups.</p>
<div id="attachment_5179" class="wp-caption aligncenter" style="width: 210px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/similarity.png"><img class="size-full wp-image-5179" alt="figure 5: similarity principle" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/similarity.png" width="200" height="161" /></a>
<p class="wp-caption-text">figure 5: similarity principle</p>
</div>
<p>in figure 4 we saw that the perceived groupings of the objects were according to the distance the objects were apart, even though all the rectangles and all the circles were similar. it can be deduced, therefore, that the proximity principle is higher on the hierarchy of gestalt principles than the similarity principle.</p>
<p><strong>continuity</strong></p>
<p>oftentimes we perceive some lines to be continuous lines whereas they could also be defined as separate lines. for instance, consider the figure 6. the most likely perception of this figure would be that there are two dashed lines &#8211; one horizontal and one vertical &#8211; that intersect in the middle. the figure is not perceived as having 18 lines, or as 4 separate dashed lines that come together in the middle &#8211; both these interpretations can also be correct. the reason for this is the continuity principle, whereby, when shapes are aligned, they together form a larger whole. as another example of the continuity principle, consider figure 7. in figure 7, the lines in (a) will more likely be perceived as grouped as in (b) than in (c). the reason for this is again the alignment of the lines. when coming to the intersection, a choice has to be made regarding whether to continue with the same course or change direction. going in the same direction is more natural and thus we perceive the red and blue lines as in (b) more readily as that in (c).</p>
<div id="attachment_5181" class="wp-caption aligncenter" style="width: 192px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/Screen-Shot-2014-06-09-at-8.55.25-AM.png"><img class="size-full wp-image-5181" alt="figure 6: continuity principle" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/Screen-Shot-2014-06-09-at-8.55.25-AM.png" width="182" height="175" /></a>
<p class="wp-caption-text">figure 6: continuity principle</p>
</div>
<div id="attachment_5182" class="wp-caption aligncenter" style="width: 310px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/continuity_solid.png"><img class="size-medium wp-image-5182" alt="figure 7: continuity  " src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/continuity_solid-300x85.png" width="300" height="85" /></a>
<p class="wp-caption-text">figure 7: continuity</p>
</div>
<p><strong>closure</strong></p>
<p>the closure principle allows us to perceive &#8216;information&#8217; where there is none, and in so doing helps us recognise patterns/shapes which are suggested, but not explicitly drawn. consider, as an example, the logo of the world wildlife fund in figure 8. we immediately perceive a panda, though there are definitely lines missing to complete the entire panda. the closure principle is therefore similar to the simplicity principle in the effect that it has &#8211; it allows us to discern simpler objects than only what is seen. it differs from the simplicity principle in that here, instead of breaking up a large complex whole into smaller, simpler objects, the (sometimes disjoint) objects are seen as a whole.</p>
<div id="attachment_5165" class="wp-caption aligncenter" style="width: 214px"><a href="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/wwf-panda.png"><img class="size-medium wp-image-5165" alt="figure 8: closure" src="http://ml.sun.ac.za/wordpress/wp-content/uploads/2014/06/wwf-panda-204x300.png" width="204" height="300" /></a>
<p class="wp-caption-text">figure 8: closure</p>
</div>
<p>&nbsp;</p>
<p>these are but 6 of the principles of gestalt that influence how we perceive objects that we see. there are many more, such as symmetry, common fate, past experience, uniform connectedness, common regions, parallelism etc. for more information on these, see the list of references.</p>
<p><span style="text-decoration: underline;">list of references</span></p>
<p>1. m. soegaard, <em>gestalt principles of form perception, </em>interactive design foundation. http://bit.ly/1hJgGrY<br />
2. s. bradley, <em>design principles: visual perception and the principles of gestalt</em>, smashing magazine, march 2014, http://bit.ly/1kK31A8<br />
3. spokane falls community college, <em>the gestalt principles</em>. http://bit.ly/1oMAklo<br />
4. k. broom, <em>theory of visual perception. </em>http://bit.ly/1o4NQ7Q<br />
5. s. grais, <em>gestalt principles</em>. http://bit.ly/1o4NQ7Q<br />
6. d. todorovic, <em>gestalt principles. </em>scholarpedia, 2008 http://bit.ly/1kS5Pfy</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/06/12/gestalt-theory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Group-based cryptography</title>
		<link>http://ml.sun.ac.za/2014/05/23/group-based-cryptography/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=group-based-cryptography</link>
		<comments>http://ml.sun.ac.za/2014/05/23/group-based-cryptography/#comments</comments>
		<pubDate>Fri, 23 May 2014 14:28:39 +0000</pubDate>
		<dc:creator>Gerard Louw</dc:creator>
				<category><![CDATA[Conditional Access]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[group theory]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5086</guid>
		<description><![CDATA[In this blog post I will discuss the mathematical concept of a group, and I&#8217;ll give an example of an actual cryptosystem based on groups. I&#8217;ll try to keep the mathematical jargon to a minimum, and give illustrative examples where possible. Group theory 101 A group is a very general mathematical structure defined as follows. [...]]]></description>
				<content:encoded><![CDATA[<p>In this blog post I will discuss the mathematical concept of a group, and I&#8217;ll give an example of an actual cryptosystem based on groups. I&#8217;ll try to keep the mathematical jargon to a minimum, and give illustrative examples where possible.</p>
<h2>Group theory 101</h2>
<p>A group is a very general mathematical structure defined as follows. Let <em>G</em> be a set, and let • be a binary operation on <em>G</em>—basically a function which takes two elements of <em>G</em> and gives an element of <em>G</em> back, like addition or multiplication on the integers. We say that (<em>G</em>, •) is a <strong>group</strong> if the following conditions are satisfied:</p>
<ol>
<li>Associativity: For every <em>x</em>, <em>y</em> and <em>z</em> in <em>G</em>, (<em>x</em> • <em>y</em>) • <em>z</em> = <em>x</em> • (<em>y</em> • <em>z</em>).</li>
<li>Identity element: There is a unique <em>e</em> in <em>G</em> (called the identity element of <em>G</em>) such that for every <em>x</em> in <em>G</em>, <em>x</em> • <em>e</em> = <em>x</em>.</li>
<li>Inverse elements: For every <em>x</em> in <em>G</em>, there is a unique <em>y</em> in <em>G</em> (called the inverse of <em>x</em>) such that <em>x</em> • <em>y</em> = <em>e</em>.</li>
</ol>
<p>If I&#8217;ve lost you with all of the symbols and jargon, a concrete example might be illuminating. Consider the set of integers <strong>Z</strong> and the binary operation +. We know that if we add three integers together, it doesn&#8217;t matter which addition we do first. For example, if we&#8217;re computing 1 + 2 + 5, we could first compute 1 + 2 = 3 and then 3 + 5 = 8, or we could first compute 2 + 5 = 7 and then 1 + 7 = 8. This is associativity. The identity element is 0 (add it to any number and you get that number back), and so the inverse of any integer is simply its negative: 4 + (-4) = 0. We may conclude that (<strong>Z</strong>, +) is a group, since it satisfies all the group conditions. In fact, groups originated as an abstraction of numerical arithmetic.</p>
<p>Another example of a group, and one very important for cryptography, is the multiplicative group of integers modulo <em>p</em>, denoted (<strong>Z</strong>_<em>p</em>, ·). This is essentially the set of numbers {1, 2, …, <em>p</em> &#8211; 1} furnished with the usual · operation, but where the result &#8220;wraps around&#8221; if it is bigger than <em>p</em> &#8211; 1. For example, in <strong>Z</strong>_5 we would have 2 · 4 = 8 = 3 and 4 · 4 = 16 = 1. Associativity is inherited from the usual integer multiplication. The identity element is clearly 1. It is not clear why every element of <strong>Z</strong>_<em>p</em> has an inverse, but this is a standard result from elementary number theory. Using <strong>Z</strong>_5 as an example again, we see that 1 · 1 = 1, 2 · 3 = 6 = 1 and 4 · 4 = 1, so each element has an inverse.</p>
<p>Before continuing to the next section, we define exponentiation for groups. Let <em>G</em> be a group and let <em>x</em> be an element of <em>G</em>. We define <em>x</em>^<em>n</em> = <em>x</em> • <em>x</em> • … • <em>x</em> (<em>n</em> times) for any positive integer <em>n</em>. We extend this to all integers by letting <em>x</em>^0 = <em>e</em> and letting <em>x</em>^(-<em>n</em>) be the inverse of <em>x</em>^<em>n</em>. You may check that the familiar exponentiation laws then hold (i.e. <em>x</em>^<em>m</em> • <em>x</em>^<em>n</em> = <em>x</em>^(<em>m</em> + <em>n</em>) and (<em>x</em>^<em>m</em>)^<em>n</em> = <em>x</em>^(<em>m</em><em>n</em>)).</p>
<h2>The discrete logarithm problem</h2>
<p>Now that we have the basics of group theory down, we may define the <strong>discrete logarithm problem</strong> for groups, which reads as follows. Let <em>G</em> be a group with some element <em>x</em> and let <em>n</em> be an integer. Given the group elements <em>x</em> and <em>x</em>^<em>n</em>, determine the value of the exponent <em>n</em>. This is analogous to finding the logarithm to the base <em>x</em> of <em>x</em>^<em>n</em>. In the group <strong>Z</strong>, this is trivial: if you have <em>x</em> and <em>x</em>^<em>n</em> = <em>x</em> + <em>x</em> + … + <em>x</em> (<em>n</em> times) = <em>n</em><em>x</em>, then you can find <em>n</em> by simple division. However, in <strong>Z</strong>_<em>p</em>, the problem becomes harder. No polynomial-time algorithms are known for solving discrete logarithms in <strong>Z</strong>_<em>p</em> (but some sub-exponential algorithms are known). In other groups, the state-of-the-art algorithms can solve discrete logarithms only in exponential time.</p>
<h2>The Diffie-Hellman problem</h2>
<p>The <strong>Diffie-Hellman problem</strong> is a slightly easier version of the discrete logarithm problem defined as follows. Let <em>G</em> be a group with some element <em>x</em>, and let <em>m</em> and <em>n</em> be integers. Now given the group elements <em>x</em>, <em>x</em>^<em>m</em> and <em>x</em>^<em>n</em>, we wish to find <em>x</em>^(<em>m</em><em>n</em>). Clearly, if the discrete logarithm problem may be solved efficiently for <em>G</em>, then we may compute <em>m</em> and <em>n</em> efficiently, and thus compute <em>x</em>^(<em>m</em><em>n</em>). However, there might be some clever method of combining <em>x</em>^<em>m</em> and <em>x</em>^<em>n</em> to form <em>x</em>^(<em>m</em><em>n</em>) without first computing their exponents. This is why we say that Diffie-Hellman is an easier problem. For <strong>Z</strong>_<em>p</em>, no such method is known, as is true for many other groups, so that these two problems are actually equivalent in practice.</p>
<h2>The Diffie-Hellman key exchange</h2>
<p>We are now ready to define a group-based cryptosystem, called the <strong>Diffie-Hellman key exchange</strong>, which will be the conclusion of this post. Assume we have three parties: Alice, Bob and Eve. Alice and Bob wish to agree on some secret value, in such a way that if Eve were to eavesdrop on all of their communications, she would not be able to figure out what this value is. They will do so as follows. First, they agree on a very large group <em>G</em> in which the Diffie-Hellman problem is hard, and they pick some element <em>x</em> in <em>G</em>. Now, Alice computes a large random integer <em>a</em>, and Bob similarly computes <em>b</em>. They keep these values to themselves, but they tell each other the values of <em>x</em>^<em>a</em> and <em>x</em>^<em>b</em>. Now, Alice has the values <em>a</em> and <em>x</em>^<em>b</em> at her disposal, so she may compute (<em>x</em>^<em>b</em>)^<em>a</em> = <em>x</em>^(<em>a</em><em>b</em>). Similarly, Bob my compute <em>x</em>^(<em>a</em><em>b</em>) using <em>b</em> and <em>x</em>^<em>a</em>. Eve only knows the values of <em>x</em>, <em>x</em>^<em>a</em> and <em>x</em>^<em>b</em>. Should she wish to compute <em>x</em>^(<em>a</em><em>b</em>), she will have to solve the Diffie-Hellman problem, which we assumed to be hard in <em>G</em>. Thus, Alice and Bob have succeeded in agreeing on a secret value.</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/05/23/group-based-cryptography/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fairness in e-commerce, sport and food</title>
		<link>http://ml.sun.ac.za/2014/05/15/fairness-in-e-commerce-sport-and-food/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fairness-in-e-commerce-sport-and-food</link>
		<comments>http://ml.sun.ac.za/2014/05/15/fairness-in-e-commerce-sport-and-food/#comments</comments>
		<pubDate>Thu, 15 May 2014 20:05:31 +0000</pubDate>
		<dc:creator>Gerdus Benade</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[eCommerce]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://ml.sun.ac.za/?p=5076</guid>
		<description><![CDATA[The theme of fairness has come up in very different contexts since my reading recently shifted away from being strictly thesis-centered. Of course, life isn&#8217;t fair and what is perceived as fair differs from person to person. That said, I have often wondered whether greater fairness is a hallmark of a more sophisticated or merit-driven [...]]]></description>
				<content:encoded><![CDATA[<p>The theme of fairness has come up in very different contexts since my reading recently shifted away from being strictly thesis-centered. Of course, life isn&#8217;t fair and what is perceived as fair differs from person to person. That said, I have often wondered whether greater fairness is a hallmark of a more sophisticated or merit-driven society in the sense that hard work is more likely to be rewarded in such societies, while benefits based on, for example, sex, race or family ties may be harder to come by. The results I recently came across considered fairness in e-commerce, sports and food.</p>
<p><strong>In online marketplaces and ads</strong></p>
<p>I first heard about this when I had the opportunity to briefly chat with <a href="http://www.columbia.edu/~cs2035/">Cliff Stein</a> (perhaps best-known for <a href="http://en.wikipedia.org/wiki/Introduction_to_Algorithms">CLRS</a>) in March about his current research. One of the things they are looking at (as I understood it) considers a situation where an advertiser is provided with some sort of guarantee that it will be treated fairly over some period of time with regards to, say, the number of times its ads are displayed, compared to the ads of competitors. (Alternatively, advertisers may have the option of buying certain tiers of service, which imply that it will receive a certain amount of preference.) The complications in this case arise from the fact that different advertisers may have specified different keywords for their products and that it is not known how many further users will enter the system before the end of the time period. (A 2010 paper developing online algorithms along these lines may be found <a href="http://dl.acm.org/citation.cfm?id=1888957&amp;CFID=434586483&amp;CFTOKEN=37208111">here</a>.) A similar situation holds in online marketplaces, where a manufacturer/seller may be interested in the number of times its products are listed as one of the first three products returned by a search for certain keywords, with the additional consideration that users who quickly find relevant information are more likely to use a marketplace repeatedly, so satisfying promises to sellers must be balanced against showing users relevant search results.</p>
<p>In a recent talk at the lab, Stephan Ballot, head of product at <a href="http://www.olx.co.za/">OLX</a>, mentioned that they decided to display most recently listed ads first, while giving some preference to ads with pictures, as these lead to more sales. This solution attempts to elegantly sidestep many of the intricacies of the problem, yet the question remains whether it is &#8216;fair&#8217; to sellers that someone who posts their advertisement at 02:00 may never be listed among the top results due to the high number of ads posted every morning, while someone posting an identical ad at some other time of the day may be at the top of search results for quite some time.</p>
<p><strong>In determining cricket outcomes</strong></p>
<p>As all cricket followers known, the <a href="http://static.espncricinfo.com/db/ABOUT_CRICKET/RAIN_RULES/DUCKWORTH_LEWIS.html">Duckworth-Lewis method</a> of adjusting scores in rain-interrupted matches has been used since 1999. This method adjusts targets based on the amount of resources (measured in overs and wickets remaining) that the chasing team has left. The general consensus in the cricketing community seems to be that it does this fairly well, however, some questions arise whent these adjusted targets are used to determine the outcomes of matches (if you are ahead of the adjusted target when the game ends, you are declared the winner).</p>
<p>A paper by Bandulasiri entitled <a href="http://msme.us/2008-1-2.pdf">Predicting the winner in One Day International cricket</a> considered 105 uninterrupted ODIs and compared the Duckworth-Lewis predicted outcomes after 30 and 40 overs have been faced by the chasing side to the actual outcome. It found that after 30 overs D/L correctly predicted the outcome of the match only 36.27% of the time, while it predicted the correct winner after 40 overs 52.2% of the time.</p>
<p>Its slightly embarrassing that a game with 2.5 billion fans around the world will do better to decide rain-interrupted games by simply flipping a coin.</p>
<p><strong>In food (and many other things)</strong></p>
<p>I&#8217;ve long been a fan of the following technique of dividing a cake fairly: Make a cut from the centre of the cake to an edge. Assemble the interested parties. Slowly rotate a knife from the cut around the centre until a person shouts stop &#8211; cut the cake at that position and hand it to the person who stopped you. Repeat until there is no cake left. The wonderful thing about this technique is that everyone thinks everybody else received less than their fair share and that they themselves received a fair share of the cake. (In writing this piece I&#8217;ve found that this is called the Dubins-Spanier algorithm and that it guarantees every one of n people to receive a piece he/she values to be worth at 1/n of the whole.)</p>
<p>If anyone is particularly interested in the literature on cake cutting (which is larger than you&#8217;d think, since much of it generalises to the fair division of dividable resources, for example dividing the cost of pollution between nations) a recent survey <a href="http://dl.acm.org/citation.cfm?id=2483870&amp;CFID=434586483&amp;CFTOKEN=37208111">Cake cutting &#8211; not just child&#8217;s play</a> may be a good place to start.</p>
<p>I think fairness is one of those things which are broad enough to ensure that someone will always feel they are being treated unfairly. This should not prevent us from seeking provably fair policies in the application and design of technology, nor in everyday life.</p>
<p>Did you recently notice any results regarding fairness?</p>
]]></content:encoded>
			<wfw:commentRss>http://ml.sun.ac.za/2014/05/15/fairness-in-e-commerce-sport-and-food/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
