#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
| import numpy as np | |
| import pdb | |
| from sklearn.datasets import make_classification | |
| from sklearn.mixture import GMM | |
| def fisher_vector(xx, gmm): | |
| """Computes the Fisher vector on a set of descriptors. |
#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
| from keras.models import Sequential | |
| from keras.layers import Dense | |
| x, y = ... | |
| x_val, y_val = ... | |
| # 1-dimensional MSE linear regression in Keras | |
| model = Sequential() | |
| model.add(Dense(1, input_dim=x.shape[1])) | |
| model.compile(optimizer='rmsprop', loss='mse') |
| # Mathieu Blondel, September 2010 | |
| # License: BSD 3 clause | |
| import numpy as np | |
| from numpy import linalg | |
| import cvxopt | |
| import cvxopt.solvers | |
| def linear_kernel(x1, x2): | |
| return np.dot(x1, x2) |
| # Mathieu Blondel, September 2010 | |
| # License: BSD 3 clause | |
| import numpy as np | |
| from numpy import linalg | |
| import cvxopt | |
| import cvxopt.solvers | |
| def linear_kernel(x1, x2): | |
| return np.dot(x1, x2) |
| import random | |
| import pandas | |
| import numpy as np | |
| from sklearn import metrics, cross_validation | |
| import tensorflow as tf | |
| from tensorflow.contrib import layers | |
| from tensorflow.contrib import learn | |
| random.seed(42) |
There is a prebuilt Centos 6.5 VM with the below components installed:
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers