NLP3o: A web app for simple text analysis

We have seen earlier an introduction of few NLP (Natural Language Processing) topics, specifically how to tokenise a text, remove the punctuation and its stop words (the most common words such as the conjunctions) and how to find the top used words.

Now we can see – as an example – how to put all these inside a simple web app.

The entire source code is available on GitHub, so you can better follow along; and you can see it in action in a Heroku dyno.

Screen Shot 2017-07-29 at 14.55.08 Continue reading “NLP3o: A web app for simple text analysis”

Advertisements

Logistic regression with Python statsmodels

We have seen an introduction of logistic regression with a simple example how to predict a student admission to university based on past exam results.
This was done using Python, the sigmoid function and the gradient descent. 

We can now see how to solve the same example using the statsmodels library, specifically the logit package, that is for logistic regression. The package contains an optimised and efficient algorithm to find the correct regression parameters.
You can follow along from the Python notebook on GitHub.

Continue reading “Logistic regression with Python statsmodels”

New Chinese Science Fiction

This time I do a digression from my usual themes to talk about Chinese Science Fiction. But you will see that is not a great deviation: some of the topics are familiar; as William Gibson famously said: The future is already here — it’s just not very evenly distributed.

I have always been a science fiction fan and I noticed in the last years that the genre is booming in China (maybe as a way to more freely talk about current affairs disguising them about speculative fiction?)

Here are three books that I enjoyed lately.  The links are to the authors or publishers pages, not any book retail page. Continue reading “New Chinese Science Fiction”