Machine Learning Algorithms

ML algorithms include:

  • Classification: logistic regression, naive Bayes,...
  • Regression: generalized linear regression, survival regression,...
  • Decision trees, random forests, and gradient-boosted trees
  • Recommendation: alternating least squares (ALS)
  • Clustering: K-means, Gaussian mixtures (GMMs),...
  • Topic modeling: latent Dirichlet allocation (LDA)
  • Frequent itemsets, association rules, and sequential pattern mining

ML workflow utilities include:

  • Feature transformations: standardization, normalization, hashing,...
  • ML Pipeline construction
  • Model evaluation and hyper-parameter tuning
  • ML persistence: saving and loading models and Pipelines

Other utilities include:

  • Distributed linear algebra: SVD, PCA,...
  • Statistics: summary statistics, hypothesis testing,...

Tensor Flow Docker Image

TensorFlow Docker Installation & Setup

1.       Get the Tensor Flow Docker image
:/> docker pull tensorflow/tensorflow

2.       Start the instance
:/> docker run -it  -p 8888:8888 --rm tensorflow/tensorflow

3.       Once you access the url with port and token as shown in the above command

4.       Login to the tensor container
NOTE: "tensor" below is name of the conatiner otherwise use the container id.

Nvidia CUDA Docker Image

Machine Learning API's

Vector Graphics vs Raster Graphics

Vector graphics is the use of polygons to represent images in computer graphics. Vector graphics are based on vectors, which lead through locations called control points or nodes. Each of these points has a definite position on the x- and y-axes of the work plane and determines the direction of the path; further, each path may be assigned various attributes, including such values as stroke color, shape, curve, thickness, and fill.

In computer graphics, a raster graphics or bitmap image is a dot matrix data structure, representing a generally rectangular grid of pixels

A raster is technically characterized by the width and height of the image in pixels and by the number of bits per pixel (or color depth, which determines the number of colors it can represent)

A rasterized form of the letter 'a' magnified 16 times using pixel doubling

Machine Learning in Java - Apache Spark MLLib

Removing Docker images and containers

1. List & Remove images
docker images -a
docker rmi image-name1 image-name2

2. List & removeDangaling Images
docker images -f dangling=true
docker rmi $(docker images -f dangling=true -q)

3. Remove all images
docker rmi $(docker images -a -q)

4. List & Remove images by pattern
docker ps -a |  grep "pattern"
docker images | grep "pattern" | awk '{print $1}' | xargs docker rm

5. List & Remove containers

docker ps -a
docker rm container1_id container2_id

docker container rm contianer-name

6. Remove container upon exit
docker run --rm image_name

7. List & Remove all exited containers
docker ps -a -f status=exited
docker rm $(docker ps -a -f status=exited -q)

8. Listing  & Removing using Multiple filters
docker ps -a -f status=exited -f status=created
docker rm $(docker ps -a -f status=exited -f status=created -q)

9. List and Remove all containers by pattern

docker ps -a |  grep "pattern”
docker ps -a | grep "pattern" | awk '{print $3}' | xargs docker rmi

10. Stop and remove all containers
docker ps -a

docker stop $(docker ps -a -q) 
docker rm $(docker ps -a -q)

docker stop container-name

11. List & Removing Volumes
docker volume ls
docker volume rm volume_name volume_name

12. List and remove all dangling volumes
docker volume ls -f dangling=true
docker volume rm $(docker volume ls -f dangling=true -q)

13. Remove Volume and its container
docker rm -v container_name