"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

August 10, 2021

Tech Talk - Causal Inference in Data Science From Prediction to Causation

Key Notes

  • Games Prediction - Higher Activity logins, Friends 
  • It could be another way, They play games and make friends
  • How do we increase the activity?
  • Different segments of people - Games to Friends, Ask Friends and play games
  • Observational metrics - Be mindful of hidden causes

  • Measure versions of algos - A/B Testing
  • Impact of Algo on different types of people
  • Lower activity - Higher CTR
  • CTR for different segments of users
  • Segment people and see the behavior of each segment with experiments
  • Combination of Experiments / Conversions / Measure of it
  • ML Recommendations
  • Split groups into different selections of the same category
  • The choice for new Algos - Frequent Buyers
  • Choice of old Algos - Low-frequency Buyers
  • Purchase behavior trend over years
  • Purchase behavior of new buyers
  • Experiment - Conversions - Alerts (Forecast vs Actuals)

Frameworks

  • Causal graphical models
  • Potential outcome framework


  • What would have happened if you did that?
  • What would have happened if you had not done that?

Evaluate existing systems


  • Old recommendations vs New Recommendation
  • Measure forecast deviations against actuals qualitatively







Feedback loop informs current best algo!!!


Keep Thinking!!!

August 06, 2021

Thoughts - Ideas - Application Log Analytics

  • The average number of users per day
  • The average number of User login by day 
  • Top Peak hours of App usage by weekday/weekend
  • User - Preferences - Areas spent in App
  • Weekend Usage
  • Duration of Average successful transaction
  • The age group of users vs Duration of users
  • Multiple logins per day
  • Average session for multiple users
  • Average transactions are done per month by age group
  • Segmentation of customers based on areas of usage - Age_group, App_Area, Number_of_Transactions_per_day, Number_of_Login_by_day
  • Segmentation of customers based on Transaction types, Transaction value, Transaction category
  • Types of App Errors
  • Types of Timeouts
  • Peak App Usage during Holiday
  • Peak App Usage during Markets Signals (High)
  • Signals at Month End, Quarter End, Fiscal Year-End
  • Trend usage patterns during quarters / Months / Holiday 2 Week periods
  • Usage Life year over year
  • Hourly Patterns 

Keep Thinking!!!

August 05, 2021

Research paper reads connected cars

Data science applications to connected vehicles

Key Notes

  • Data generated by sensors and actuators in Connected vehicles include noisy, anomalous, redundant, rapidly changing, correlated and heterogeneous data. 

Main findings

  • Multitude of formats and data types 
  • Data in Connected vehicles are generated and collected at high speed

Applications

  • Mobility
  • Understand patterns and trends in mobility data
  • Predicting traffic flow
  • Provide shortest or alternative routes

Safety

  • Driver behaviour and performance analysis
  • Infer real-time environmental conditions
  • Lane-changing assistance
  • Understand interactions between drivers and pedestrian at signalized intersections

Support

  • Guidance to parking spaces - Driver behaviour analysis (e.g., in the insurance domain, for calculating a safety score for the driver: pay-how-you-drive instead of insurance premiums based on population groups)
  • Vehicle predictive maintenance.

Connected vehicle data 

  • 560 GB/day
  • Data generated in CVs exhibit either temporal correlation, spatial correlation or both
  • A stream is a sequence of data elements ordered by time
  • Discrete signals, event logs, or any combination of time series data


  • Drift is more associated to gradual changes in the target concept


  • Sensory data stream
  • Spatial, temporal, and spatio-temporal attributes
  • Existence of missing data (absent readings). 
  • Real-time data cleaning
  • Knowledge discovery from data streams
  • Data windows are a way of looking at relevant slices of a data stream. 
  • Windowing models landmark, tilted, sliding and damped windows

Anomaly Detection with these properties - For every data type we might need to look data properties with respect to time - Recurring patterns, gradual increase, sudden increase, Lows and Highs.   

In stock market they do this in terms on candle stick patterns, looking for patterns in duration of 3months, 6months and see if something demonstrates. Anomaly is subjective to use case but properties of data (Sudden, incremental, Gradual, Recurring) about it will spot anomaly comparing historical vs current observations.

Sliding Window. Given a window with width w and current time point t, the interest is in the frequent patterns occurring in the window [t − w + 1, t].

Landmark Window identifies relevant points (the landmark) in the data stream and the aggregate operator uses all records seen so far after the landmark.

Damped Window Model. This model assigns greater weight to more recently arrived transactions.

Data pre-processing

  • Noise filtration
  • Outliers detection
  • Anomaly detection
  • Feature extraction
  • Sparsity handling

Knowledge management.

  • On-device
  • On-edge
  • Remote

Algorithms for clustering data streams

  • Stream and CluStream algorithms

State-of-the-art on clustering data streams

  • CluStream [1], DenStream [2], StreamKM++ [3], or ClusTree
  • DenStream [2] is an extension of DBSCAN algorithm
  • StreamKM++ [3] of k-means++, StrAP [4] of AP

On a record-at-a-time processing model, long-running stateful operators process records as they arrive, update the internal state, and send out new records

Micro-batching processing model runs each streaming computation as a series of deterministic batch computations on small time intervals

CluStream - The idea behind the CluStream [1] method is to divide the clustering process into an online component which periodically stores detailed summary statistics and an offline component which uses only this summary statistics.

StreamKM++ [3] is a two-phase (online-offline) algorithm which maintains a small outline of the input data using the merge-and-reduce technique. 

StrAP [4] is an extension of the Affinity Propagation (AP) [44] algorithm for data streams, which uses a reservoir for saving potential outliers

DenStream [2] is a density-based data stream clustering algorithm that also uses a feature vector based on the CF vector.

SOStream [50] is a density-based clustering algorithm inspired by both the principle of the DBSCAN algorithm and self-organizing maps (SOM)

More Reads

Keep Thinking!!!

















August 04, 2021

Kubernetes for 90's Kids

  • Essentially it's a way to run containerized workloads
  • Production-grade container orchestrator

So What is a Container?

  • A container image is a ready-to-run software package, containing everything needed to run an application
  • By design, a container is immutable: you cannot change the code of a container that is already running

How do all these things work?

Key Components of Kubernetes cluster

  • API Server - interaction point for all Kubernetes components 
  • Kubelet - The on-host agent that communicates with the API server 
  • Controller Manager - A set of controllers
  • Scheduler - Determines where workloads should 
  • Kube Proxy - Implements Kubernetes services providing virtual IPs 

So essentially environment to run a packaged application with all binaries and required packages. It handles deployment, monitoring, scaling in the cluster.

Keep Learning!!!


My perspectives of Agile Development

  • Consider both Domain and Technology while designing
  • Wear the hat of both End Customers, Technical Architect perspective - Pick the pieces of technology
  • Think first from the customer perspective
  • Include scalability thought while designing your architecture
  • The big picture means you know the finer aspects of the unseen areas :) 
  • People mature with experiences and find their best working ways of Development with complete perspectives, My best approach that gives my best
  • Master your craft/approach of development, Everyone has their unique ways of building solutions
If we follow all of this we will have - Agile Code over Presentations, Prototype over Detailed Spec discussions

Along with Explainable AI, we also need Explainable Sprints where you have clarity/perspective of tasks you pick. Values do not come from duration, It comes with the impact of the solution and the areas it solves.

To understand / Learn connect to a Definition / Topic 
  • Take the concept
  • Apply your past development lessons and see if you can connect similarities
  • Apply your domain perspectives and see where this could apply better than past choices
Have your customization
  • Smartness is a set of lessons from our own failures
  • Customize agile to make your end goal clear and plan accordingly
  • Smart people will outperform process
Diversity Thinking = Domain knowledge + Technical tools perspective + Think from a birds-eye view and build things + Have your own flavor of development, Do what works best for you

Keep Thinking!!!

Perspectives - Matching same person from different data points

 In one of the customer projects in the past company I looked into the insurance perspective

  • PhoneNumber1, Email1 - Booking1
  • PhoneNumber2, Email1 - Booking2
  • Email1, Location1 - Booking3
  • PhoneNumber1, Location2 - Booking4
  • ShortName1, PhoneNumber1 - Booking5
  • FullName1, PhoneNumber2 - Booking6
  • NLP for the rescue of misspelled locations, partial/full match of full or short names
We may have several rules to look for a potential match
 All match
  • Partial match
  • Default match
  • NLP for the rescue of misspelled locations, partial/full match of full or short names

We need multiple perspectives, Diversity thinking to solve the problem both from technical / business/perspectives

Keep Thinking!!!

Azure Common Data Model

You have to bookmark your thoughts, Sometimes I find it hard to even recall the links/sites visited. From my past retail efforts, I had a frame of thought on data models. 

The common data model is another abstraction and is ready to use. This would come as ready aid for domain experts to recommend the suitable schema for the implementation. Schema maps easily to transfer business requirements.

To Explore CDM link, link1

The Customer Insights link


I would suggest a mix of both

Business Needs + CDM Model + Past Experiences = Proposed Schema

Need to explore a bit more on integration. Certain more things could be

  • Industry
  • Segments
  • Use Cases
Holistic complete schema vs schema for a particular use case.

Keep Thinking!!!

August 02, 2021

Research Paper Reads - DS Development Challenges

Paper #1 - Automating Data Science: Prospects and Challenges

Key Notes

  • Data science can be viewed as overlapping or broader in scope than other data-analytic methodological disciplines, such as statistics, machine learning, databases, or visualization
  • The breadth and complexity of these and many other data science scenarios means that the modern data scientist requires broad knowledge and experience across a multitude of topics

  • In classical goal-oriented projects, the process often consists of activities in the following order: Data Exploration, Data Engineering, Model Building and Exploitation.


Machine Learning Model Development from a Software Engineering Perspective: A Systematic Literature Review

Key Notes

The stages addressed in terms of Machine Learning Model Development

  • A Model requirements stage which is related to the agreement between stakeholders and the way the model should work.
  • Data processing stage which involves data collection, cleaning and labelling (in case of supervised learning).
  • Feature engineering stage which involves the modification of the selected data.
  • Model training stage which is related to the way the selected model is trained and tuned on the (labeled) data.
  • Model evaluation stage which regards to the measurements used in order to evaluate the model.
  • Model deployment stage which includes deploying, monitoring and maintaining the model.

Data Science Methodologies: Current Challenges and Future Approaches

Key Notes

  • Leveraging data science within a business organizational context involves additional challenges beyond the analytical ones. 






Artificial intelligence projects in healthcare: 10 practical tips for success in a clinical environment

Key Notes


Keep Thinking!!!




August 01, 2021

AI City Challenge - Key Lessons

AI City Challenge - Key Lessons

2018 AI City Challenge

Key Notes

  • Detection Models - YOLO2, DenseNet,Mask
  • R-CNN,  Faster R-CNN
  • The Mask R-CNN model, in particular, was
  • able to detect and localize small vehicles with excellent precision
  • Tracking - clustering-based association,  graph optimization, medianflow, Kalman filtering
  • Most successful approaches are based on traffic motion flow analysis (e.g., using optical flow) rather than trying to detect and track individual vehicles
  • Re-identification matching -  triplet loss
  • Re-id using Vehicle number match

  • Data Issues - video quality, illumination and environmental conditions

The 2019 AI City Challenge

Key Notes

  • Extracting visual features from convolutional neural networks (CNNs), and leveraging semantic features from traveling direction and vehicle type classification.
  • The utilization of vehicles semantic attributes 
  • Novel two-stage framework based on anomaly candidate identification and starting time estimation
  • Data Issues - vehicle-based problems are more challenging, due to the high intra-class variability caused by the dependence of shapes on viewing angles, and high inter-class similarity, as vehicle models produced by different manufacturers look visually alike

The 4th AI City Challenge

Key Notes

  • For vehicle detection, most teams [5, 1, 37] selected YOLOv3
  • For vehicle tracking, DeepSORT
  • Hungarian matching algorithm to associate detections into tracklets, considering both spatial and appearance features.
  • Motion-based tracking
  • Trained classifiers for vehicle type, color, and viewpoint/orientation using the labels on synthetic data and made predictions on real-world data
  • Multi-target single-camera (MTSC) tracking,
  • ReID for appearance feature extraction, and spatio-temporal association to assign identities to tracklets across multiple cameras.
  • Anomaly prediction module used K-means clustering to identify potential anomalous regions
  • Data Challenges Challenges in this regard include the variety in camera views, image quality, lighting, and weather conditions

Keep Thinking!!!

Day #2 - Docker Mac - Error - read/write on closed pipe

Mac Error - Docker - read/write on closed pipe

Solution - if you are on Mac, make sure docker hub is running

Keep Learning!!!