Last modified on 30 Mar 2020.

  • Image compression using K-MeansOpen in HTMLOpen in Colab.
    • Load and write an image from/to Google Drive.
    • Change the image’s size from (height, weight, channels) to (height x weight, channels)
    • Reduce the image’s quality using smaller number of clusters.
  • Example to understand the idea of PCAOpen in HTMLOpen in Colab.
    • Plot points with 2 lines which are corresponding to 2 eigenvectors.
    • Plot & choose Principal Components.
    • An example of choosing n_components $K$.
    • Visualization hand-written digits (the case of all digits and the case of only 2 digits – 1 & 8).
    • Using SVM to classifier data in the case of 1 & 8 and visualize the decision boundaries.
  • Image compression using PCAOpen in HTMLOpen in Colab.
    • When input is an image, the values of adjacent pixels are highly correlated.
    • Import images from scipy and Google Drive or Github (with git).
    • Compress grayscale images and colored ones.
    • Plot a grayscale version of a colorful images.
    • Save output to file (Google Drive).
    • Fix warning Lossy conversion from float64 to uint8. Range […,…]. Convert image to uint8 prior to saving to suppress this warning.
    • Fix warning Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
    • Calculate a size (in KB) of a image file.
  • PCA without scikit-learnOpen in HTMLOpen in Colab.
  • Face Recognition using SVMOpen in HTMLOpen in Colab.
    • Using PCA to extract 150 fundamental components to feed into our SVG classifier.
    • Grid search cross-validation to explore combinations of parameters (gamma and C).
    • Classification report: precision, recall, f1-score, support.
    • Confusion matrix.
    • An example of using pipeline.
  • XOR problem using SVM to see the effect of gamma and C in the case of using RBF kernel – Open in HTMLOpen in Colab.