Skip to content

Instantly share code, notes, and snippets.

View saliksyed's full-sized avatar

Salik Syed saliksyed

  • California
View GitHub Profile
@saliksyed
saliksyed / autoencoder.py
Created November 18, 2015 03:30
Tensorflow Auto-Encoder Implementation
""" Deep Auto-Encoder implementation
An auto-encoder works as follows:
Data of dimension k is reduced to a lower dimension j using a matrix multiplication:
softmax(W*x + b) = x'
where W is matrix from R^k --> R^j
A reconstruction matrix W' maps back from R^j --> R^k
"""
Simple demo with multiple subplots.
"""
import numpy as np
import matplotlib.pyplot as plt
x1 = np.linspace(0.0, 5.0)
x2 = np.linspace(0.0, 2.0)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 21 18:01:05 2017
@author: saliksyed
"""
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 21 18:01:05 2017
@author: saliksyed
"""
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 21 18:01:05 2017
@author: saliksyed
"""
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
# Open the file with all the airports and read every line
data = open("airports.dat", "r").readlines()
# make an array to store the final data
final_data = []
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.pyplot as plt
# Let's read in the countries for each airport:
data = open("airports.dat", "r").readlines()
final_data = []
"""
=========================================================
Demo of the histogram (hist) function with a few features
=========================================================
In addition to the basic histogram, this demo shows a few optional
features:
* Setting the number of data bins
* The ``normed`` flag, which normalizes bin heights so that the
# Python Starter Quiz
# Try your best to answer these questions. It’s just an assessment so I can get
# a feel for the level of Python skills in the class. No stress and no grade for this :)
# Question 1 :
# Print out “Coding is awesome :)”
# Question 2:
# Python Starter Quiz
# Try your best to answer these questions. It’s just an assessment so I can get
# a feel for the level of Python skills in the class. No stress and no grade for this :)
# Question 1 :
# Print out “Coding is awesome :)”
print "Coding is awesome :)"
# Question 2: