Chinese Fortune Cookies

An out-ward or right-ward shift in supply redu...
Image via Wikipedia

Source-http://www.usnews.com/usnews/images/cartoons/050110_editorial.jpg

In a world of experts-some questions to ask about China’s foreign policy , trade and military convergence

1) How can an increasingly rich 1.2 billion people accept a restricted internet, one child policies, and severe political restrictions/

2) How long can the Chinese respect for elders and ancestors be translated to a respect for the communist government? How do you measure the level of satisfaction?

3) Can ambitious Chinese Mandarins be motivated by career motives to act tougher than the country’s national interest demands?

4) Rare earth demand and supply curves? Clean energy investments versus climate change commitments graph?

5)Military- Metrics like Chinese Air Force flying hours per pilot, or submarine activity per annum?

As the Chinese supposedly said- May you live in interesting times

Towards better quantitative marketing

Cycle of Research and Development, from "...
Image via Wikipedia

The term quantitative refers to a type of information based in quantities or else quantifiable data (objective properties) —as opposed to qualitative information which deals with apparent qualities (subjective properties)

http://en.wikipedia.org/wiki/Quantitative

Fear, uncertainty, and doubt (FUD) is a tactic of rhetoric and fallacy used in sales, marketing, public relations,[1][2] politics and propaganda. FUD is generally a strategic attempt to influence public perception by disseminating negative and dubious/false information designed to undermine the credibility of their beliefs.

Source-

http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt

Top 5 FUD Tactics in Software and what you can say to end user to retain credibility

1) That software lacks reliable support- our support team has won top prizes in Customer Appreciation for past several years.

  • Our software release history-
  • graph of bugs filed-
  • turn around time box plot for customer service issues
  • quantitatively define reliability

2) We give the best value to customers. Customer Big A got huge huge % savings thanks to our software.

  • Pricing- Transparent – and fixed. For volume discounts mention slabs.
  • Cost to Customer- Include time and cost estimates for training and installation
  • Graphs of average ROIC (return on capital invested) on TCO (total cost of ownership)  not half a dozen outlier case studies. Mention Expected % return

3) We have invested a lot of money in our Research and Development. We continue to spend a lotto of money on R &D

  • Average Salary of R and D employee versus Average Tenure (Linkedin gives the second metric quite easily)
  • Mention Tax benefits and Accounting treatment of R&D expenses
  • Give a breakdown- how much went to research and how much went to legacy application support
  • Mention open source projects openly
  • Mention community source projects separately

4) Software B got sued. Intellectual property rights (sniff)

  • Mention pending cases with your legal team
  • Mention anti trust concerns for potential acquisitions
  • Mention links to your patent portfolio (or even to US PTO with query ?=your corporate name )

5) We have a 99.8% renewal rate.

  • Mention vendor lock in concerns and flexibility
  • Mention What-If scenarios if there are delays in software implementation
  • Mention methodology in calculating return on investment.

 

 

 

Also

http://blogs.computerworlduk.com/infrastructure-and-operations/2010/10/three-fud-statements-used-not-to-implement-standards-based-networking/index.htm

2011 Forecast-ying

Free twitter badge
Image via Wikipedia

I had recently asked some friends from my Twitter lists for their take on 2011, atleast 3 of them responded back with the answer, 1 said they were still on it, and 1 claimed a recent office event.

Anyways- I take note of the view of forecasting from

http://www.uiah.fi/projekti/metodi/190.htm

The most primitive method of forecasting is guessing. The result may be rated acceptable if the person making the guess is an expert in the matter.

Ajay- people will forecast in end 2010 and 2011. many of them will get forecasts wrong, some very wrong, but by Dec 2011 most of them would be writing forecasts on 2012. almost no one will get called on by irate users-readers- (hey you got 4 out of 7 wrong last years forecast!) just wont happen. people thrive on hope. so does marketing. in 2011- and before

and some forecasts from Tom Davenport’s The International Institute for Analytics (IIA) at

http://iianalytics.com/2010/12/2011-predictions-for-the-analytics-industry/

Regulatory and privacy constraints will continue to hamper growth of marketing analytics.

(I wonder how privacy and analytics can co exist in peace forever- one view is that model building can use anonymized data suppose your IP address was anonymized using a standard secret Coco-Cola formula- then whatever model does get built would not be of concern to you individually as your privacy is protected by the anonymization formula)

Anyway- back to the question I asked-

What are the top 5 events in your industry (events as in things that occured not conferences) and what are the top 3 trends in 2011.

I define my industry as being online technology writing- research (with a heavy skew on stat computing)

My top 5 events for 2010 were-

1) Consolidation- Big 5 software providers in BI and Analytics bought more, sued more, and consolidated more.  The valuations rose. and rose. leading to even more smaller players entering. Thus consolidation proved an oxy moron as total number of influential AND disruptive players grew.

 

2) Cloudy Computing- Computing shifted from the desktop but to the mobile and more to the tablet than to the cloud. Ipad front end with Amazon Ec2 backend- yup it happened.

3) Open Source grew louder- yes it got more clients. and more revenue. did it get more market share. depends on if you define market share by revenues or by users.

Both Open Source and Closed Source had a good year- the pie grew faster and bigger so no one minded as long their slices grew bigger.

4) We didnt see that coming –

Technology continued to surprise with events (thats what we love! the surprises)

Revolution Analytics broke through R’s Big Data Barrier, Tableau Software created a big Buzz,  Wikileaks and Chinese FireWalls gave technology an entire new dimension (though not universally popular one).

people fought wars on emails and servers and social media- unfortunately the ones fighting real wars in 2009 continued to fight them in 2010 too

5) Money-

SAP,SAS,IBM,Oracle,Google,Microsoft made more money than ever before. Only Facebook got a movie named on itself. Venture Capitalists pumped in money in promising startups- really as if in a hurry to park money before tax cuts expired in some countries.

 

2011 Top Three Forecasts

1) Surprises- Expect to get surprised atleast 10 % of the time in business events. As internet grows the communication cycle shortens, the hype cycle amplifies buzz-

more unstructured data  is created (esp for marketing analytics) leading to enhanced volatility

2) Growth- Yes we predict technology will grow faster than the automobile industry. Game changers may happen in the form of Chrome OS- really its Linux guys-and customer adaptability to new USER INTERFACES. Design will matter much more in technology on your phone, on your desktop and on your internet. Packaging sells.

False Top Trend 3) I will write a book on business analytics in 2011. yes it is true and I am working with A publisher. No it is not really going to be a top 3 event for anyone except me,publisher and lucky guys who read it.

3) Creating technology and technically enabling creativity will converge at an accelerated rate. use of widgets, guis, snippets, ide will ensure creative left brains can code easier. and right brains can design faster and better due to a global supply chain of techie and artsy professionals.

 

 

A Missing Mandelbrot Who Dun It

Despite the GIF format's limitations, it can b...
Image via Wikipedia

I had tried recreating this .gif using #catools in a windows environment, but the resolution was not quite good. it seems package catools is dependent on Operating System,

Anyway, there are two approaches to creating this code- one is given at

http://blog.revolutionanalytics.com/2010/09/mandelbrot-set.html

and is simply

library(caTools)  # external package providing write.gif function
jet.colors = colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F",
        "yellow", "#FF7F00", "red", "#7F0000"))
m = 600     # define size
C = complex( real=rep(seq(-1.8,0.6, length.out=m), each=m ),
    imag=rep(seq(-1.2,1.2, length.out=m), m ) )
C = matrix(C,m,m)  # reshape as square matrix of complex numbers
Z = 0     # initialize Z to zero
X = array(0, c(m,m,20)) # initialize output 3D array
for (k in 1:20) {  # loop with 20 iterations
 Z = Z^2+C    # the central difference equation
 X[,,k] = exp(-abs(Z)) # capture results
}
write.gif(X, "Mandelbrot.gif", col=jet.colors, delay=100)

The other approach is from http://rtricks.blogspot.com/
and also suggests who the original author of this fascinating
 Mandelbrot gif was
- apparently it was created in 2005 and is 
5 years old

### Reproduced from http://tolstoy.newcastle.edu.au/R/help/05/10/13198.html### Written by Jarek Tuszynski, PhD.
 
library(fields) # for tim.colors
library(caTools) # for write.gif
m = 400 # grid size
C = complex( real=rep(seq(-1.8,0.6, length.out=m), each=m ),
imag=rep(seq(-1.2,1.2, length.out=m), m ) )
C = matrix(C,m,m)

Z = 0
X = array(0, c(m,m,20))
for (k in 1:20) {
Z = Z^2+C
X[,,k] = exp(-abs(Z))
}
image(X[,,k], col=tim.colors(256)) # show final image in
write.gif(X, "Mandelbrot.gif", col=tim.colors(256), delay=100)
and finally- this time I used Linux /Ubuntu 10
and got the colors correct- just happy to find who created the original image
---------------------------------------
Of course 2010 had its share of notable deaths- 
Benoit Mandelbrot passed away this year


SAS X

0o0 0O

Tal G, creator of the rbloggers.com website, has created a new blog aggregator for SAS language users at http://sas-x.com/

With almost 26 blogs joining there (I suspect many more should join , it seems like a good website to use for analytics users and students.  My favorite SAS Blog is http://statcompute.spaces.live.com/ – its pure code- little anything else.

Related-

SAS MACRO TO CALCULATE PDO (Points to Double Odds) OF A SCORECARD

A SAS MACRO FOR DECISION STUMP

A DEMO OF VECTOR AUTOREGRESSIVE FORECASTING MODEL

 

 

 

Trying out Google Prediction API from R

Ubuntu Login
Image via Wikipedia

So I saw the news at NY R Meetup and decided to have a go at Prediction API Package (which first started off as a blog post at

http://onertipaday.blogspot.com/2010/11/r-wrapper-for-google-prediction-api.html

1)My OS was Ubuntu 10.10 Netbook

Ubuntu has a slight glitch plus workaround for installing the RCurl package on which the Google Prediction API is dependent- you need to first install this Ubuntu package for RCurl to install libcurl4-gnutls-dev

Once you install that using Synaptic,

Simply start R

2) Install Packages rjson and Rcurl using install.packages and choosing CRAN

Since GooglePredictionAPI is not yet on CRAN

,

3) Download that package from

https://code.google.com/p/google-prediction-api-r-client/downloads/detail?name=googlepredictionapi_0.1.tar.gz&can=2&q=

You need to copy this downloaded package to your “first library ” folder

When you start R, simply run

.libPaths()[1]

and thats the folder you copy the GooglePredictionAPI package  you downloaded.

5) Now the following line works

  1. Under R prompt,
  2. > install.packages("googlepredictionapi_0.1.tar.gz", repos=NULL, type="source")

6) Uploading data to Google Storage using the GUI (rather than gs util)

Just go to https://sandbox.google.com/storage/

and thats the Google Storage manager

Notes on Training Data-

Use a csv file

The first column is the score column (like 1,0 or prediction score)

There are no headers- so delete headers from data file and move the dependent variable to the first column  (Note I used data from the kaggle contest for R package recommendation at

http://kaggle.com/R?viewtype=data )

6) The good stuff:

Once you type in the basic syntax, the first time it will ask for your Google Credentials (email and password)

It then starts showing you time elapsed for training.

Now you can disconnect and go off (actually I got disconnected by accident before coming back in a say 5 minutes so this is the part where I think this is what happened is why it happened, dont blame me, test it for yourself) –

and when you come back (hopefully before token expires)  you can see status of your request (see below)

> library(rjson)
> library(RCurl)
Loading required package: bitops
> library(googlepredictionapi)
> my.model <- PredictionApiTrain(data="gs://numtraindata/training_data")
The request for training has sent, now trying to check if training is completed
Training on numtraindata/training_data: time:2.09 seconds
Training on numtraindata/training_data: time:7.00 seconds

7)

Note I changed the format from the URL where my data is located- simply go to your Google Storage Manager and right click on the file name for link address  ( https://sandbox.google.com/storage/numtraindata/training_data.csv)

to gs://numtraindata/training_data  (that kind of helps in any syntax error)

8) From the kind of high level instructions at  https://code.google.com/p/google-prediction-api-r-client/, you could also try this on a local file

Usage

## Load googlepredictionapi and dependent libraries
library(rjson)
library(RCurl)
library(googlepredictionapi)

## Make a training call to the Prediction API against data in the Google Storage.
## Replace MYBUCKET and MYDATA with your data.
my.model <- PredictionApiTrain(data="gs://MYBUCKET/MYDATA")

## Alternatively, make a training call against training data stored locally as a CSV file.
## Replace MYPATH and MYFILE with your data.
my.model <- PredictionApiTrain(data="MYPATH/MYFILE.csv")

At the time of writing my data was still getting trained, so I will keep you posted on what happens.

China -United States -The Third Opium War

U.S.troops in China during the Boxer Rebellion...
Image via Wikipedia

A brief glance through http://www.treasury.gov/resource-center/data-chart-center/tic/Documents/mfh.txt

shows that while US added 600 billion of debt during the past one year, the Chinese actually reduced their exposure by 50 billion Dollars.

so who has been financing the debt for the US for the past one year- It is Japan- eager to keep its currency down and United Kingdom which has pumped in an extra 300 billion of T Bills.

See the whole table at official link above or at goo.gl/qMugp

—————————————————————————————-

China still remembers the Opium Wars in which the then ruling Anglo Saxon superpower used naval superiority to enforce trade and eventual political dependency. Is China unsure of the United States brotherly nice  intentions? They certainly seem to be putting their money that way.

http://en.wikipedia.org/wiki/Opium_Wars

Britain forced the Chinese government into signing theTreaty of Nanking and the Treaty of Tianjin, also known as the Unequal Treaties, which included provisions for the opening of additional ports to unrestricted foreign trade, for fixed tariffs; for the recognition of both countries as equal in correspondence; and for the cession of Hong Kong to Britain. The British also gained extraterritorial rights. Several countries followed Britain and sought similar agreements with China. Many Chinese found these agreements humiliating and these sentiments contributed to the Taiping Rebellion (1850–1864), the Boxer Rebellion (1899–1901), and the downfall of the Qing Dynasty in 1912, putting an end to dynastic China.

———————————————————————————————-

The Koreans can always be depended on provide the first shot in any conflict- and though Anglo-US-Chinese conflict would be expensive- I guess as long as the cost of outstanding debt with China is less than cost of a brief -techno-war , we would see interesting games in this neighborhood. Note China restricts major trade with United States particularly in software, internet services (like Web Advertising, Facebook, Twitter ) and represents a lucrative market for big pharma (especially in psychiatric drugs) and big tech once it reforms its intellectual property rights. Software would be the opium of the 21st Century- if Chinese resist the Treasury Bills as their poppy flowers. The widespread Western media coverage of school kids murders by pyschopaths is also a trade tactic to encourage flow of more US made medicine in the Chinese market.

It would also help create an economic revival in the United States to exaggerate the Chinese threat (remember Sputnik) and build up its own cyber spending. Any military or cyber humiliation for the ruling party in China can help create a political vacuum for more malleable and agreeable alternatives to emerge.

(to be continued)