Friday, December 1, 2017

The Circles Method

C - Comprehend situation : What , Who, Why, How?

I -  Identify Personas / customers

R - Report customer needs - as ___, I want ___ that ____

C - Cut, through prioritization > ROI Estimate?

L - List Solutions

E - Evaluate trade offs: thoughtful, analytical, objective

S - Summarize recommendation - what, why vs others, recap.




References & Further Reading

https://www.impactinterview.com/2016/08/circles-method-product-design-framework/

Jupyter Notebooks - 1

Jupyter Notebook is essentially a web app that allows us to combine explanatory text, code, equations, visualizations etc in a document that can be shared.

Notebooks are a form of literate programming.

Notebook server which is the core of all interactions via Notebook support a number of kernels.

Read more about how IPython (kernel for python) & Jupyter Notebook works at

https://jupyter.readthedocs.io/en/latest/architecture/how_jupyter_ipython_work.html

Here's a reference diagram from that documentation:





Further Reading:
Setting up remote kernel - http://jupyter-notebook.readthedocs.io/en/latest/public_server.html

Monday, November 27, 2017

Anomaly Detection - 1

On a broad level, anomalies can be classified as point anomalies, contextual anomalies and collective anomalies.

Here's some of techniques that can be used to detect anomalies

1.  Statistical Methods

Flag data points that deviate from common statistical properties of a distribution - mean, mode, median, quantile.

We can use rolling average or moving average to smoothen short term fluctuations. A low pass filter can be used by n-period simple moving average.

2.  Density Based Anomaly Detection

This technique assumes that normal data points will occur around a dense neighborhood and the abnormalities will be far away (based on k-nearest neighbors algorithm or local outlier factor).

3. Clustering (e.g. K-means clustering algorithm)

4. Support Vector Machine - Variants of SVM like One-Class SVM can be used for anomaly detection.



Further Reading: 

1.https://en.wikipedia.org/wiki/Anomaly_detection
2.http://www.nehalemlabs.net/prototype/blog/2013/04/05/an-introduction-to-smoothing-time-series-in-python-part-i-filtering-theory/
3.https://bugra.github.io/work/notes/2014-03-31/outlier-detection-in-time-series-signals-fft-median-filtering/

NLP Basics - 1

Tokenization - Process of segmenting running text into words and sentences.

Normalization - Steps we take to condense terms into lexical units.

Named Entity Extraction - Locate and classify named entities in text into pre-defined categories

Stemming - Reducing inflected words to their root form.

Lemmatization - Grouping together inflected forms of a words so that they can be analyzed as a single item.




API  Links:

1. Watson - https://www.ibm.com/watson/services/natural-language-classifier/
2. Google Cloud Platform - https://cloud.google.com/natural-language/
3. Amazon Lex - https://aws.amazon.com/lex/
4. Facebook Deep Text - https://code.facebook.com/posts/181565595577955/introducing-deeptext-facebook-s-text-understanding-engine/
5. Microsoft Cognitive Services - https://azure.microsoft.com/en-in/services/cognitive-services/directory/lang/



References:

https://www.ibm.com/developerworks/community/blogs/nlp/entry/tokenization?lang=en

Saturday, November 25, 2017

Interpreting ML Models - 1

Data Leakage - When information available in the context of model training is unavailable in deployment setting

Feature Importance Algorithm - Describes magnitude of dependance a model has on a feature

FairML can be used to measure model's dependence on its inputs

1. Seeing Data - glyphs, correlation graphs, 2-d projections, partial dependence plots, residual analysis

2. Related Models - OLS regression : penalized regression, generalized additive models, quantile regression

3. Understanding complex learning models: Surrogate modes, Local Interpretable Model agnostic explanations (LIME) , LOCO, Tree Interpreter.







References & Further Reading:

http://blog.fastforwardlabs.com/2017/03/09/fairml-auditing-black-box-predictive-models.html
https://www.oreilly.com/ideas/ideas-on-interpreting-machine-learning
http://www.nature.com/news/can-we-open-the-black-box-of-ai-1.20731
https://homes.cs.washington.edu/~marcotcr/blog/lime/

Friday, November 24, 2017

AI Environments

Here's some basic terminology related to environments in AI


1. Fully vs Partially Observable Environment / System

An environment is called fully observable if the what the intelligent agent senses is good enough to make an optimal decision.

In partially observable systems, an intelligent agent will generally need some memory to make the best possible action.

2. Deterministic vs Stochastic Environment

If we can uniquely determine outcomes from agent's actions, we are in an deterministic environment. If there is an element of randomness that impacts the outcome, we are in a stochastic environment.

3.  Discrete vs Continous

Discrete: We have finitely many action choices or finitely many things that can be sensed (e.g. Chess)
Continous: Space of possible actions or things we can sense may be infinite

4. Benign vs Adversarial Environments

Benign : Environment might be random/ stochastic but it has no objectives of its own to contradict your own objectives

Adversarial: There is an agent which actively observes you and counteracts what you are trying to achieve

Monday, August 1, 2016

Big Data & 3 Vs

What is Big Data?

In simple terms it can be considered as data which is too large to be processed on a machine or to be processed by traditional data processing applications. Generally 3V model is used to describe Big Data.



1. Volume - Refers to the size of data we are dealing with. 


2. Velocity - Refers to sources and format of data we are dealing with.


3. Variety - Refers to speed at which data is generated or speed at which data is made available for processing.






References:


1. The 3 V's were first defined in a research report by Douglas Laney in 2001 titled "3D Data Management: Controlling Data Volume, Velocity and Variety" .


2. Wikipedia