This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # -*- coding: utf-8 -*- | |
| """ | |
| @author: Ibrahim Kovan | |
| https://ibrahimkovan.medium.com/ | |
| """ | |
| """ [1] """ | |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| @author: Ibrahim Kovan | |
| License CC0: Public Domain | |
| https://ibrahimkovan.medium.com/ | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import math | |
| import pandas as pd | |
| "1" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| @author: Ibrahim Kovan | |
| https://ibrahimkovan.medium.com/ | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import math | |
| X = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| @author: Ibrahim Kovan | |
| https://ibrahimkovan.medium.com/ | |
| """ | |
| from scipy.stats import poisson | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| X = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
| lmbda = 4.6 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import matplotlib.pyplot as plt | |
| from matplotlib.offsetbox import AnnotationBbox | |
| from matplotlib import offsetbox | |
| import tensorflow as tf | |
| from sklearn.manifold import Isomap | |
| from sklearn.datasets import fetch_openml | |
| mnist = fetch_openml('mnist_784') | |
| data = mnist.data[mnist.target == "9"][::10] | |
| def plot_components(data, model, images=None, ax=None, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import matplotlib.pyplot as plt | |
| import numpy as np | |
| from sklearn.datasets import load_digits | |
| from sklearn.manifold import Isomap | |
| from matplotlib.offsetbox import AnnotationBbox | |
| from matplotlib import offsetbox | |
| from sklearn.datasets import fetch_openml | |
| from sklearn.datasets import fetch_lfw_people | |
| faces = fetch_lfw_people(min_faces_per_person=40) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from sklearn.datasets import make_swiss_roll | |
| X, color = make_swiss_roll(n_samples=1000, random_state=2021) | |
| fig = plt.figure(figsize=(16,8)) | |
| ax = fig.add_subplot(111, projection='3d') | |
| ax.scatter(X[:, 0], X[:, 1], X[:, 2], c=color, cmap=plt.cm.rainbow) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from sklearn.datasets import load_digits | |
| digits = load_digits(n_class=5) | |
| x, y = digits.data, digits.target | |
| def plot_digits(X,title): | |
| with plt.style.context(("seaborn", "ggplot")): | |
| colors = ['red','green','orange','blue','purple','cyan','magenta', 'firebrick','indigo'] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from sklearn.datasets import make_s_curve | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| x, y = make_s_curve(n_samples=1000) | |
| from sklearn.manifold import MDS | |
| mds = MDS(n_components=2) | |
| x_mds = mds.fit_transform(x) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import seaborn as sns | |
| from matplotlib.offsetbox import OffsetImage, AnnotationBbox | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from sklearn.manifold import MDS | |
| from sklearn.datasets import fetch_olivetti_faces | |
| faces = fetch_olivetti_faces() | |
| x_faces = faces.data |