Sunday, November 27, 2011

When is 'Big Data' too big for Analytics?

- 'Foreword'Apologies for the lack of recent posts.  I've been *very* busy on many Data Mining Analytics projects in my role as a Data Mining Consultant for SAS.  The content of my work is usually sensititive and therefore discussing it in any level of detail in public blog posts is difficult.

This specific post is to help promote the launch of the new IAPA website and increase focus on Analytics in Australia (and Sydney, where I am normally based).  The topic of this post is something that has been at the forefornt of my mind and seems to be a central theme of many of the projects I have been working on recently.  It is certaininly a current problem for many Marketing/Customer Analytics departments.  So here are a few thoughts and comments on 'big data'. Apologies for typos, it is mostly written piecemeal on my iPhone during short 5 mins breaks...


How big is too big (for Analytics)?
I frequently read Analytics blogs and e-magazines that talk about the 'new' explosion of big data. Although I am unconvinced it is new, or will improve anytime soon, I do agree that despite technology advances in analytics the growth of data generation and storage seems to be outpacing most Analyst's ability to transform data into information and utilize it to greater benefit (both operationally and analytically). The term 'Analysis Paralysis' has never been so relevant!

But from a practical perspective what conditions cause data to become unwieldy? For example, take a typical customer services based organisation such as a bank, telcom, or public dept: how can the data (de)-evolve to a state that makes it 'un-analysable' (what a horrible thought..). Even given mild (by today's standards) numbers of variables and records, certain practices and conditions can lead to bottlenecks, widespread performance problems, and delays that make any delivery of Analytics very challenging.

So, below is a series of my most recent observations from Analytics projects I have been involved with that involved resolving, or encountered 'big data' problems:

- Scaleable Infrastructure.
Data will grow. Fast. In fact it will probably more than double in the next few years. CPU capacity of data warehousing and analytics servers need to improve to match.
As an example, I was working on a telcom Social Network Analysis project recently where we were processing weekly summaries of mobile telephone calls for approx 18million individuals. My role was to analysis the social interactions between all customers and build dozens of propensity scores, using the social influence of others to predict behaviour. In total I was probably processing hundreds of millions of records of data (by a dozen or so variables). This was more than the client typically analysed.
After a week  of design and preliminary work I began to conasider ways to optimise the performance of my queries and computations, and I asked about the server specifications. I assumed some big server with dozens of processors, but unfortunately what I was connecting to was a dual core 4GB desktop PC under an Analyst's desk...

- Variable Transformations
A common mistake by inexperienced data miners is to ignore or short-cut comprehensive data preparation steps. All data that involves analysis of people is certain to include unusual characteristics. One person's outlier is another's screw-up :)
So, what is the best way to account for outliers, skewed distributions, poor data sparsity, or highly likely erreonous data features? Well an approach (that i am not keen on) taken by some is to apply several variable transformations indiscriminatly to all 'raw' variables and subsequentially let a variable selection process pick the best input variables for propensity modeling etc. When combined with data which represents transposed time series (so a variable represents a value in 'month1' the next variable the same value dimension in 'month2' etc) then this can easily generate in excess of 20,000 variables (by say 10 million customers...). It is true there are variable selection methods that handle 20,000 quite well, but the metadata and processing to create those datasets is often significant and the whole process often incurs excessive costs in terms of time to delivery of results.
Additional problems that may arise when you start working with many thousands of variables is that variable naming needs to be easily understood and interpretable. The last thing a data miner wants to do is spend hours working out what those transformed and selected important variables in the propensity model actually mean and represent in the raw data.
Which leads me to my next point..

- Variable / Data Understanding
One of the core skills of a good data miner is the understanding and translate complex data in order to solve business problems.
As organisations obtain more data it is not just about more records, often the data reveals new subtle operational details and customer behaviors not previously known, or completely new sources of data (FaceBook, social chat, location based services etc). This in turn often requires extended knowledge of the business and operational systems to enable the correct data warehouse values or variable manipulations and selections to be made.
An analyst is expected to understand most parts of an organization's data at a level of detail most individuals in the organisation are not concerned with, and this is often a momental task.
As an example of 'big data' bad practice, I've encountered verbose variables names which immediately require truncation (due to IT / variable name limit reasons), others which make understand the value or meaning of the variable difficult, or naming conventions which are undocumented. For example: "number_of_broken_promises" is one of the funniest long max variable names I've seen, whilst others such as "ccxs_ytdspd_m1_pct" can be guessed when you have the business context but definitely require detailed documentation or a key.

- Diverse Skillsets
'big data' often requires big warehouse and analytics systems (see point 1) and so an analyst must have understanding of how these systems work properly.
Through personal experience I'm always aware of table indexes on a Teradata system for example. By default the first column in a warehouse table will be the index, so if you incorrectly use a poorly managed or repetitive variable such as 'gender' or 'end_date' then the technology of a big data system works against you. I've seen this type of user error on temp tables or analytics output tables far too many times.  Big Data often involves bringing information from a greater number of sources, so understanding the source systems and data warehouse involved is an important challenge.

I hope this helps.  I strongly recommend getting involved with the IAPA and Sydney Data Miner's Meetup if you are based in  Australia or Sydney.
 - Tim

10 comments:

Pritish said...

Good Information Tim. Understanding your business/organization data is really critical thing in today's world. Moreover, more you know about your data better your data models are!

Keep posting your experience.

Thanks,
Pritish

hunterdong said...

Can I still ask you questions about SPSS Clementine (although you use SAS now)?

When buidling predictive models from imbalanced data (say 1% response rate or 5% churn rate), I can use "Weight" function in CHAID/CR&T, or re-balance data using Balance node.

Is there a difference between weight function/Balance node?

Is 50%/50% a good re-balance for most models?

Also would you use the whole dataset (say 1M records of this 1% sparse data), or only use a sample? How big if you choose a sample? I met " all records in training data have the same value for target" error and I guess it's related with the size of data

Thanks in advance

hunterdong said...

" all records in training data have the same value for target" error I met was caused by manually specified range in Type node for weight field.

Tim Manns said...

Hi Hunterdong,

Most questions are the same for any data minng application :)

50/50% is mostly a threshold that is used in scoring to define the true/false binary outcome. The model itself usually 'works' with very imbalanced data. You just need to create your own threshold to decide true or false outcomes.

For decision trees I would strongly recommend using a weighting variable. This is because having imbalanced data will actually affect the tree splits (which are often also a source of data understanding) and performance of the generated model.

For Neural networks I prefer to use a decimal varianble as the target and instead use the natural balance as the threshold for the yes/no or true/false distinction. For more information see a previous discuss I had with Dean Abbott a few years ago;
http://timmanns.blogspot.com.au/2009/11/building-neural-networks-on-unbalanced.html

Dean discusses the topic here;
http://abbottanalytics.blogspot.com.au/2009/11/stratified-sampling-vs-posterior.html


I haven't tested this approach for CART, but maybe you can try instead using a decimal number as the target (C5 will not support a numeric target variable).

Hope that helps

Tim

hunterdong said...

Hi Tim

When the T/F result is 90/10 split, I found most trees tends to just predict one value (simple way to get 90% accuracy!).

Using cost of mis-classification didn't help much.

Under what circumstances would you predict numberic value? I just started playing with KDD98 data which may require numeric evaluation (value of responders).

One more question, for churn model or DM respond model, would you use CHAID or Logistic Regression?

Thanks

Tim Manns said...

Don't use T/F, instead use 0.0 or 1.0 as the target variable (and make sure the variable is a numeric type).

Then the predicted value generated by the model will be a raw number between 0.0 and 1.0.

Then simply use an expression to create "T" where predicted value > 0.9. else "F" to get your string binary outcome if it is needed.

Ann Hathaway said...

Scarcely a day passes by where you don't see a headline about "Big Data" and how analysis of this big data is going to lead to huge efficiencies, targeted marketing and large profits.

Anonymous said...

I use daily time series in most of the variables.
But, there many other times series are in different frequency (quartley, month...)

How I can convert, for example, quarterly time series, to daily?

Many thanks.
jma
my email:
jma at gmail dot com

Anonymous said...

Perdon, my email:
manlop at mail dot pt

not the gmail in last message above.

benslin kard said...
This comment has been removed by a blog administrator.