<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2999491398569064587</id><updated>2024-09-07T19:08:25.064-07:00</updated><category term="Text Mining"/><title type='text'>Learnings</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://meetsonal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://meetsonal.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shabd</name><uri>http://www.blogger.com/profile/07375526504469255608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2999491398569064587.post-5020815605398088243</id><published>2011-09-20T03:51:00.001-07:00</published><updated>2011-09-20T03:51:29.611-07:00</updated><title type='text'>Data Mining Query Task in SQL Server Integration Services</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong&gt;By &lt;a href=&quot;http://www.databasejournal.com/feedback/http://www.databasejournal.com/features/mssql/data-mining-query-task-ssis.html&quot;&gt;Marcin Policht&lt;/a&gt; &lt;/strong&gt;&lt;br /&gt;

						
						 One of the primary goals of business 
intelligence is to transform raw data into meaningful information, by 
combining its sources, discovering its dependencies and patterns, and 
using them to predict future trends. While the majority of methods that 
deliver these objectives fall within the scope of Analysis Services and 
Data Mining, SQL Server 2008 R2 Integration Services offers a wide range
 of features that help streamline and automate their implementation. In 
this article, we will present Data Mining Query Task that illustrates 
this paradigm.&lt;br /&gt;

Besides its obvious purpose of executing Data Mining Extension (DMX) 
queries, the Data Mining Query task provides a means for capturing their
 outcome into an arbitrary table. Query execution leverages data mining 
models, which apply specifically crafted algorithms to data exposed via a
 mining structure.&lt;br /&gt;

To better understand this process, let&#39;s review briefly some of its 
key concepts. Mining structure constitutes a data source view (commonly 
combining data from multiple sources) along with associated metadata 
(such as content type and its distribution), filtered in a manner that 
serves as a basis for subsequent analysis. Such analysis is conducted by
 employing mining models that might involve additional filtering (by 
using distinct sets of input columns or selecting rows that contain 
specific values only) and aliasing (referencing multiple, individually 
named copies of the mining structure column set) to facilitate execution
 of their respective mining algorithms (which, in turn, are utilized to 
execute predictive queries). Mining algorithms are responsible for 
identifying patterns and interdependencies in arbitrarily selected data 
subsets (divided into two partitions – training and testing), yielding 
forecasts that are used, with certain degree of probability, to 
extrapolate future events.&lt;br /&gt;

Selecting the most appropriate algorithm to match a specific business
 scenario requires fairly in-depth knowledge of their characteristics as
 well as good understanding of the underlying data and is beyond the 
scope of this article (for more information about the available choices 
incorporated into the product, as well as examples illustrating their 
use, refer to the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms175595.aspx&quot;&gt;Data Mining Algorithms&lt;/a&gt; article in SQL Server 2008 R2 Books Online).&lt;br /&gt;

In order to demonstrate the functionality of Data Mining Query Task, 
we will take advantage of the AdventureWorksDW2008R2 sample database 
(containing customer data of a fictitious company that manufactures and 
sells bicycles to international commercial markets) downloadable from 
the &lt;a href=&quot;http://msftdbprodsamples.codeplex.com/releases/view/55926&quot;&gt;CodePlex&lt;/a&gt;
 web site, where you will also find detailed procedures illustrating its
 deployment. The resulting Analysis Services installation includes 
Targeted Mailing Mining Structure (similar in many aspects to Bike Buyer
 Mining Structure documented in the tutorial in &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms345320.aspx&quot;&gt;SQL Server 2008 R2 Books Online&lt;/a&gt;),
 which, in turn, contains four mining models. While any of them can 
serve as the basis for our presentation, for the sake of clarity, we 
will choose TM Decision Tree, which is practically identical to the 
Decision Tree model referenced by the tutorial and use it to compose a 
batch prediction query. Its general format can be summarized as:&lt;br /&gt;

SELECT TOP&amp;nbsp; &amp;lt;select list&amp;gt;&lt;br /&gt; FROM [&amp;lt;mining model name&amp;gt;]&lt;br /&gt; PREDICTION JOIN&lt;br /&gt; OPENQUERY([&amp;lt;datasource&amp;gt;],&#39;&amp;lt;SELECT statement&amp;gt;&#39;)&lt;br /&gt; &amp;nbsp; AS [&amp;lt;input alias&amp;gt;]&lt;br /&gt; ON &amp;lt;on clause, mapping,&amp;gt;&lt;br /&gt; WHERE &amp;lt;where clause, boolean expression,&amp;gt;&lt;br /&gt; ORDER BY &amp;lt;expression&amp;gt;&lt;br /&gt;

As you can see, DMX queries borrow heavily from T-SQL syntax, with 
minor differences resulting from idiosyncrasy of Data Mining technology.
 In particular, &amp;lt;select list&amp;gt; allows you to combine columns from 
ProspectiveBuyer table (included in the Analysis Services data source 
(referenced by the OPENQUERY clause) and mining model (in our case, 
Adventure Works DW and TM Decision Tree respectively), which are joined 
together via PREDICTION JOIN (via a number of common columns). The WHERE
 clause indicates that we are interested in prospective customers that 
are likely to buy a bike and the value of PredictProbability function 
calculated against the Bike Buyer column provides the probability of 
such events. Effectively, the resulting query takes the following form:&lt;br /&gt;
&lt;br /&gt;

SELECT&lt;br /&gt; &amp;nbsp; TOP 100&lt;br /&gt; &amp;nbsp; t.[LastName],&lt;br /&gt; &amp;nbsp; t.[FirstName],&lt;br /&gt; &amp;nbsp;&amp;nbsp;[TM Decision Tree].[Bike Buyer],&lt;br /&gt; &amp;nbsp; PredictProbability([Bike Buyer])&lt;br /&gt; FROM&lt;br /&gt; &amp;nbsp; [TM Decision Tree]&lt;br /&gt; PREDICTION JOIN&lt;br /&gt; &amp;nbsp; OPENQUERY([Adventure Works DW],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;SELECT&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [LastName],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FirstName],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MaritalStatus],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Gender],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [YearlyIncome],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TotalChildren],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [NumberChildrenAtHome],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Education],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Occupation],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [HouseOwnerFlag],&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [NumberCarsOwned]&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [dbo].[ProspectiveBuyer]&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;) AS t&lt;br /&gt; ON&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Marital Status] = t.[MaritalStatus] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Gender] = t.[Gender] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Yearly Income] = t.[YearlyIncome] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Total Children] = t.[TotalChildren] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Number Children At Home] = t.[NumberChildrenAtHome] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Education] = t.[Education] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Occupation] = t.[Occupation] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[House Owner Flag] = t.[HouseOwnerFlag] AND&lt;br /&gt; &amp;nbsp; [TM Decision Tree].[Number Cars Owned] = t.[NumberCarsOwned]&lt;br /&gt; WHERE[TM Decision Tree].[Bike Buyer] = 1&lt;br /&gt; ORDER BY PredictProbability([Bike Buyer]) DESC&lt;br /&gt;
&lt;br /&gt;

While you can execute this query from the SQL Server Management 
Studio (by connecting to Analysis Services instance, invoking New 
Query-&amp;gt;DMX option from its context sensitive menu, selecting TM 
Decision Tree entry in the Mining model listbox, and pasting the 
statement listed above in the DMXQuery window), we are interested in its
 execution via SSIS Data Mining Query Task. To accomplish this, launch 
Business Intelligence Development Studio and create a new project based 
on the Integration Services template. Next, drag Data Mining Task from 
the Toolbox onto the Designer window and launch its Editor (by choosing 
Edit ... entry from its context sensitive menu). Create a new connection
 utilizing OLE DB Provider for Analysis Services pointing to the target 
instance of Analysis Services (or a solution that includes target 
Analysis Services project where the relevant mining structures and 
models are defined). Choose Targeted Mailing mining structure in the 
drop-down list directly below and verify that its mining models are 
displayed underneath. Switch to the Query tab and enter the predictive 
query listed above into its textbox.&lt;br /&gt;

Note that you could accomplish the equivalent outcome (with the 
exception of the ORDER BY clause) by leveraging the New Data Mining 
Query dialog box (accessible by clicking on Build New Query command 
button). Parameter Mapping and Result Set tabs are not relevant in this 
case so effectively you can leave them blank. Switch to the output tab 
and define the second connection manager, which, as mentioned earlier, 
designates a database and its table where the results of the task&#39;s 
execution are written.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://meetsonal.blogspot.com/feeds/5020815605398088243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://meetsonal.blogspot.com/2011/09/data-mining-query-task-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/5020815605398088243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/5020815605398088243'/><link rel='alternate' type='text/html' href='http://meetsonal.blogspot.com/2011/09/data-mining-query-task-in-sql-server.html' title='Data Mining Query Task in SQL Server Integration Services'/><author><name>Shabd</name><uri>http://www.blogger.com/profile/07375526504469255608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2999491398569064587.post-1472491546264080937</id><published>2011-09-19T09:07:00.000-07:00</published><updated>2011-09-20T00:33:22.282-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Text Mining"/><title type='text'>Text analytics</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The term &lt;b&gt;text analytics&lt;/b&gt; describes a set of &lt;a href=&quot;http://en.wikipedia.org/wiki/Linguistics&quot; title=&quot;Linguistics&quot;&gt;linguistic&lt;/a&gt;, &lt;a class=&quot;mw-redirect&quot; href=&quot;http://en.wikipedia.org/wiki/Statistical&quot; title=&quot;Statistical&quot;&gt;statistical&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Machine_learning&quot; title=&quot;Machine learning&quot;&gt;machine learning&lt;/a&gt; techniques that model and structure the information content of textual sources for &lt;a href=&quot;http://en.wikipedia.org/wiki/Business_intelligence&quot; title=&quot;Business intelligence&quot;&gt;business intelligence&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Exploratory_data_analysis&quot; title=&quot;Exploratory data analysis&quot;&gt;exploratory data analysis&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Research&quot; title=&quot;Research&quot;&gt;research&lt;/a&gt;, or investigation.&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-0&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics#cite_note-0&quot;&gt;&lt;span&gt;[&lt;/span&gt;1&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt; The term is roughly synonymous with &lt;a href=&quot;http://en.wikipedia.org/wiki/Text_mining&quot; title=&quot;Text mining&quot;&gt;text mining&lt;/a&gt;; indeed, Prof. Ronen Feldman modified a 2000 description of &quot;text mining&quot;&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-1&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics#cite_note-1&quot;&gt;&lt;span&gt;[&lt;/span&gt;2&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt; in 2004 to describe &quot;text analytics.&quot;&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-2&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics#cite_note-2&quot;&gt;&lt;span&gt;[&lt;/span&gt;3&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;  The latter term is now used more frequently in business settings while  &quot;text mining&quot; is used in some of the earliest application areas, dating  to the 1980s,&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-3&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics#cite_note-3&quot;&gt;&lt;span&gt;[&lt;/span&gt;4&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt; notably life-sciences research and government intelligence.&lt;br /&gt;
Text analytics involves &lt;a href=&quot;http://en.wikipedia.org/wiki/Information_retrieval&quot; title=&quot;Information retrieval&quot;&gt;information retrieval&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Lexical_analysis&quot; title=&quot;Lexical analysis&quot;&gt;lexical analysis&lt;/a&gt; to study word frequency distributions, &lt;a href=&quot;http://en.wikipedia.org/wiki/Pattern_recognition&quot; title=&quot;Pattern recognition&quot;&gt;pattern recognition&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Tag_%28metadata%29&quot; title=&quot;Tag (metadata)&quot;&gt;tagging&lt;/a&gt;/&lt;a href=&quot;http://en.wikipedia.org/wiki/Annotation&quot; title=&quot;Annotation&quot;&gt;annotation&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Information_extraction&quot; title=&quot;Information extraction&quot;&gt;information extraction&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Data_mining&quot; title=&quot;Data mining&quot;&gt;data mining&lt;/a&gt; techniques including link and association analysis, &lt;a href=&quot;http://en.wikipedia.org/wiki/Information_visualization&quot; title=&quot;Information visualization&quot;&gt;visualization&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Predictive_analytics&quot; title=&quot;Predictive analytics&quot;&gt;predictive analytics&lt;/a&gt;. The overarching goal is, essentially, to turn text into data for analysis via application of &lt;a href=&quot;http://en.wikipedia.org/wiki/Natural_language_processing&quot; title=&quot;Natural language processing&quot;&gt;natural language processing&lt;/a&gt; (NLP) and analytical methods.&lt;br /&gt;
The term also describes that application of text analytics to respond  to business problems, whether independently or in conjunction with  query and analysis of fielded, numerical data. It is a truism that 80  percent of business-relevant information originates in unstructured  form, primarily text.&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-4&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics#cite_note-4&quot;&gt;&lt;span&gt;[&lt;/span&gt;5&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;  These techniques and processes discover and present knowledge – facts,  business rules, and relationships – that is otherwise locked in textual  form, impenetrable to automated processing.&lt;br /&gt;
A typical application is to scan a set of documents written in a &lt;a href=&quot;http://en.wikipedia.org/wiki/Natural_language&quot; title=&quot;Natural language&quot;&gt;natural language&lt;/a&gt; and either model the document set for &lt;a class=&quot;mw-redirect&quot; href=&quot;http://en.wikipedia.org/wiki/Predictive_classification&quot; title=&quot;Predictive classification&quot;&gt;predictive classification&lt;/a&gt; purposes or populate a database or search index with the information extracted.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://meetsonal.blogspot.com/feeds/1472491546264080937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://meetsonal.blogspot.com/2011/09/text-analytics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/1472491546264080937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/1472491546264080937'/><link rel='alternate' type='text/html' href='http://meetsonal.blogspot.com/2011/09/text-analytics.html' title='Text analytics'/><author><name>Shabd</name><uri>http://www.blogger.com/profile/07375526504469255608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2999491398569064587.post-2813656709261040844</id><published>2011-09-19T09:05:00.000-07:00</published><updated>2011-09-20T00:33:22.290-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Text Mining"/><title type='text'>Sentiment analysis</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;Sentiment analysis&lt;/b&gt; or &lt;b&gt;opinion mining&lt;/b&gt; refers to the application of &lt;a href=&quot;http://en.wikipedia.org/wiki/Natural_language_processing&quot; title=&quot;Natural language processing&quot;&gt;natural language processing&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Computational_linguistics&quot; title=&quot;Computational linguistics&quot;&gt;computational linguistics&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Text_analytics&quot; title=&quot;Text analytics&quot;&gt;text analytics&lt;/a&gt; to identify and extract subjective information in source materials.&lt;br /&gt;
Generally speaking, sentiment analysis aims to determine the attitude  of a speaker or a writer with respect to some topic or the overall  contextual polarity of a document. The attitude may be his or her  judgement or evaluation (see &lt;a href=&quot;http://en.wikipedia.org/wiki/Appraisal_theory&quot; title=&quot;Appraisal theory&quot;&gt;appraisal theory&lt;/a&gt;), affective state (that is to say, the emotional state of the author when writing), or the intended emotional communication. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://meetsonal.blogspot.com/feeds/2813656709261040844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://meetsonal.blogspot.com/2011/09/sentiment-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/2813656709261040844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2999491398569064587/posts/default/2813656709261040844'/><link rel='alternate' type='text/html' href='http://meetsonal.blogspot.com/2011/09/sentiment-analysis.html' title='Sentiment analysis'/><author><name>Shabd</name><uri>http://www.blogger.com/profile/07375526504469255608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>