Friday, September 19, 2014

Session 5 Homework

Update:

Sorry folks, typed in the wrong URL by mistake. Those looking for sessions 8 and 9 pre-reads, pls go here.

The following are pre-reads for session 7:

1. AI meets the C-Suite (McKinsey Quarterly)

and 2. Track Customer Attitudes to predict their behaviors (HBR)

The course-pack reading for session 7 is optional and these two are mandatory.

Sudhir

-----------------------------

Hi all,

You might want to lookup the list of shiny apps available listed in the session 5 updates blog post here, before we start.

The homework has three parts. Only two of the three need be done and submitted.

Homework part 1: (group submission, mandatory)

Choose any non-obscure product or service on Flipkart or Amazon (or any other review aggregation source).

Your R.O.s are: (1) Find the top few things people like about the product.

(2) Find the top few things people dislike about the product.

(3) Suggest a (re-)positioning strategy for the product based on the above.

Pull 100+ reviews of the product.

Note: A Flipkart shinyapp is available already. Just follow instructions on the first page of the shinyapp.

We're working on an amazon shinyapp as well. watch this space for updates.

Update: Turns out Amazon pages are now dynamic. They were regular pages till last year. So no shinyapp happening on it.

Text analyze the corpus for insights.

Not everything we can do is up on shiny. Would help massively if at least one member per group runs the classwork R code successfully on their machines.

Homework part 2: (Individual submission - option 1)

Use tm.plugin.webmining to pull data from any of the following news aggregators. Pick any product/ firm/ brand/ celebrity that has been in the news lately.

Pull the last 100+ news articles wherein this entity was mentioned in the article title.

Recall the classroom example wherein we did this for Zara:

install.packages("tm") # if using for the first time

install.packages("tm.plugin.webmining")

library(tm)
library(tm.plugin.webmining)

# Note: Run below on base R, not RStudio

zara <- WebCorpus(GoogleNewsSource("Zara"))

x1 = zara # save the corpus in a local file

x1 = unlist(lapply(x1, content)) # strip relevant content from x1

x1 = gsub("\n", "", x1) # remove newline chars

x1[1:5] # view content

write.table(x1, file.choose(), row.names=F, col.names=F) # save file as 'zara_news.txt'

Replace 'zara' above with whatever entity you chose.

Alternately, try running this shiny app for googlenews pulls. Its not very stable but will do for now.

Text-analyze the corpus for sentiment.

Note: Do you see how the corpus thus obtained can potentially help you mine, measure and score some notion of "PR buzz" for the entity?

Your task: ID the two most positive and two most negative articles.

In a PPT slide or two, write what you found about the reasons for positive and negative sentiment.

Update: Pls insert the following lines of code after you run the older code for sentiment analysis.

This is to obtain the most positive and negative documents.

###############

head(pol$all[(order(pol$all[,3], decreasing=T)),]) #– Top positive polarity document

head(pol$all[(order(pol$all[,3], decreasing=F)),]) #- Top negative polarity document

##################

Homework part 2: (Individual submission - option 2)

Alternately, instead of HW part 2 above, you could do the following.

Take any long (as in 10+ pages) soft copy article that you know and have read.

Use the textsplit shiny app to split it into uniform length parts (of say 25-50 words each).

Now, text anaylze the split document for topics using the shinyapp for topic mining.

In a PPT, paste the wordclouds for each topic and write your interpretation for what that topic means (in a few descriptive words, is all).

Deliverables and Deadlines:

The deadline for this session's HWs is a week from now. Next week Friday (26-sept) midnight.

Drop boxes will be up for session 5 HW part 1 and HW part 2 separately.

For both homework parts, pls submit a zipped folder containing (a) the text dataset you used, and (b) the PPT you made.

Pls remember to write your (group) name and PGID on the title slide. Name the PPT as name_HWnumber.pptx

Added later: The PPT should be <10 slides in length. Feel free to add more slides in an annexure, if required.

The HWs are all HCC level 0. Feel free to take any help from anybody as required.

Any queries etc, contact me.

Ciao.

Sudhir

Session 5 Updates

Hi all,

Session 5 text analytics, was R heavy and generally heavy.

'course we barely scratched the surface, but even that was quite a bit for a 110 minute session.

Session Summary:

To recap, the main things covered were:

  • Some understanding of the bag of words formulation, of elementary pre-processing and of Document-Term Matrices and so on.
  • Basic descriptive text analysis and wordclouds (level '0'), given a clean, well-structured text dataset in excel format
  • Grouping structure in top terms - using qgraph() to plot and see which terms co-occur in documents more often than at random. (Level '1')
  • Grouping structure in documents which typically map one-to-one to respondents. IOW, respondent segmentation possibilities using simple k-means. (Level '2')
  • Basic sentiment analysis using qdap. Finding sentiment laden words, understanding document valence, measuring sentiment polarities. (Level '3')
  • Topic mining text data. Use of Latent Dirichlet Allocation or LDA models. For both corpora and single documents split into parts. (Level '4')
  • Web extraction of text data from structured pages and using tm.plugin.webmining from select sources.
Now, since MKTR is a hands-on course, its time to apply session 5 learnings by doing-it-yourself. There'll be two avenues for this:

(a) replicating classwork examples at home. The final PPT slide deck and the classwork R code should, by now, be up on LMS.

(b) doing the homeworks diligently either individually or in groups. The homeworks are coming up in the next blog post.

About R and Shiny:

Shiny is a wrapper for R code that can be run off the cloud on any browser from anywhere in the world without needing local machine R installation etc.

We're trying to shiny-fy as much of the analysis we're doing in class. The list of shiny Apps till session 5:

Shinyapp for factor analysis

shinyapp for cluster analysis (all 3 types - Hclust, mclust and kmeans)

shinyapp for basic i.e. descriptive text analysis and wordcloud

shinyapp to split a single long article into multiple parts of uniform length

shinyapp for flipkart data extraction

shinyapp for foundational topic mining using textir and maptpx packages

shinyapp for JSMs

The landing page of the shinyapp will have basic instruction and detail for running the shinyapp.

Should things still be unclear, pls email aashish_pandey@isb.edu with a copy to me and let us know.

For the record, I encourage you to use them as backup for your homeworks etc, should regular R code run into glitches.

About the R code now on LMS:

We double-checked the R code we've now putup on LMS, one reason for the delay in its release.

Sure, during the class itself, there were missteps and unexpected glitches here and there, what with trying to run so much disparate code on an unfamiliar machine (i.e. the classroom laptop).

Chances are you'll run into a few glitches here and there yourself while trying to run the codes, perhaps.

If so, first ask around among your peers if someone has faced and solved such an issue.

If the issue remains unresolved, drop a comment on the relevant session blogpost. Then contact my RA Mr Aashish Pandey aashish_pandey@isb.edu

Finally, if the issue is still unresolved, drop by my office with your machine.

P.S. Sorry about the delay in releasing this blog post. Should've come right after Tuesday, ideally.

Dassit for now. Ciao.

Sudhir

Friday, September 12, 2014

Some course related Announcements

Hi all,

A few quick administrative annoucements.

1. External speaker Guest lecture lecture:

We're having Mr Milind Chitgupaker come in as guest lecturer to deliver a talk on analytics in MKTR and in general.

His is a battlefield perspective. He's among the brightest programming minds I know, is the owner of 6 technology patents, is a 15 year veteran with IBM's Global consulting division and currently an entrepreneur in the analytics startup space.

You can find more about him and his firm, here.

Here's he on Youtube on the work his firm did in the last General Elections.

I'm happy and proud to say I have been associated in building this startup up from its beginnings and count Milind among my close friends.

Milind gave the MKTR guest lecture last year as well and it was well received. (Don't take my word for it, feel free to ask alums and confirm).

Date: 20-september. Time 7-9 pm. Venue: AC4 LT.

Seats are limited to venue capacity (70). Pls sign up early, on a first come first serve basis, at this signup sheet here.

If you've missed or plan to skip any class, attending this lecture will insure you one attendence loss. For such folks, CP in the lecture counts towards general CP, besides.

2. Pre-reads for future classes:

For session 5, the pre-read is chapter 1 in the book Modeling Techniques for Predictive Analytics (in R) by Thomas Miller.

You can find the PDF here.

Go through the 12 page chapter carefully, its a fairly easy read. A pre-read quiz *may* land in session 5.

Other pre-reads from the coursepack - 'Perceptual Mapping: A manager's guide' (serial number 5) for Session 6;

'Market Segmentation, Target Market Selection and Positioning' (serial no. 6) for Session 7;

And 'How to design smart buisness experiments' (serial no. 9) for session 8.

The coursepack readings are classic HBS articles. There's a chance I may overrule them and assign new readings instead.

3. R tutorial and help:

Some folks have asked me for a small tutorial on R. To gauge interest, please email the AAs with a blank email entitled "Interested in an R tutorial".

The sampling piece we did on R is a very nice intro to doing R on a small problem for the first time, IMO.

Pls find here an old, detailed blogpost explaining my code etc.

If you're planning a more comprehensive and structured deep-dive into R, let me quote from an older blog post from Analytics Yogi below:

---------------------------------------

2. I've received student queries about additional sources of material for study. Well, there are two ways about it. If you are presently working on a problem on R and encounter roadblocks, then the best thing is to simply google your query. Chances are sites like Stackoverflow will have answers for it. It usually works very well for me.

On the other hand, if you are looking for a structured way to start, then there are any number of books you could consider getting and starting. Below I list some which can help the rank beginner get started:

A beginner's guide to R from Computerworld, a video introduction to R here from Google and here is a full fledged book from the Springer publishers' stable on how to get started in R.

Better still is this list of links for books on R: Link for list of books and downloads for R. More advanced users, especially after you are introduced to supervised machine learning as part of the CBA program, may want to consider the following books (some of which are free downloads):

Machine Learning with R, by Brett Lantz. The link takes you to the table of contents which you can browse and also through a sample chapter.

This short document from MIT's open courseware on Machine learning is a useful reporsitary of the very basic datasets, algorithms and packages a beginner can use to get started on the machine learning part of R analytics.

---------------------------------------

Will putup a QCs analysis from the past two sessions in the next couple of days.

That's it from me for now. Ciao.

Sudhir

Session 4 Homework

Update:

Hope all's going well with the FGD prep.

A few links (content related) that maybe useful:

An article speculating on 5 Trends Shaping the Future of Work in the next decade+. Useful insights for the moderator's checklist, perhaps?

The homesite of Airbnb which is an infomediary+ for a C2C business model in the bed-n-breakfast business. A more general-purpose classifieds/ C2C site is craigslist. Is C2C or some blend thereof a key trend that we'll come to expect as a matter of habit in many sectors?

A recent economist article that talks about how small businesses (e.g. microbreweries) are issuing bonds that promise to pay an interest + part of the interest in terms of product. Very interesting. The future of business financing as Euro banks retreat from lending in the face of an ongoing bank capitalization crisis?

And so much more.

Looking fwd to seeing the FGD output, folks.

My friendly advice: Have fun with the FGD homework. It will show in the output quality. Good luck.

Sudhir

-----------------------------

Hi all,

Session 4 got done Y'day. Longish session. Ran into time trouble in 2 of the 3 sections.

Session was readings heavy. At the intersection of qualitative and predictive analytics, too.

Was told that my star readings of the day - Target and Febreze - had already been discussed in CoBe.

Sigh.

Can only hope the MKTR treatment of these readings was distinctive enough to have added value, new perspective and fresh insight.

Only.

OK. Enough musing. There are two home works for Session 4.

Session 4 Homework 1:

Pls fill up the following two surveys.

1. Survey on Brand preferences and some social network ties.

The first survey above'll come in handy in the analytics sessions including both text and network analytics.

Fair warning: Its kinda longish, but *totally* worthwhile in terms of analysis insights.

For instance, wouldn't it be great to know how information on elective bidding or placement applications flows across social interaction networks?

So, pls do your bit to contribute to this insight. Do take the time and patience to fill it in. In any case, full credit only for *complete* submissions.

2. Survey on perceptual mapping inputs.

The second, available here, for the perceptual mapping session.

Privacy Note: I've assigned a unique ID string sequence to every MKTR student. Will use that only for both Classwork and HW analysis. Your responses are thus protected and anonymized.

Deadline for survey filling: Sunday 14-sept midnight.

Session 4 Homework 2:

The following is group HW, one submission per group only.

Author Jamie Turner compiled a slideshare presentation of 50 Amazing Facts of Mobile Marketing in 2012.

Download and go through the above slideshare slide deck. Its a collection of factoids on what I admittedly cheesily had dubbed 'new age habit patterns' in class.

Clearly, if even half the factoids in there are even half true, the world as we know it is already half in flux.

And firms would dearly like to know more about emerging trends in how the typical high-value consumer of tomorrow (i.e. you and people like you):

(i) perceive 'cues'.

For instance, how might traditional 'cues' or triggers that firms have used such as conventional ads, display ads, banner ads, search ads, coupons, product reviews, etc - change and adapt to tomorrow?

(ii) might develop 'routines' around.

For instance, how might the purchasing process, the choice process, the search process etc be impacted by new age habits?

(iii) And might assess or measure 'reward' or utility at the end of the habit loop.

For instance, ask what need is satisfied by the process? Instant gratification at the end of impulse purchases? Distraction or diversion? Deal prone-ness and coupon arbitrage? Some compensatory mechanism?

Frame an exploratory R.O. around this interest firms have.

However R.O.s, like much else of MKTR, are context specific. So, give the R.O. some context.

Select a sector (Services/ manufacturing/ Infra etc.), an industry / vertical (Edu, healthcare, Banking, Travel, entertainment etc.) or even better, a firm (goog, amazon, HBO, apple, flipkart, McKinsey, IBM, some startup etc.).

Ask yourself what might be a pressing R.O. for the relevant space/ domain that hinges on how new age habits turn out.

To solve the R.O., run a mini focus group discussion (mini-FGD) with around 4-6 participants for about 45 odd minutes among your peers (yup, people from your or other MKTR groups are fine as participants).

Whether the participant profile is that of 'experts', of 'opinion leaders' or of 'regular' consumers in the target segment is a judgment call you'll have to make (based on your R.O., besides).

Explore group dynamics in the focus group, if any. Are there constructs and possibilities seem to agree upon (unification dynamics)?

Are there faultlines wherein folks disagree sharply (Polarization dynamics)? What topics might folks be ambiguous about? Etc.

Submission Format: A short PPT.

  • Title slide of your PPT should have your group name, member names and PGIDs.
  • Second slide, write your D.P. and R.O.(s) clearly for the problem context.
  • Third slide, introduce the FGD participants and a line or so on why you chose them (tabular form is preferable for this)
  • Fourth Slide, write a bullet-pointed exec summary of the big-picture take-aways from the FGD.
  • Fifth Slide on, describe and summarize what happened in the FGD.
  • Note if unification and / or polarization dynamics happened in the FGD.
  • Name your slide groupname_FGD.pptx and drop in the appropriate dropbox by Friday (19-Sept) midnight.
  • Update: Am told there's some CFIN midterm on 19-Sept. So am postponing the deadline by a bit to 23-sept Tuesday midnite.
  • Extra points if you can put up a short edited youtube video on the major highlights of the FGD. Share link on the PPT.

Additional FGD Gyan (based on last year's experience):

  • The point of the FGD is *not* necessarily to 'solve' the problem. It may merely be to point a likely direction where a solution can be found.
  • Different R.O.s lead to very different FGD outcomes. For example (taking last year's Google Glass example), if you define your R.O. as "Explore which portable devices will be most cannibalized due to Google Glass" versus "Explore potential for new to the world applications using Google Glass", etc.
  • Keep your D.P. and R.O. tightly focussed, simple and do-able in a mini-FGD format. Having too broad a focus or too many sub-topics will lead nowhere in the 30-45 odd minutes you have.
  • Start broad: Given an R.O., explore how people connect with or relate to portability, Technology and devices in general, their understanding of what constitutes a 'cool device', their understanding of what constitutes 'excitement', memorability', 'social currency' or 'talkability' in a device and so on. You might want to start with devices in general and not narrow down to Google Glass right away (depending on the constructs you seek, of course).
  • Prep the moderator well: The moderator in particular has a crucial role. Have a broad list of constructs of interest, Focus on getting them enough time and traction (without being overly pushy). For example, the mod could start by asking the group: "What do you think about wearable devices? Where do you see the trend going in wearable devices like your smartphone, fuel bands and so on?" and get the ball rolling, then steer it to keep it on course.
Some FGDs from last year can be seen here.

Tuesday, September 9, 2014

Session 3 Homework

Hi all,

Session 3, spanning Questionnaire Design and [Exploratory] factor analysis, got done today.

Ran into time trouble and some teething Rstudio issues in Section A. Sorry about that.

About Shiny:

Will try to makeup in Section A by going over the shiny app for Factor analysis again in the opening minutes of Session 4.

Shiny allows you easy web-based cloud-located analysis capability. And though it has an R back-end, you wouldn't see any R code while using it.

Here is the link to the Factor analysis shiny app.

P.S. Some of you might find this old blog post useful (from 2 years ago) on how to interpret factor analysis output.

There are two homework assignments for session 3 - one group submission and the other individual .

Session 3 Homework 1:

Update: Am getting quite a few Qs asking if a scale other than Likert can be used etc. Sure, it can. Likert is important in the ocntext of behavioral constructs. For regular, descriptive Qs, use other scales by all means. *Not* every Q has to be a likert.

Read the following recent Businessweek article:

Coke's big fat problem.

Imagine you are in the shoes of Sandy Douglas. Now, do the following...

(i) From his 'messy reality', extract a relevant and pressing R.O. (stated clearly in words).

(ii) Map that R.O. onto 'information requirements' (see session 2 slides) that are built around some critical constructs of interest. Give these constructs a descriptive name.

In real life, we'd use exploratory/qualitative work extensively at this stage. Assume you have done so already.

(iii) Now, further break down the construct(s) you identified above into one-dimensional aspects that can be captured using Likerts.

(iv) Define your target audience/ target segment as teenagers. Develop a questionnaire for this target audience that can be taken in under 12 minutes.

Use of SKIP logic and any other Qualtrics features is welcome.

(v) Program your questionnaire into a websurvey into Qualtrics. The survey URL (obtained upon launching) is the deliverable and should be pasted along with your group name in this google form.

(vi) The first page of your survey should be descriptive text only, meant for me and the AAs. Pls write cogently the answers to parts (i) to (iv) above in that space.

Session 3 Homework 2:

Pls find in LMS, in the folder titled 'session 3 materials', code and data for your VALS survey.

Student names have been anonymized using random strings in both the class work and homework data files.

Pls replicate class work results for the Big5 dataset either using Rstudio (line by line) or using shiny.

Complete your HW analysis on the VALS dataset, similarly.

Your HW deliverable will be a 4-slide PPT by the name of your_name_here.pptx

In the first slide, pls write your name, PGID and MKTR section.

In the second slide, answer the following Qs

Q1. What is the size of the data matrix?

Q2. What is the optimal number of factors based on the screeplot?

Q3. How much of cumulative variance in the data matrix is explained by the factor solution?

Q4. Which variables have the highest and lowest uniqueness?

In the third slide, answer the following question (preferably in tabular form).

Q5. Interpret the factors. List the variables loading onto each factor. Give each factor a descriptive name.

In the last slide, answer the following Qs.

Q6. Look at the factor scores output. List the anonymized name strings of the respondents who have the highest and lowest scores on each factor.

Q7. If you are marketing lifestyle products - say adventure tours or rock-climbing gear - who in this sample would you target? List the top 5 names.

Deadline: For both HWs, the deadline is the midnight before session 5 begins.

Any queries, doubts etc, contact me or use the comments section below.

Sudhir

Monday, September 8, 2014

Session 2 Quick-Check Responses

Hi all,

I asked for typed-in responses for two quick-check Qs in session 2.

A big reason we're going with creati.st software is that we get ready soft-copy access to and record keeping of folks' in-class attendance and attentiveness.

Pls remember that since some QCs are context-sensitive, there may no "right/wrong" answers every time.

While a lot of folks have written thoughtful answers, I can't put all of them up for lack of space. I'm putting up a few selected to reflect the range and diversity of thought and perspective (and sometimes, wit) that came across.

I've put up some responses from across all 3 sections in google spreadsheet.

Click this link for the google spreadsheet.

Also, following elementary text summation procedures, I built a word count table of term frequencies - words and terms that people most commonly used - and depict them below using simple wordclouds (see below).

And yes, all on R. Only.

QC1 asked you to think up of a relevant construct structure (construct, possible sub-constructs, aspects etc) in the new age tv-viewing mini-case. The following is a wordcloud depicting the most commonly used terms (more frequent leads to larger font) below.

QC2 asked for a few key take-aways and learnings from the session. Here is its' wordcloud.

HW Notes:

The deadline for session 2 HW passed y'day midnight. Of the 209 students registered for MKTR, 209 took the first survey (BigFive Personality) but only 203 took the second VALS survey.

Wonder why. Easy marks just let go of.

Anyway, see you folks soon tomorrow in class.

Sudhir

Saturday, September 6, 2014

Session 3 Introduction and Pre-read

Hi all,

In Session 3 we cover two broad topics.

For the first, we continue the "principles of survey design" part and wade into Questionnaire Design Proper.

For the second broad topic, we do Data Reduction via Factor Analysis. For this we'll need R.

Session 3 pre-read:

Reading with serial no. 4 in the course pack "Questionnaire design and development".

Be sure to read the pre-read on Questionnaire Design as it covers the basics. It'll thus help lighten my load considerably in class.

And who knows if there's a pre-reads quiz lurking somewhere in Session 3 as well...

P.S. Pls bring this article in your coursepack to class. The quiz, if it happens, will be open-book.

Session 3 Homework pre-view:

This will require an understanding of construct measurement, questionnaire design and websurvey programming. As we speak, we are trying to get your qualtrics websurvey accounts activated.

Hence, pls make sure you read the blog post on construct exposition I put up (see below this post) so that you are comfortable with how we are defining 'construct' for MKTR.

BTW, this will be group homework (one submission per group) and the deliverable will be the URL of the websurvey you developed to measure the construct of interest.

Deadline will be one week from Session 3 i.e. just before Session 5 starts. By then your groups etc should have been formed.

P.S. Pls ensure your R and Rstudio is installed and ready for Session 3.

You won't need it inside class itself but will need it to replicate Classwork examples and for homework problems, after class.

Sudhir