<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Ken Baldwin, Author at CenterSpace</title>
	<atom:link href="https://www.centerspace.net/author/baldwin/feed" rel="self" type="application/rss+xml" />
	<link>https://www.centerspace.net/author/baldwin</link>
	<description>.NET numerical class libraries</description>
	<lastBuildDate>Tue, 07 Feb 2023 21:32:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
<site xmlns="com-wordpress:feed-additions:1">104092929</site>	<item>
		<title>Announcing NMath 6.2 and NMath Stats 4.2</title>
		<link>https://www.centerspace.net/announcing-nmath-6-2-and-nmath-stats-4-2</link>
					<comments>https://www.centerspace.net/announcing-nmath-6-2-and-nmath-stats-4-2#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Mon, 07 Mar 2016 17:20:23 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Premium]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[C# Math Libraries]]></category>
		<category><![CDATA[C# NMath]]></category>
		<category><![CDATA[centerspace news]]></category>
		<category><![CDATA[VB NMath]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/?p=6938</guid>

					<description><![CDATA[<p>Centerspace Software is pleased to announce new versions of the NMath libraries - NMath 6.2, and NMath Stats 4.2.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-2-and-nmath-stats-4-2">Announcing NMath 6.2 and NMath Stats 4.2</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We&#8217;re pleased to announce new versions of the NMath libraries &#8211; NMath 6.2 and NMath Stats 4.2.</p>
<p>Added functionality includes:</p>
<ul>
<li>Upgraded to Intel MKL 11.3 Update 2 with resulting performance increases.</li>
<li>Updated NMath Premium GPU code to CUDA 7.5.</li>
<li>Added classes for performing <a href="/wavelet-transforms/">Discrete Wavelet Transforms (DWTs)</a> using most common wavelet families, including Harr, Daubechies, Symlet, Best Localized, and Coiflet.</li>
<li>Added classes for solving stiff ordinary differential equations. The algorithm uses higher order methods and smaller step size when the solution varies rapidly.</li>
<li>Added classes for performing two-way ANOVA with unbalanced designs.</li>
<li>Added classes for performing Partial Least Squares Discriminant Analysis (PLS-DA), a variant of PLS used when the response variable is categorical.</li>
</ul>
<p>For more complete changelogs, see:</p>
<ul>
<li><a href="/doc/NMath/changelog.txt">NMath changelog</a></li>
<li>NMath Stats changelog</li>
</ul>
<p>Upgrades are provided free of charge to customers with current annual maintenance contracts. To request an upgrade, please visit our <a href="/upgrades/">upgrade page</a>, or contact <a href="mailto:sales@centerspace.net">sales@centerspace.net</a>. Maintenance contracts are available through our <a href="/order/">webstore</a>.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-2-and-nmath-stats-4-2">Announcing NMath 6.2 and NMath Stats 4.2</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/announcing-nmath-6-2-and-nmath-stats-4-2/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6938</post-id>	</item>
		<item>
		<title>Announcing NMath 6.1 and NMath Stats 4.1</title>
		<link>https://www.centerspace.net/announcing-nmath-6-1-and-nmath-stats-4-1</link>
					<comments>https://www.centerspace.net/announcing-nmath-6-1-and-nmath-stats-4-1#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Thu, 30 Apr 2015 16:11:29 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Premium]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=5735</guid>

					<description><![CDATA[<p>Centerspace Software is pleased to announce new versions of the NMath libraries - NMath 6.1, and NMath Stats 4.1.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-1-and-nmath-stats-4-1">Announcing NMath 6.1 and NMath Stats 4.1</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We&#8217;re pleased to announce new versions of the NMath libraries &#8211; NMath 6.1, and NMath Stats 4.1.</p>
<p>Added functionality includes:</p>
<ul>
<li>Upgraded to Intel MKL 11.2 Update 2 with resulting performance increases.</li>
<li>Updated NMath Premium GPU code to CUDA 6.</li>
<li>Added classes for solving linear and nonlinear programming problems with integer or binary constraints.</li>
<li>Added class SpecialFunctions containing special functions such as factorial, binomial, the gamma function and related functions, Bessel functions, elliptic integrals, and many more. (Prior versions of a few of these functions, such as StatsFunctions.IncompleteGamma, are now deprecated.)</li>
<li>Added a new native library, nmath_sf_x86.dll and nmath_sf_x64.dll, with high-performance C language implementations of the special functions.</li>
<li>Added single-precision versions of general sparse matrix and vector types.</li>
</ul>
<p>For more complete changelogs, see <a href="https://www.centerspace.net/doc/NMath/changelog.txt">here</a> and here.</p>
<p>Upgrades are provided free of charge to customers with current annual maintenance contracts. To request an upgrade, please visit our <a href="/upgrades/">upgrade page</a>, or contact <a href="mailto:sales@centerspace.net">sales@centerspace.net</a>. Maintenance contracts are available through our <a href="https://www.centerspace.net/order/">webstore</a>.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-1-and-nmath-stats-4-1">Announcing NMath 6.1 and NMath Stats 4.1</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/announcing-nmath-6-1-and-nmath-stats-4-1/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5735</post-id>	</item>
		<item>
		<title>Announcing NMath 6.0 and NMath Stats 4.0</title>
		<link>https://www.centerspace.net/announcing-nmath-6-0-and-nmath-stats-4-0</link>
					<comments>https://www.centerspace.net/announcing-nmath-6-0-and-nmath-stats-4-0#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Tue, 19 Aug 2014 19:09:34 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Premium]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=5580</guid>

					<description><![CDATA[<p>Centerspace Software is pleased to announce new versions of the NMath libraries - NMath 6.0, and NMath Stats 4.0.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-0-and-nmath-stats-4-0">Announcing NMath 6.0 and NMath Stats 4.0</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We&#8217;re pleased to announce new versions of the NMath libraries &#8211; NMath 6.0, and NMath Stats 4.0.</p>
<p>Added functionality includes:</p>
<ul>
<li>Upgraded to Intel MKL 11.1 Update 3 with resulting performance increases.</li>
<li>Added Adaptive Bridge&#x2122; technology to NMath Premium edition, with support for multiple GPUs, per-thread control for binding threads to GPUs, and automatic performance tuning of individual CPU–GPU routing to insure optimal hardware usage.</li>
<li>NMath linear programming, nonlinear programming, and quadratic programming classes are now built on the Microsoft Solver Foundation (MSF). The Standard Edition of MSF is included with NMath.</li>
<li>Added classes for solving nonlinear programming problems using the Stochastic Hill Climbing algorithm, for solving quadratic programming problems using an interior point algorithm, and for solving constrained least squares problems using quadratic programming methods.</li>
<li>Added support for MKL Conditional Numerical Reproducibility (CNR).</li>
</ul>
<p>For more complete changelogs, see <a href="https://www.centerspace.net/doc/NMath/changelog.txt">here</a> and here.</p>
<p>Upgrades are provided free of charge to customers with current annual maintenance contracts. To request an upgrade, please contact <a href="mailto:sales@centerspace.net">sales@centerspace.net</a>. Maintenance contracts are available through our <a href="https://www.centerspace.net/order/">webstore</a>.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-6-0-and-nmath-stats-4-0">Announcing NMath 6.0 and NMath Stats 4.0</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/announcing-nmath-6-0-and-nmath-stats-4-0/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5580</post-id>	</item>
		<item>
		<title>Customer Story: Evolutionary Robotics Using NMath</title>
		<link>https://www.centerspace.net/customer-story-evolutionary-robotics-using-nmath</link>
					<comments>https://www.centerspace.net/customer-story-evolutionary-robotics-using-nmath#comments</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Mon, 14 Oct 2013 15:44:18 +0000</pubDate>
				<category><![CDATA[Case Studies]]></category>
		<category><![CDATA[Customer Stories]]></category>
		<category><![CDATA[NMath]]></category>
		<category><![CDATA[autonomous robotics]]></category>
		<category><![CDATA[evolutionary algorithms]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=4696</guid>

					<description><![CDATA[<p>We recently heard from NMath user Jaroslav Moravec of the Czech Technical University in Prague, the author of RobomapStudio, a smart tool designed to process data in the field of autonomous robotics and artificial intelligence. The program consists of more than 50 components for solving problems such as continual robot localization, global robot localization, and Simultaneous [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/customer-story-evolutionary-robotics-using-nmath">Customer Story: Evolutionary Robotics Using NMath</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We recently heard from NMath user Jaroslav Moravec of the Czech Technical University in Prague, the author of <a title="RobomapStudio" href="http://robomap.4fan.cz/" target="_blank">RobomapStudio</a>, a smart tool designed to process data in the field of autonomous robotics and artificial intelligence. The program consists of more than 50 components for solving problems such as continual robot localization, global robot localization, and <a href="https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping">Simultaneous Localization and Mapping</a> (SLAM).</p>
<p>Jaroslav says:</p>
<blockquote><p>I use NMath in RobomapStudio for <a href="https://en.wikipedia.org/wiki/Evolutionary_algorithm" target="_blank">evolutionary computations</a> and robot pose estimation for navigation in known and partially known environments using 2D laser data. My  <a href="https://en.wikipedia.org/wiki/CMA-ES" target="_blank">Covariance Matrix Adaptation Evolution Strategy</a> (CMAES) implementation is completely built on NMath. I also use NMath in a variety of other ways&#8211;for example, for various types of statistical distribution generating (Cauchy, Gauss etc.). NMath provides significantly better results (accuracy) and stability in comparison to the Iridium (Math.NET) library, for example. NMath is a great tool to solve, simply and easily, many numerical problems in MS VS C++/CLI .NET language.</p></blockquote>
<p>RobomapStudio is part of the international <a href="http://openslam.org/">OpenSLAM</a> project of the University of Freiburg. Results of the RobomapStudio are used in several research groups at the Czech Technical University in Prague (for example, <a href="http://ida.felk.cvut.cz/">here</a> and <a href="http://imr.ciirc.cvut.cz/">here</a>), and by many other research centers around the world.</p>
<p>For more information on Jaroslav&#8217;s work using NMath, see his <a href="http://link.springer.com/article/10.1007/s12065-013-0090-2">recent publication</a> in the journal Evolutionary Intelligence (Sept. 2013).</p>
<p>How are you using NMath? We&#8217;re always interested in hearing about interesting applications of NMath &#8220;in the wild,&#8221; and in receiving suggestions for how NMath can be improved. Let us know at <a href="mailto:info@centerspace.net">info@centerspace.net</a>.</p>
<p>Ken</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/customer-story-evolutionary-robotics-using-nmath">Customer Story: Evolutionary Robotics Using NMath</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/customer-story-evolutionary-robotics-using-nmath/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4696</post-id>	</item>
		<item>
		<title>Announcing NMath 5.3 and NMath Stats 3.6</title>
		<link>https://www.centerspace.net/announcing-nmath-5-3-and-nmath-stats-3-6</link>
					<comments>https://www.centerspace.net/announcing-nmath-5-3-and-nmath-stats-3-6#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Tue, 07 May 2013 15:47:02 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Premium]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=4294</guid>

					<description><![CDATA[<p>CenterSpace is proud to announce the immediate availability of new versions of our .NET math libraries, NMath 5.3 and NMath Stats 3.6. This release adds many new features and performance enhancements. Version 5.3 of NMath adds: IEnumerable&#60;T&#62; support for matrix classes, facilitating their use with LINQ. An in-place solve option for LU factorization. Improved support for NMath configuration within ASP.NET web [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-5-3-and-nmath-stats-3-6">Announcing NMath 5.3 and NMath Stats 3.6</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>CenterSpace is proud to announce the immediate availability of new versions of our .NET math libraries, <strong>NMath 5.3 </strong>and <strong>NMath Stats 3.6</strong>. This release adds many new features and performance enhancements.</p>
<p>Version 5.3 of <strong>NMath</strong> adds:</p>
<ul>
<li>IEnumerable&lt;T&gt; support for matrix classes, facilitating their use with LINQ.</li>
<li>An in-place solve option for LU factorization.</li>
<li>Improved support for NMath configuration within ASP.NET web applications.</li>
<li>Matrix and vector visualizers for debugging in Visual Studio 2012.</li>
<li>Performance increases in several areas, due to an upgrade to Intel MKL 11.0 Update 3.</li>
<li>Here is a complete <a href="https://www.centerspace.net/doc/NMath/changelog.txt">changelog</a>.</li>
</ul>
<p>Version 3.6 of <strong>NMath Stats</strong> adds:</p>
<ul>
<li>New <a href="https://www.centerspace.net/doc/NMath/user/logistic-regression.htm">LogisticRegression </a>and related classes for performing binomial logistic regression.</li>
<li>New classes for <a href="https://www.centerspace.net/doc/NMath/user/process-control.htm">process control statistics</a>, such as Cp, Cpm, Cp, Pp, and Ppk.</li>
<li>Here is a complete changelog.</li>
</ul>
<p><a href="/upgrades/">Upgrades</a> are provided free of charge to customers with current annual maintenance contracts. Maintenance contracts are available through our <a href="/order/">webstore</a>.</p>
<p>We will shortly also be announcing the general availability of the new <a href="https://www.centerspace.net/nmath-premium/">Premium Edition</a> of NMath and NMath Stats, which provides GPU acceleration of linear algebra (dense systems) and 1D and 2D FFT. We&#8217;ve gotten great feedback from users in our beta program, and are excited to make this option available to everyone. We think you will be too, when you see how easy it is to add GPU acceleration to your existing NMath applications. Check out our whitepaper, <a href="https://www.centerspace.net/doc/NMath/whitepapers/NMath.Premium.Benchmarks.pdf" target="_blank" rel="noopener">NMath Premium: GPU-Accelerated Math Libraries for .NET</a>, and watch this space for more information soon.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/announcing-nmath-5-3-and-nmath-stats-3-6">Announcing NMath 5.3 and NMath Stats 3.6</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/announcing-nmath-5-3-and-nmath-stats-3-6/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4294</post-id>	</item>
		<item>
		<title>Setting the NMath License Key</title>
		<link>https://www.centerspace.net/setting-the-nmath-license-key</link>
					<comments>https://www.centerspace.net/setting-the-nmath-license-key#comments</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Wed, 01 Aug 2012 19:46:51 +0000</pubDate>
				<category><![CDATA[CenterSpace]]></category>
		<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[license key]]></category>
		<category><![CDATA[licensing]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=4052</guid>

					<description><![CDATA[<p>NMath license information is stored in a license key which must be found at runtime. When you purchase one or more developer seats of NMath, you will be issued a license key describing the terms of your license. If no license key is found at runtime, a default evaluation license key is used which provides [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/setting-the-nmath-license-key">Setting the NMath License Key</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>NMath</strong> license information is stored in a license key which must be found at runtime. When you purchase one or more developer seats of <strong>NMath</strong>, you will be issued a license key describing the terms of your license.</p>
<p>If no license key is found at runtime, a default evaluation license key is used which provides a free 30-day evaluation period for <strong>NMath</strong> on the current machine.</p>
<p>Three mechanisms are supported for setting your <strong>NMath</strong> license key:</p>
<ul>
<li>by setting the <code>NMATH_LICENSE_KEY</code> environment variable</li>
<li>by setting the <code>NMathLicenseKey</code> configuration app setting</li>
<li>by programmatically setting the <code>LicenseKey</code> property on class <a href="https://www.centerspace.net/doc/NMathSuite/ref/html/T_CenterSpace_NMath_Core_NMathConfiguration.htm">NMathConfiguration</a></li>
</ul>
<p>Settings are applied in that order, and resetting the license key takes precedent over any earlier values. For example, here the environment variable is used:</p>
<pre class="code"> &gt; set NMATH_LICENSE_KEY="&lt;your key here&gt;"</pre>
<p>This code uses an app config file:</p>
<pre class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
  &lt;appSettings&gt;
    &lt;add key="NMathLicenseKey" value="<strong>&lt;your key here&gt;</strong>" /&gt;
  &lt;/appSettings&gt;
&lt;/configuration&gt;</pre>
<p>And this code accomplishes the same thing programmatically:</p>
<pre class="code">NMathConfiguration.LicenseKey = "<strong>&lt;your key here&gt;</strong>";</pre>
<p><strong>Note 1:</strong> Setting your license key works the same way for development and deployment machines.</p>
<p><strong>Note 2:</strong> If you forget to set your license key on a machine, your code <strong>NMath</strong> code will work initially, using the default evaluation license, but this license will expire in 30 days.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/setting-the-nmath-license-key">Setting the NMath License Key</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/setting-the-nmath-license-key/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4052</post-id>	</item>
		<item>
		<title>New Versions of NMath Libraries Released</title>
		<link>https://www.centerspace.net/new-versions-of-nmath-libraries-released-4</link>
					<comments>https://www.centerspace.net/new-versions-of-nmath-libraries-released-4#comments</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Fri, 20 Jul 2012 15:35:53 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[.NET math library]]></category>
		<category><![CDATA[C# math library]]></category>
		<category><![CDATA[F# math library]]></category>
		<category><![CDATA[new C# math library release]]></category>
		<category><![CDATA[new NMath release]]></category>
		<category><![CDATA[new NMath Stats release]]></category>
		<category><![CDATA[VB math library]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=3943</guid>

					<description><![CDATA[<p>CenterSpace is proud to announce the immediate availability of new versions of our .NET math libraries, NMath 5.2 and NMath Stats 3.5. This release adds many new features and performance enhancements.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/new-versions-of-nmath-libraries-released-4">New Versions of NMath Libraries Released</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>CenterSpace is proud to announce the immediate availability of new versions of our .NET math libraries, <strong>NMath 5.2</strong> and <strong>NMath Stats 3.5</strong>. This release adds many new features and performance enhancements.</p>
<p>Changes for version 5.2 of <strong>NMath</strong> include:</p>
<ul>
<li>Upgraded to Intel MKL 10.3 Update 11 with resulting performance increases.</li>
<li>Added class <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_NMathConfiguration.htm">NMathConfiguration</a> for controlling the loading of the <strong>NMath</strong><br />
license key, kernel assembly, and native library. Logging can be enabled for debugging configuration issues.<br />
<span style="color: red;">License files are no longer used. See <a href=" https://www.centerspace.net/nmath-configuration/">here</a> for more information.</span></li>
<li><a href="https://www.centerspace.net/nmath-api-updated-with-net-func-delegates/">Replaced all custom <strong>NMath</strong> delegate types in the API with <code>Func</code> or <code>Action</code><br />
equivalents</a>, and deprecated the older signatures.</li>
<li>Added support for postive and negative strided signals in all FFT classes.</li>
</ul>
<p>A complete changelog is located <a href="https://www.centerspace.net/doc/NMath/changelog.txt">here</a>.</p>
<p>Version 3.5 of <strong>NMath Stats</strong> adds:</p>
<ul>
<li>Classes <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_DoubleFactorAnalysis_2.htm">DoubleFactorAnalysis</a>, <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_FactorAnalysisCorrelation_2.htm">FactorAnalysisCorrelation</a>, <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_FactorAnalysisCovariance_2.htm">FactorAnalysisCovariance</a>, and supporting types for performing factor analysis.</li>
<li>Class <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_OneSampleAndersonDarlingTest.htm">OneSampleAndersonDarlingTest</a> for performing an Anderson-Darling test of the distribution of one sample.</li>
<li>Class <a href="https://www.centerspace.net/doc/NMath/ref/html/T_CenterSpace_NMath_Core_ShapiroWilkTest.htm">ShapiroWilkTest</a> for testing the null hypothesis that a sample comes from a normally distributed population.</li>
<li>Method <a href="https://www.centerspace.net/doc/NMath/ref/html/Overload_CenterSpace_NMath_Core_NMathFunctions_FishersExactTest.htm">NMathFunctions.FishersExactTest()</a> for computing the Fisher&#8217;s Exact Test p-value for a specified 2 x 2 contingency table.</li>
</ul>
<p>A complete changelog is located here.</p>
<p>The new release is build-compatible with the prior release. Upgrades are provided free of charge to customers with current annual maintenance contracts. Maintenance contracts are available through our <a href="/order/">webstore</a>.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/new-versions-of-nmath-libraries-released-4">New Versions of NMath Libraries Released</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/new-versions-of-nmath-libraries-released-4/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3943</post-id>	</item>
		<item>
		<title>NMath Configuration</title>
		<link>https://www.centerspace.net/nmath-configuration</link>
					<comments>https://www.centerspace.net/nmath-configuration#comments</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Fri, 20 Jul 2012 15:35:10 +0000</pubDate>
				<category><![CDATA[CenterSpace]]></category>
		<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[.NET math library]]></category>
		<category><![CDATA[C# math library]]></category>
		<category><![CDATA[F# math library]]></category>
		<category><![CDATA[new C# math library release]]></category>
		<category><![CDATA[new NMath release]]></category>
		<category><![CDATA[new NMath Stats release]]></category>
		<category><![CDATA[NMath configuration]]></category>
		<category><![CDATA[VB math library]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=3946</guid>

					<description><![CDATA[<p>Beginning with the release of NMath 5.2 and NMath Stats 3.5, NMath includes a new configuration system for controlling the loading of the NMath license key, kernel assembly, and native library. Based on customer feedback, we've designed this system to provide greater flexibility and security at deployment, and greater convenience in group development environments. We've also added optional logging to help debug configuration issues.</p>
<p>An NMath license file is no longer used.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/nmath-configuration">NMath Configuration</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Beginning with the <a href="/new-versions-of-nmath-libraries-released-4/">release of NMath 5.2 and NMath Stats 3.5</a>, <strong>NMath</strong> includes a new configuration system for controlling the loading of the <strong>NMath</strong> license key, kernel assembly, and native library. Based on customer feedback, we&#8217;ve designed this system to provide greater flexibility and security at deployment, and greater convenience in group development environments. We&#8217;ve also added optional logging to help debug configuration issues.</p>
<p><span style="color: red;">An NMath license file is no longer used.</span></p>
<h3>NMath License Key</h3>
<p><strong>NMath</strong> license information is stored in a license key which must be found at runtime. The license key governs the properties of your <strong>NMath</strong> installation. If no license key is found, a default evaluation license key is used which provides a free 30-day evaluation period for <strong>NMath</strong> on the current machine.</p>
<p>When you purchase one or more developer seats of <strong>NMath</strong>, you will be issued a license key describing the terms of your license. To enter your license key:</p>
<ol>
<li>Open <strong>CenterSpace Software | License NMath</strong> from your <strong>Start</strong> menu.</li>
<li>Enter your name, email, and license key, and click <strong>OK</strong>.</li>
</ol>
<p>The license key will be written to the registry. You can also specify your license key using various other mechanisms: by environment variable, by configuration app setting, and programmatically. These mechanisms may be preferable in group development environments, and at deployment. (See below.)</p>
<h3>NMath Configuration</h3>
<p>NMath configuration settings govern the loading of the <strong>NMath</strong> license key, kernel assembly, and native library. Property values can be set three ways:</p>
<ul>
<li>by environment variable</li>
<li>by configuration app setting</li>
<li>by programmatically setting properties on class <a href="https://www.centerspace.net/doc/NMathSuite/ref/html/T_CenterSpace_NMath_Core_NMathConfiguration.htm">NMathConfiguration</a></li>
</ul>
<p>Settings are applied in that order, and resetting a property takes precedent over any earlier values. For example, here an environment variable is used:</p>
<pre lang="csharp"> > set NMATH_NATIVE_LOCATION="C:\tmp"</pre>
<p>This code uses an app config file:</p>
<pre class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
  &lt;appSettings&gt;
    &lt;add key="NMathNativeLocation" value="C:\tmp" /&gt;
  &lt;/appSettings&gt;
&lt;/configuration&gt;
</pre>
<p>And this code accomplishes the same thing programmatically:</p>
<pre lang="csharp" line="1">NMathConfiguration.NativeLocation = @"C:\tmp";</pre>
<p>Also, all paths can be specified relative to the executable.  So to place the natives in an existing directory named <i>resources</i> adjacent to the executable one would<br />
write:</p>
<pre lang="csharp" line="1">NMathConfiguration.NativeLocation = @"..\resources";</pre>
<p>The supported environment variables, configuration app setting keys, and property names are show below.</p>
<pre class="code">
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<th>Environment Variable</th>
<th>Configuration Setting</th>
<th>Property</th>
</tr>
<tr>
<td><code>NMATH_LOG_LOCATION</code></td>
<td><code>NMathLogLocation</code></td>
<td><code>LogLocation</code></td>
</tr>
<tr>
<td><code>NMATH_LICENSE_KEY</code></td>
<td><code>NMathLicenseKey</code></td>
<td><code>LicenseKey</code></td>
</tr>
<tr>
<td><code>NMATH_NATIVE_LOCATION</code></td>
<td><code>NMathNativeLocation</code></td>
<td><code>NativeLocation</code></td>
</tr>
<tr>
<td><code>NMATH_USE_SEQUENTIAL_THREADING</code></td>
<td><code>NMathUseSequentialThreading</code></td>
<td><code>UseSequentialThreading</code></td>
</tr>
<tr>
<td><code>NMATH_USE_EXTERNAL_THREADING</code></td>
<td><code>NMathUseExternalThreading</code></td>
<td><code>UseExternalThreading</code></td>
</tr>
</tbody>
</table></pre>
<p>NOTE- Assembly loading and license checking is normally performed the first time you make an <strong>NMath</strong> call. If you wish to explicitly control when these operations occur&#8211;at application start-up, for example&#8211;use the static <a href="https://www.centerspace.net/doc/NMathSuite/ref/html/M_CenterSpace_NMath_Core_NMathConfiguration_Init.htm">NMathConfiguration.Init()</a> method.</p>
<p>For example, when using Mono on a Mac, to configured NMath with a sequentially threaded library set the environmental variable as follows.</p>
<pre lang="csharp"> > export NMATH_USE_SEQUENTIAL_THREADING="True" </pre>
<p><strong>Logging</strong></p>
<p>To debug configuration issues, specify a log file location. For example, setting the property programmatically to place the NMath log file in the same directory as the executable one would write:</p>
<pre lang="csharp" line="1">NMathConfiguration.LogLocation = @".";</pre>
<p>Or if you prefer to use a global temporary directory you could specify an absolute path.</p>
<pre lang="csharp" line="1">NMathConfiguration.LogLocation = @"C:\temp\logs";</pre>
<p>This creates a file named <code>NMathConfiguration.log</code> at the specified location containing log output. <i>The specified location must exist</i>. To turn off logging, set the log location to null.</p>
<p><strong>License Key</strong></p>
<p>You can specify your <strong>NMath</strong> license key using the <code>LicenseKey</code> property, or the equivalent environment variable or app config setting. If so, any keys in the registry are ignored.</p>
<p><strong>Native Location</strong></p>
<p>The NMath native assembly must be found at runtime. Failure to locate this file is one of the most common configuration issues, especially in deployment. The search order is determined by your <code>PATH</code> (on Windows systems). Some standard locations are automatically prepended to your (process-specific) <code>PATH</code>. You can also use the <code>NativeLocation</code> property, or the equivalent environment variable or app config setting, to prepend another location.</p>
<p><strong>Alternative Kernel and Native Assemblies</strong></p>
<p>The names of the <strong>NMath</strong> kernel and native assemblies are determined by your platform (x86 or x64), and the values of the <code>UseSequentialThreading</code> and <code>UseExternalThreading</code> properties, as shown below:</p>
<pre class="code">Standard
     Kernel
          NMathKernelx86.dll
          NMathKernelx64.dll
     Native
          nmath_native_x86.dll
          nmath_native_x64.dll

Sequentially-Threaded
     Kernel
          NMathKernelx86Sequential.dll
          NMathKernelx64Sequential.dll
     Native
          nmath_native_x86_seq.dll
          nmath_native_x64_seq.dll

Externally-Threaded
     Kernel
          NMathKernelx86External.dll
          NMathKernelx64External.dll
     Native
          nmath_native_x86_ext.dll
          nmath_native_x64_ext.dll</pre>
<p>Sequentially-threaded and externally-threaded kernel and native assemblies are available upon request from CenterSpace Software:</p>
<ul>
<li><strong>Sequentially-Threaded: </strong> MKL contains highly optimized, extensively threaded math routines. In rare cases, these can cause conflicts between the Intel OMP threading library (<code>libiomp.dll</code>) and the .NET threading model. If your .NET application is itself highly multi-threaded, you may wish to use the sequentially-threaded version of MKL.</li>
<li><strong>Externally-Threaded:</strong> <strong>NMath</strong> normally statically links in the Intel OMP threading library described above. Sometimes this can cause collisions with libraries from other vendors that also use OMP. The externally-threaded version of <code>NMath</code> dynamically-links in OMP.</li>
</ul>
<p>To trigger loading of these assemblies, use properties <code>UseSequentialThreading</code> and <code>UseExternalThreading</code> on class <a href="https://www.centerspace.net/doc/NMathSuite/ref/html/T_CenterSpace_NMath_Core_NMathConfiguration.htm">NMathConfiguration</a>, or the equivalent environment variables or app config settings. Both properties default to <code>false</code>.</p>
<p><code>UseSequentialThreading</code> and <code>UseExternalThreading</code> are mutually exclusive, and <code>UseSequentialThreading</code> takes precedence; <code>UseExternalThreading</code> only has an effect if <code>UseSequentialThreading</code> is <code>false</code>.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/nmath-configuration">NMath Configuration</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/nmath-configuration/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3946</post-id>	</item>
		<item>
		<title>Distribution Fitting Demo</title>
		<link>https://www.centerspace.net/distribution-fitting-demo</link>
					<comments>https://www.centerspace.net/distribution-fitting-demo#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Mon, 09 Apr 2012 14:49:02 +0000</pubDate>
				<category><![CDATA[NMath Tutorial]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[CDF C#]]></category>
		<category><![CDATA[gaussian distribution]]></category>
		<category><![CDATA[nonlinear least squares]]></category>
		<category><![CDATA[normal distribution]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PDF C#]]></category>
		<category><![CDATA[probability distribution]]></category>
		<category><![CDATA[Trust Region minimization]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=3719</guid>

					<description><![CDATA[<p><img class="excerpt" title="Distribution Fit" src="https://www.centerspace.net/blog/wp-content/uploads/2012/04/distribution_fit_pdf.png" alt="Distribution Fit" /><br />
A customer recently asked how to fit a normal (Gaussian) distribution to a vector of experimental data. Here's a demonstration of how to do it.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/distribution-fitting-demo">Distribution Fitting Demo</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A customer recently asked how to fit a normal (Gaussian) distribution to a vector of experimental data. Here&#8217;s a demonstration of how to do it.</p>
<p>Let&#8217;s start by creating a data set: 100 values drawn from a normal distribution with known parameters (mean = 0.5, variance = 2.0).</p>
<pre lang="csharp">int n = 100;
double mean = .5;
double variance = 2.0;
var data = new DoubleVector( n, new RandGenNormal( mean, variance ) );</pre>
<p>Now, compute y values based on the empirical cumulative distribution function (CDF), which returns the probability that a random variable X will have a value less than or equal to x&#8211;that is, f(x) = P(X &lt;= x). Here&#8217;s an easy way to do, although not necessarily the most efficient for larger data sets:</p>
<pre lang="csharp">var cdfY = new DoubleVector( data.Length );
var sorted = NMathFunctions.Sort( data );
for ( int i = 0; i &lt; data.Length; i++ )
{
  int j = 0;
  while ( j &lt; sorted.Length &amp;&amp; sorted[j] &lt;= data[i] ) j++;
  cdfY[i] = j / (double)data.Length;
}</pre>
<p>The data is sorted, then for each value x in the data, we iterate through the sorted vector looking for the first value that is greater than x.</p>
<p>We&#8217;ll use one of NMath&#8217;s non-linear least squares minimization routines to fit a normal distribution CDF() function to our empirical CDF. NMath provides classes for fitting generalized one variable functions to a set of points. In the space of the function parameters, beginning at a specified starting point, these classes finds a minimum (possibly local) in the sum of the squared residuals with respect to a set of data points.</p>
<p>A one variable function takes a single double x, and returns a double y:</p>
<pre class="code">y = f(x)</pre>
<p>A <em>generalized</em> one variable function additionally takes a set of parameters, p, which may appear in the function expression in arbitrary ways:</p>
<pre class="code">y = f(p1, p2,..., pn; x)</pre>
<p>For example, this code computes y=a*sin(b*x + c):</p>
<pre lang="csharp">public double MyGeneralizedFunction( DoubleVector p, double x )
{
  return p[0] * Math.Sin( p[1] * x + p[2] );
}</pre>
<p>In the distribution fitting example, we want to define a parameterized function delegate that returns CDF(x) for the distribution described by the given parameters (mean, variance):</p>
<pre lang="csharp">Func<doublevector, double,="" double=""> f =
  ( DoubleVector p, double x ) =&gt;
    new NormalDistribution( p[0], p[1] ).CDF( x );</doublevector,></pre>
<p>Now that we have our data and the function we want to fit, we can apply the curve fitting routine. We&#8217;ll use a bounded function fitter, because the variance of the fitted normal distribution must be constrained to be greater than 0.</p>
<pre lang="csharp">var fitter = new BoundedOneVariableFunctionFitter<trustregionminimizer>( f );
var start = new DoubleVector( new double[] { 0.1, 0.1 } );
var lowerBounds = new DoubleVector( new double[] { Double.MinValue, 0 } );
var upperBounds = 
   new DoubleVector( new double[] { Double.MaxValue, Double.MaxValue } );
var solution = fitter.Fit( data, cdfY, start, lowerBounds, upperBounds );
var fit = new NormalDistribution( solution[0], solution[1] );

Console.WriteLine( "Fitted distribution:\nmean={0}\nvariance={1}",
  fit.Mean, fit.Variance );</trustregionminimizer></pre>
<p>The output for one run is</p>
<pre class="code">Fitted distribution: 
mean=0.567334190790594
variance=2.0361207956132</pre>
<p>which is a reasonable approximation to the original distribution (given 100 points).</p>
<p>We can also visually inspect the fit by plotting the original data and the CDF() function of the fitted distribution.</p>
<pre lang="csharp">ToChart( data, cdfY, SeriesChartType.Point, fit,
  NMathStatsChart.DistributionFunction.CDF );

private static void ToChart( DoubleVector x, DoubleVector y,
  SeriesChartType dataChartType, NormalDistribution dist,
  NMathStatsChart.DistributionFunction distFunction )
{
  var chart = NMathStatsChart.ToChart( dist, distFunction );
  chart.Series[0].Name = "Fit";

  var series = new Series() {
    Name = "Data",
    ChartType = dataChartType
  };
  series.Points.DataBindXY( x, y );
  chart.Series.Insert( 0, series );

  chart.Legends.Add( new Legend() );
  NMathChart.Show( chart );
}</pre>
<p><a href="https://www.centerspace.net/blog/wp-content/uploads/2012/04/distribution_fit_cdf.png"><img decoding="async" class="aligncenter size-full wp-image-3727" title="distribution_fit_cdf" src="https://www.centerspace.net/blog/wp-content/uploads/2012/04/distribution_fit_cdf.png" alt="CDF() of fitted distribution" width="482" height="488" srcset="https://www.centerspace.net/wp-content/uploads/2012/04/distribution_fit_cdf.png 482w, https://www.centerspace.net/wp-content/uploads/2012/04/distribution_fit_cdf-296x300.png 296w" sizes="(max-width: 482px) 100vw, 482px" /></a></p>
<p>We can also look at the probability density function (PDF) of the fitted distribution, but to do so we must first construct an empirical PDF using a histogram. The x-values are the midpoints of the histogram bins, and the y-values are the histogram counts converted to probabilities, scaled to integrate to 1.</p>
<pre lang="csharp">int numBins = 10;
var hist = new Histogram( numBins, data );

var pdfX = new DoubleVector( hist.NumBins );
var pdfY = new DoubleVector( hist.NumBins );
for ( int i = 0; i &lt; hist.NumBins; i++ )
{
  // use bin midpoint for x value
  Interval bin = hist.Bins[i];
  pdfX[i] = ( bin.Min + bin.Max ) / 2;

   // convert histogram count to probability for y value
   double binWidth = bin.Max - bin.Min;
   pdfY[i] = hist.Count( i ) / ( data.Length * binWidth );
}

ToChart( pdfX, pdfY, SeriesChartType.Column, fit,
  NMathStatsChart.DistributionFunction.PDF );</pre>
<p><a href="https://www.centerspace.net/blog/wp-content/uploads/2012/04/distribution_fit_pdf.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-3728" title="distribution_fit_pdf" src="https://www.centerspace.net/blog/wp-content/uploads/2012/04/distribution_fit_pdf.png" alt="PDF() of fitted distribution" width="485" height="484" srcset="https://www.centerspace.net/wp-content/uploads/2012/04/distribution_fit_pdf.png 485w, https://www.centerspace.net/wp-content/uploads/2012/04/distribution_fit_pdf-150x150.png 150w, https://www.centerspace.net/wp-content/uploads/2012/04/distribution_fit_pdf-300x300.png 300w" sizes="(max-width: 485px) 100vw, 485px" /></a></p>
<p>You might be tempted to try to fit a distribution PDF() function directly to the histogram data, rather than using the CDF() function like we did above, but this is problematic for several reasons. The bin counts have different variability than the original data. They also have a fixed sum, so they are not independent measurements. Also, for continuous data, fitting a model based on aggregated histogram counts, rather than the original data, throws away information.</p>
<p>Ken</p>
<p>Download the <a href="https://drive.google.com/open?id=1KlctDEKniD8SdmQiBGmcrJWMuhvU-WYP">source code</a></p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/distribution-fitting-demo">Distribution Fitting Demo</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/distribution-fitting-demo/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3719</post-id>	</item>
		<item>
		<title>The Importance of Graphing Your Data</title>
		<link>https://www.centerspace.net/the-importance-of-graphing-your-data</link>
					<comments>https://www.centerspace.net/the-importance-of-graphing-your-data#respond</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Tue, 13 Dec 2011 17:28:10 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Stats]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[.NET charting]]></category>
		<category><![CDATA[.NET plotting]]></category>
		<category><![CDATA[C# charts]]></category>
		<category><![CDATA[C# ploting]]></category>
		<category><![CDATA[Chart Controls for .NET]]></category>
		<category><![CDATA[F# charts]]></category>
		<category><![CDATA[VB.NET charts]]></category>
		<category><![CDATA[VB.NET plotting]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=3639</guid>

					<description><![CDATA[<p><img class="excerpt" title="Anscombe's Quartet" src="https://www.centerspace.net/blog/wp-content/uploads/2011/12/anscombe2.png" alt="Anscombe's Quartet" /><br />
In his classic book <em>The Visual Display of Quantitative Information</em>, Edward R. Tufte argued that "graphics can be more precise and revealing than conventional statistical computations".  As an example, he described <a href="http://en.wikipedia.org/wiki/Anscombe%27s_quartet">Anscombe's Quartet</a>--four datasets that have identical simple statistical properties, yet appear very different when graphed.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/the-importance-of-graphing-your-data">The Importance of Graphing Your Data</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In his classic book <em>The Visual Display of Quantitative Information</em>, Edward R. Tufte argued that &#8220;graphics can be more precise and revealing than conventional statistical computations&#8221;. As an example, he described <a href="https://en.wikipedia.org/wiki/Anscombe%27s_quartet">Anscombe&#8217;s Quartet</a>&#8211;four datasets that have identical simple statistical properties, yet appear very different when graphed.<br />
<a href="https://www.centerspace.net/blog/wp-content/uploads/2011/12/anscombe2.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-3655" title="Anscombe's Quartet" src="https://www.centerspace.net/blog/wp-content/uploads/2011/12/anscombe2.png" alt="Anscombe's Quartet" width="451" height="283" srcset="https://www.centerspace.net/wp-content/uploads/2011/12/anscombe2.png 451w, https://www.centerspace.net/wp-content/uploads/2011/12/anscombe2-300x188.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></a><br />
These data sets&#8211;each consisting of 11 x,y points&#8211;were constructed by statistician Francis Anscombe in 1973.</p>
<p>As <a href="https://www.centerspace.net/nmath-charts-in-wpf/">previously described</a>, <strong>NMath 5.1</strong> and <strong>NMath Stats 3.4</strong> include classes for plotting NMath types using the Microsoft Chart Controls for .NET. (<a href="/nmath-integration-with-essential-chart/">Free adapter code</a> is also available for using NMath with Syncfusion Essential Chart.) Let&#8217;s use Anscombe&#8217;s data to explore how NMath&#8217;s new visualization capabilities can be used to reveal the differences in the data sets.</p>
<p>First, we&#8217;ll load the data into a <strong>DoubleMatrix</strong>.</p>
<pre lang="csharp">DoubleMatrix A = new DoubleMatrix( @"11x8 [
  10.0 8.04  10.0 9.14 10.0 7.46  8.0  6.58
  8.0  6.95  8.0  8.14 8.0  6.77  8.0  5.76
  13.0 7.58  13.0 8.74 13.0 12.74 8.0  7.71
  9.0  8.81  9.0  8.77 9.0  7.11  8.0  8.84
  11.0 8.33  11.0 9.26 11.0 7.81  8.0  8.47
  14.0 9.96  14.0 8.10 14.0 8.84  8.0  7.04
  6.0  7.24  6.0  6.13 6.0  6.08  8.0  5.25
  4.0  4.26  4.0  3.10 4.0  5.39  19.0 12.50
  12.0 10.84 12.0 9.13 12.0 8.15  8.0  5.56
  7.0  4.82  7.0  7.26 7.0  6.42  8.0  7.91
  5.0  5.68  5.0  4.74 5.0  5.73  8.0  6.89 ]" );</pre>
<p>Now let&#8217;s perform some simple descriptive statistics.</p>
<pre lang="csharp"> int groups = 4;
 Slice rows = Slice.All;
 Slice xCols = new Slice( 0, groups, 2 );
 Slice yCols = new Slice( 1, groups, 2 );
 double unbiased = (double)A.Rows / ( A.Rows - 1 );

 Console.WriteLine( "Mean of x: {0}",
   NMathFunctions.Mean( A[ rows, xCols ] ) );
 Console.WriteLine( "Variance of x: {0}",
   NMathFunctions.Variance( A[rows, xCols] ) * unbiased );
 Console.WriteLine( "Mean of y: {0}",
   NMathFunctions.Round( NMathFunctions.Mean( A[rows, yCols] ), 2 ) );
 Console.WriteLine( "Variance of y: {0}",
   NMathFunctions.Round(
     NMathFunctions.Variance( A[rows, yCols] ) * unbiased, 3 ) );

 Console.Write( "Correlation of x-y: " );
 for (int i = 0; i < A.Cols; i += 2 )
 {
   Console.Write( NMathFunctions.Round(
    StatsFunctions.Correlation( A.Col(i), A.Col(i + 1) ), 3 ) + " " );
 }
 Console.WriteLine();</pre>
<p>You can see from the output that the statistics are nearly identical for all four data sets:</p>
<pre class="code">Mean of x: [ 9 9 9 9 ]
Variance of x: [ 11 11 11 11 ]
Mean of y: [ 7.5 7.5 7.5 7.5 ]
Variance of y: [ 4.127 4.128 4.123 4.123 ]
Correlation of x-y: 0.816 0.816 0.816 0.817</pre>
<p>Now let's fit a linear model to each data set.</p>
<pre lang="csharp"> LinearRegression[] lrs = new LinearRegression[groups];

 for( int i = 0; i < groups; i ++ )
 {
   Console.WriteLine( "Group {0}", i + 1 );

   bool addIntercept = true;
   lrs[i] = new LinearRegression( new DoubleMatrix( A.Col( 2 * i ) ),
     A.Col( 2 * i + 1 ), addIntercept );
   Console.WriteLine( "equation of regression line: Y = {0} + {1}X",
     Math.Round( lrs[i].Parameters[0], 2 ),
     Math.Round( lrs[i].Parameters[1], 3 ) );

   LinearRegressionParameter param =
     new LinearRegressionParameter( lrs[i], 1 );
   Console.WriteLine( "standard error of estimate of slope: {0}",
     Math.Round( param.StandardError, 3 ) );
   Console.WriteLine( "t-statistic: {0}",
     Math.Round( param.TStatistic( 0 ), 2 ) );

   LinearRegressionAnova anova = new LinearRegressionAnova( lrs[i] );
   Console.WriteLine( "regression sum of squares: {0}",
     Math.Round( anova.RegressionSumOfSquares, 2 ) );
   Console.WriteLine( "residual Sum of squares: {0}",
     Math.Round( anova.ResidualSumOfSquares, 2 ) );
   Console.WriteLine( "r2: {0}", Math.Round( anova.RSquared, 2 ) );

   Console.WriteLine();
 }</pre>
<p>Again, the output is nearly identical for each data set:</p>
<pre class="code">Group 1
equation of regression line: Y = 3 + 0.5X
standard error of estimate of slope: 0.118
t-statistic: 4.24
regression sum of squares: 27.51
residual Sum of squares: 13.76
r2: 0.67

Group 2
equation of regression line: Y = 3 + 0.5X
standard error of estimate of slope: 0.118
t-statistic: 4.24
regression sum of squares: 27.5
residual Sum of squares: 13.78
r2: 0.67

Group 3
equation of regression line: Y = 3 + 0.5X
standard error of estimate of slope: 0.118
t-statistic: 4.24
regression sum of squares: 27.47
residual Sum of squares: 13.76
r2: 0.67

Group 4
equation of regression line: Y = 3 + 0.5X
standard error of estimate of slope: 0.118
t-statistic: 4.24
regression sum of squares: 27.49
residual Sum of squares: 13.74
r2: 0.67</pre>
<p>Finally, let's use the new <strong>NMath</strong> charting functionality to plot each linear regression fit. Note that we make use of the <code>Compose()</code> method to combine multiple charts into a single composite <strong>Chart</strong> control.</p>
<pre lang="csharp"> List<Chart> charts = new List<Chart>();
 for( int i = 0; i < lrs.Length; i++ )
 {
   charts.Add( NMathStatsChart.ToChart( lrs[i], 0 ) );
 }
 Chart all = NMathStatsChart.Compose( charts, 2, 2,
   NMathChart.AreaLayoutOrder.RowMajor );
 for( int i = 0; i < groups; i++ )
 {
   all.ChartAreas[i].AxisX.Title = "x" + ( i + 1 );
   all.ChartAreas[i].AxisX.Minimum = 2;
   all.ChartAreas[i].AxisX.Maximum = 22;
   all.ChartAreas[i].AxisX.Interval = 4;

   all.ChartAreas[i].AxisY.Title = "y" + ( i + 1 );
   all.ChartAreas[i].AxisY.Minimum = 2;
   all.ChartAreas[i].AxisY.Maximum = 14;
   all.ChartAreas[i].AxisY.Interval = 4;

   all.Series[2 * i].Color = Color.DarkOrange;
   all.Series[2 * i + 1].Color = Color.SteelBlue;
 }
 NMathStatsChart.Show( all );</pre>
<p><a href="https://www.centerspace.net/blog/wp-content/uploads/2011/12/anscombe.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-3640" title="Anscombe's Quartet" src="https://www.centerspace.net/blog/wp-content/uploads/2011/12/anscombe.png" alt="Anscombe's Quartet" width="497" height="499" srcset="https://www.centerspace.net/wp-content/uploads/2011/12/anscombe.png 497w, https://www.centerspace.net/wp-content/uploads/2011/12/anscombe-150x150.png 150w, https://www.centerspace.net/wp-content/uploads/2011/12/anscombe-298x300.png 298w" sizes="(max-width: 497px) 100vw, 497px" /></a>The charts reveal  dramatic differences between the data sets, despite the identical fitted models. Group 1 shows a linear relationship, while in Group 2 the releationship is clearly non-linear.  Groups 3 and 4 demonstrate how a single outlier can have a large effect on simple statistics.</p>
<p>Ken</p>
<p><strong>References</strong></p>
<p>Anscombe, F. J. (1973). "Graphs in Statistical Analysis". American Statistician 27 (1): 17–21. JSTOR 2682899.<br />
Tufte, Edward R. (2001). The Visual Display of Quantitative Information (2nd ed.). Cheshire, CT: Graphics Press</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/the-importance-of-graphing-your-data">The Importance of Graphing Your Data</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/the-importance-of-graphing-your-data/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3639</post-id>	</item>
	</channel>
</rss>
