Showing posts with label Analytics-Bootcamp. Show all posts
Showing posts with label Analytics-Bootcamp. Show all posts

Monday, 25 August 2014

Analytics are for everyone !

Analytics are for everyone! Well, not building analytics, no. That needs a high level of expertise in statistics, machine-learning, optimization, programming, database skills, a healthy does of domain knowledge for the problem being addressed and a pretty wide masochistic streak too.
Using analytics, now that is for everyone, or at least it should be. We all use analytics, and, I think, the best examples, we use without thinking about just how complex it is.
Is there anyone out there that hasn't used an electronic mapping service (GPS) for directions? Even ignoring the electronics, these are remarkable pieces of engineering! An extensive, detailed database of road systems and advanced routing analytics to help you find the best route from A to B without sending you backwards down one-way roads or across half-finished bridges.
Perhaps you're thinking it's not that hard? Could you build it? What if I got the data for you? No? But you can use it right? They are not perfect, mostly I think because of data cleanliness problems, but they are close enough that I don't travel far from home without one.
More examples. Anyone used a search engine? How about an on-line weather forecast? How about web-sites that predict house-values? Recommendation engines like those used by Amazon and Netflix? All heavy analytic cores wrapped in an easy to consume, highly usable front-end.
These are, I think, among the exceptions in analytic applications - good analytics AND good delivery.
I talked about pseudo-analytics in a recent post: shams with no basis in science wrapped in a User Interface with the hope that nobody asks too many questions about what's under the hood. This is not good analytics.
Unfortunately even good analytic tools get under-used if they have not been made accessible to the poor people that have to use them. Spreadsheet tools probably top the list for unusable analytic applications: unusable that is by anyone except the person that wrote them. Sadly though, I have seen many examples both in reporting and applications where so little effort was put in to User Experience that any good analytics is almost completely obscured.
Building new analytic capability is a highly skilled job. Delivering analytic results in an easy to consume format so that it gets used is also a highly skilled and, frankly, often forgotten step in the process. After all we do build analytic tools so that they get used. Don't we? Sometime I wonder.

Monday, 2 June 2014

Averages work ! (At least for ensemble methods)

After an early start, I was sitting at breakfast downtown enjoying a burrito and an excellent book on "ensemble methods".  (Yes, I do that sometimes... don't judge)

  1. 1.

Product Details








For those who have built a few predictive models: regression , neural-nets, decision trees,...  I think this is an excellent read, outlining an approach that can deliver big improvements on hard to predict problems.  The introduction provides a very good overview:
Ensemble methods have been called the most influential development in Data Mining and Machine Learning in the past decade. They combine multiple models into one usually more accurate than the best of its components. Ensembles can provide a critical boost to industrial challenges...
Ensemble models use teams of models.  Each model uses a different modeling approach or different samples of the available data or emphasizes different features of your data-set and each is built to be as good as it can be.  Then we combine ("average") the prediction results and,  typically,  get a better prediction than any of the component team members.

When I was first learning predictive modeling as an under-graduate the emphasis was on finding the best model from a group of potential candidates.  Embracing ensemble methods, initially, just felt wrong, but the proof is in the performance.

It sounds easy, but, clearly, this is more complex than building a single model and if you can get a good-enough result using simple approaches you should.  You'll know when it's worth trying something more high powered.

With thanks to my friend Matt for this simplification, this may be one of the few contexts where we can say "Averages work!!"  

As a reminder that working with averages (or aggregations of any kind) is generally dangerous to your insight, take another look at this post on why you should be using daily point-of-sale data.

Or, consider this...

Monday, 5 May 2014

Recommended Reading: The Definitive Guide To Inventory Management

A little over 15 years go now, I was set the task to model how much inventory was needed for all of our, 3000 or so, products at every distribution center.  Prior to this point, inventory targets had been set at aggregate level based off experience and my management felt it was likely we had too much inventory in total and what we did have was probably not where it was most needed. (BTW - they were absolutely right and we were ultimately able to make substantial cuts in inventory while raising service levels).

I came to the project with a math degree, some programming expertise, practical experience simulating production lines, optimizing distribution networks, analyzing investments and with no real idea of how to get the job done.  The books I managed to get my hands on gave you some idea how to use such a system but no real idea how to build it.  They left out all the hard/useful bits I think.  So, I set about to work it out for myself with a lot of simulation models to validate that the outputs made sense.
Product Details
I still work occasionally in inventory modeling and I'll be teaching some components this fall, so I have been eagerly awaiting this new book : The Definitive Guide to Inventory Management: Principles and Strategies for the Efficient Flow of Inventory across... by CSCMP, Waller, Matthew A. and Esper, Terry L. (Mar 19, 2014)

Full disclosure here: one of the authors, Dr Matt Waller is a friend and colleague of mine.  He brings an astonishing level of expertise to many areas of supply-chain management and inventory modeling is clearly no exception.  Together Matt and Terry Esper have produced a book that (had I possessed it 15 years before it was published) could have short-cut my inventory modeling project by approximately 6 months.

This is not a long book, not quite 200 pages in fact, but it is no lightweight.  If you just want an overview of the topic you could skip the math, but my guess is that if you do that, you will never really understand.  The math is not particularly hard and it's presented in a sort of hybrid math/Excel fashion that I find easy to follow.  I'll also say that I hit my first "ahah!" moment before I got to page 20.  I won't embarrass myself by telling you what it was but something that had bothered me for years suddenly clicked into place.

Unlike most discussion on this topic, this book looks at inventory modeling from the manufacturer's or supplier's point of view right through to the retail shelf.  They also provide a number of means to estimate components of inventory from historical data so you can assess how well your planning and execution system are tracking to plan: something I was aware of but had never really thought through how useful it could be.  Details on how to conduct your own simulation studies in Excel and an overview to the most commonly used forecasting approaches that feed the inventory models round it out.

It's all here, what you need to understand (and if you so wish, build) a system to optimize your inventory  holding.  I highly recommended it.


Friday, 18 April 2014

Data Visualization - are pie-charts evil ?

I'll be speaking next week at the Supply Chain Management Conference at the University of Arkansas on how data-visualization enables action.   

Good visualization is fairly easy, unfortunately, building bad visualizations that are hard to use, easy to misunderstand and that obscure and distort the data you are trying to present is even easier - many analysts can do it without trying to.



In honor of the event, I'm resurrecting a post I created a couple of years ago "Are pie charts evil or just misunderstood".  I wrote this around  the time I was moving away from a trial and error approach  (and 20 years of trial and error effort does get you cleaner visuals) to attempting to understand why some visuals so clearly work better than others.  

It turns out that there are some great frameworks to help in building better visuals.  Join me next week and we'll talk about human graphical perception, chart junk and non-data ink.

Enjoy !


Thursday, 17 April 2014

Data Visualization - enabling action

I'll be speaking next week at the Supply Chain Management Research Center Conference at the University of Arkansas on how data-visualization enables action.
The basic premise (and one I firmly believe) is that the hardest part of any analytic project is not defining the problem, doing the analytics or finding the "solution", it's enabling action. Far too many otherwise excellent analytic projects, tools and reports go unused because the results are presented in a way that is somewhere between difficult-to-understand and incomprehensible.






Manager's typically do not have the time to just figure it out or double check their understanding, or re-work the results to something they can work with.
By making your analytics easy to consume (through good visualization practice) you make it possible for decision-makers to find what is important, understand it correctly and make good decisions, quickly.
Frankly many analytics providers don't try very hard to make their results easy to consume and their outputs are confusing, hard to use, easy to misunderstand and a long, long way from enabling decisions.
For those that do try, there is a tension between making things look "cool" or "interesting" and having them function well. Ideally we want both, but very few examples deliver well on both fronts. Indeed, a lot of the attempts to provide interest seem to be designed to obfuscate or distort meaning.
Here are some examples I plucked from a leading visualization vendor's web site. Each and every one of these charts is difficult to read because of limitations in our visual perception. We'll talk more about that in the conference next week.












And trying to make charts more interesting/attractive/eye-catching typically makes things worse. This "Funnel Chart" (below) is hilarious !. It's being terribly misused and gets almost everything wrong. I defy use to use this and make sensible decisions.
  • Color serves no purpose
  • It's very unclear whether values are represented by length, area or volume (thank goodness they included numbers)
  • The top value is (visually) about 100 times bigger than the bottom one but actually less than 5 times bigger in value.
  • I need another legend to tell me where all these regions are
  • Why, exactly, is it a funnel ? What does that imply? The NorthEast feeds the South which feeds into Central...
  • It has no contextual information. Perhaps Northwest is the smallest because that is our smallest market ?


Here's an example we will be working with in the conference . It's very hard to read, slow to use, easy to make mistakes withand distinctly over-dressed.






And exactly the same data once it's been stripped bare (below). It's now easy/quick to read, practically error-proof, has no distracting "chart junk" and has contextual data (budget) to understand what "good" is.









My interest in visualization is in enabling action from my analytic work. As a consultant, you may think that I get paid whether a client implements my work or not. That may be true, but I like to get paid more than once by the same client.
If you're going to be at the conference next week, drop by and see me: Supply Chain, Analytics and Visualization are among my favorite discussion topics.
I'll be posting more on this over the next few months but if you're looking for more right now, here are some excellent resources:
Stephew Few's blog, Visual Business Intelligence
Kaiser Fung's blog, Junk Charts
Nathan Yau's blog, Flowing Data

Friday, 28 March 2014

Back to blogging on "Better Business Analytics"

It's been quite a while, just over 12 months in fact since my last blog post.  In that time, I've been hard at work developing analytic applications for the Orchestro DSR.  (Orchestro's off-shelf alerting tool is especially cool and something I am very proud of contributing to).    I enjoyed my time at Orchestro, they're a good team and have big plans, but one key thing I found out about myself is that I prefer working real-life problems to developing software for someone else to have all the fun :-)

So, I'm now back full-time on consulting and I will occasionally blog on topics of interest to me.   Expect to see more soon on:

  • Next-generations DSRs (Demand Signal Repositories)
  • Retail supply-chain analytics
  • Handling (BIG-ish) data for analytics
  • The right tools for the job (Predictive Analytics, Business Models, Optimization)
  • Some more thoughts on store-clustering
  • Inventory modeling at retail (and why it's different, again)
  • Order forecasting using POS data
  • Further thoughts on SNAP and other ignored demand drivers
  • and if there is something you would like to hear more on ... just drop me a line.



Thursday, 21 February 2013

Business Analytics - finding the balance between complexity and readability

In this blog I try to present analytic material for a non-analytic audience.  I focus on point of sale and supply chain analytics: it's a complex area and frankly, it's far too easy whether writing for a blog or presenting to a management-team to slip into the same language I would use with an expert.  

So, I was inspired by a recent post on Nathan Yau's excellent blog FlowingData to look at the "readability" of my own posts and apply some simple analytics to the results.

I've followed Nathan's blog for a couple of years now for the many and varied examples of data-visualization he builds and gathers from other sources. One that particularly caught  my eye was this one published by the  Guardian just before the recent State of the Union address in the United States (click to enlarge).
The Guardian plotted the Flesch-Kincaid grade levels for past addresses. Each circle represents a state of the union and is sized by the number of words used. Color is used to provide separation between presidents. For example, Obama's state of the union last year was around the eighth-grade level, and in contrast, James Madison's 1815 address had a reading level of 25.3. 
Neither the original post nor Nathan's go into much detail around why the linguistic standard has declined.  Within this period, the nature of the address and the intended audience has certainly changed.   Frankly, having scanned a few of the earlier addresses I think we can all be grateful not to be on the receiving end of one of them.

 So, I was inspired to find out the reading level of my own blog.  It's intended to present analytic concepts to a non-analytic audience.  I can probably go a little higher than recent presidential addresses (8th-10th grades, roughly ages 13-15) but I don't want to be writing college-level material either.

All the books my kids read are graded in this (or a very similar) way but I had never thought about how such a grading system could be constructed.   The Flesch-Kincaid grade level estimate is based on a simple formula:

 0.39 \left ( \frac{\mbox{total words}}{\mbox{total sentences}} \right ) + 11.8 \left ( \frac{\mbox{total syllables}}{\mbox{total words}} \right ) - 15.59

That's just a linear combination of : 
  • average words per sentence;
  • average syllables per word
  • a constant term.
In fact (though I have not yet  found details of how it was constructed) it looks to be the result of a regression model.  (Simple) data science in action from the 1970's.

Note that Flesch-Kincaid says nothing about the length of the book or the nature of the vocabulary it's all down to long sentences and the presence of multi-syllabic words. 

(BTW - the preceding sentence has a Flesch-Kincaid grade score of 13.63, calculated with this online utility).  Now that's pretty high, worthy of an early 1900's president and (supposedly) understandable by young college students.    The sentence is longer than typical; 31 words vs. my average of 18 (see below) and words like "vocabulary", "sentences" and "multi-syllabic" are not helping me either.

Approach

I could have used copy/paste into the online utility I used above, recorded the results in a spreadsheet and pulled some stats from that. That would work, but if I ever want to repeat the exercise or modify it, perhaps to use a different readability index, I must do all that work again.   At the time of writing, there are currently 44 published posts on this blog - there must be a better way.

Actually there are probably many better ways but as I also wanted to flex some R-programming muscle I built a web-scraper in R to do the work for me and analyze the results (more on this in a later post).

Results

Let's start with some simple summaries of the results I collected.
Histograms showing the % of posts from this blog (prior to 2/14/13), the average (mean) value shown in red. There is some variety in the grade reading level indicated by Flesch-Kincaid for my blog posts, averaging around 10 but ranging from 7 through 14.  I average about 750 words, but occasionally go much longer and have a number of very short "announcement" style posts.  Average words per sentence of 18.











OK, so now I know, but is that good?  I don't know that I have a definitive source but according to at least one source  the target range on  Flesch-Kincaid for Techical or Industry readers is 7-12, so I'm feeling pretty good about that.

I did wonder whether there was any other, hidden, structure to the data though.  I know the equation is based on words per sentence and syllables per word so there is no point looking at those, obviously I'll find a relationship.   But is my writing style influenced by anything else?
Flesch-Kincaid grade level vs. the number of words by post on this blog.  Other than a handful of long posts that rate lower in the range 8-10,  I don't see much going on here.
Flesch-Kincaid grade level vs. the publication date by post on this blog.  The size of each post (in words) is shown by the area of each point, color is used purely to help visually differentiate each of the points.  Apart from a couple of recent "complex" posts  this does seem to be showing a trend, so I added a regression line and labeled the more extreme posts.  Point (b) is a very short "announcement" style post (you can hardly see the point at all) and I could probably ignore it completely.  Point (e) is a more fun piece I did around using pie-charts that's probably not very representative of the general material either.












If you want to compare readability for yourself here are the top (and bottom) posts ranked by Flesch-Kincaid grade level

Rank
Post
 Flesch-Kincaid grade level
words
sentences
1
13.3
784
33
2
13.1
82
4
3
12.8
676
29
4
12.8
723
31
5
12.7
541
29
6
12.4
891
43
7
12.1
478
24
8
11.9
762
38
9
11.8
297
16
10
11.6
958
41
35
  9.0
1878
114
36
  8.9
1264
78
37
  8.5
177
10
38
  8.4
70
5
39
  8.3
651
42
40
  8.2
1395
83
41
  8.1
531
32
42
  7.9
773
44
43
  7.6
483
36
44
 7.1
1097
70

Conclusions

It appears that my material is (largely) written at a level that should be accessible to the reader.  And I am using more readable language in recent blogs which sounds like a good thing.

But there remains a key question for me that these stats can't really answer. Am I getting better at explaining the complex (my goal) or just explaining simpler things ? What do you think ?

In case you are wondering, this post has a Flesch-Kincaid grade level of about 8.  So if you can follow the "State of the Union" address you should have been just fine with this.