<?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>Chaoticity &#187; attribute</title>
	<atom:link href="http://chaoticity.com/tag/attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://chaoticity.com</link>
	<description>a state of things in which chance is supreme</description>
	<lastBuildDate>Mon, 23 Jan 2012 20:05:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Making a copy of WEKA Instances</title>
		<link>http://chaoticity.com/making-a-copy-of-weka-instances/</link>
		<comments>http://chaoticity.com/making-a-copy-of-weka-instances/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 21:54:09 +0000</pubDate>
		<dc:creator>awais</dc:creator>
				<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[chaos]]></category>
		<category><![CDATA[OpenWare]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[classification]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[instances]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[weka]]></category>

		<guid isPermaLink="false">http://chaoticity.com/making-a-copy-of-weka-instances/</guid>
		<description><![CDATA[This ‘thing’ took about 30 minutes to figure out. According to the WEKA documentation, if  you add a new Instance to an existing Instances object, String values are not transferred ! In case you are working on copying a dataset with a string attribute, you need to transfer the string manually. The code segment below [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share"><div style="width:100px;" class="really_simple_share_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fchaoticity.com%2Fmaking-a-copy-of-weka-instances%2F&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="width:110px;" class="really_simple_share_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Making a copy of WEKA Instances" data-url="http://chaoticity.com/making-a-copy-of-weka-instances/"></a> 
			</div></div>
		<div style="clear:both;"></div><p><a href="http://chaoticity.com/images/image11.png"><img style="display: inline; margin-left: 0px; margin-right: 0px; border-width: 0px;" title="image" src="http://chaoticity.com/images/image_thumb11.png" border="0" alt="image" width="128" height="149" align="right" /></a>This ‘thing’ took about 30 minutes to figure out. According to the <a href="http://weka.sourceforge.net/doc/weka/core/Instances.html#add(weka.core.Instance)">WEKA documentation</a>, if  you add a new Instance to an existing Instances object, <strong>String values are not transferred</strong> <strong>! </strong>In case you are working on copying a dataset with a string attribute, you need to transfer the string manually. The code segment below copies the i^th instance from source to dest where the first attribute (at index 0) is a string attribute.</p>
<p><code><br />
dest.add(source.instance(i));<br />
dest.instance(dest.numInstances()-1)<br />
    .setValue(0,source.instance(i).toString(0));<br />
</code></p>
<p>This should come in handy for text classification using WEKA (and hopefully save your time).</p>
]]></content:encoded>
			<wfw:commentRss>http://chaoticity.com/making-a-copy-of-weka-instances/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

