LDA Topic Analysis with Gensim in Python

As part of a project, I needed to write a class for LDA with Gensim. I thought I would share it here... It's based on another tutorial I found online, but it's been modified and is a bit more reusable now. Readme is located in the repository here. ...
Read More

Natural Language Processing in Python – Sentiment using VADER

Another little bit of NLP showing how to do a quick and dirty sentiment analysis utilizing VADER within NLTK. It doesn't give the best accuracy on all datasets, but it removes complexity. Details below in the Jupyter Notebook. ...
Read More

Kaggle Submission: Mobile Phone Price Classification

A recent "submission" I completed based upon a Kaggle dataset. I use quotations as this particular dataset didn't include the ability to submit your final dataset. However, I had fun doing it and is a good example of multi-classification. ...
Read More

Keras and Tensorflow Pt III – Classification Example

This is a good simple example of a classification problem utilizing Keras and Tensorflow. In addition, I'm utilizing early stopping in an attempt to avoid overfitting in the model. You'll notice this take effect as the model stops training well before the 600 set epochs. ...
Read More

Choosing the right number of layers/neurons for a Neural Network (Python)

This seems to be a very confusing subject for most, and I've had difficulty while learning how to setup Keras NN models as the addition/subtraction of layers and neurons creates vastly different outcomes in model. Normally I wouldn't just link out to others, but there is a very well written synopsis found on StackExchange below that lays it out in a very simple fashion. Very brief summary: Input (first) layer: Neurons = Number of features in the datasetHidden layer(s): Neurons = Somewhere between 1 and the amount in the input later (take the mean); Number of hidden layers: 1 works for *most* applications, maybe none.Output (last) layer: exactly 1 unless it's a classification problem and you utilize the softmax activation, in which case the number equals the number of classes you are predicting https://stats.stackexchange.com/questions/181/how-to-choose-the-number-of-hidden-layers-and-nodes-in-a-feedforward-neural-netw Meaning in the case of a dataset with 20 features: #Example Keras Binary Classification model model = Sequential() model.add(Dense(20, activation='relu')) model.add(Dense(10, activation='relu')) model.add(Dense(1, activation='sigmoid')) model.compile(loss='binary_crossentropy',optimizer='adam') #Example Keras Multi-Class model model = Sequential() model.add(Dense(20, activation='relu')) model.add(Dense(10, activation='relu')) model.add(Dense(3, activation='softmax')) #If I...
Read More

Keras and Tensorflow Pt II – Regression Example

This is a more complex example of Keras, utilizing Regression. This utilizes a good sized dataset from Kaggle, but does contain a little bit of data cleansing before we can build out the model. Unfortunately the model we end up building isn't perfect and requires more tuning or some final dataset alterations, but it's a good example none the less. More information below. ...
Read More