Marcus Aurelius: The Philosopher Emperor

Marcus Aurelius: The Philosopher Emperor

Wednesday, Apr 24, 2019, 7:00 PM

CB2
5-7 Norfolk St Cambridge, GB

11 Members Went

Our next meet-up will focus on the philosopher-emperor Marcus Aurelius, in conjunction with the publication of the newest book of Stoic writer Donald Robertson: How to Think Like a Roman Emperor: The Stoic philosophy of Marcus Aurelius (https://amzn.to/2TDP4rE). Marcus was the last emperor of the so called ‘Five-Good-Emperors’ period of the Roman E…

Check out this Meetup →

The next session will focus on the philosopher-emperor Marcus Aurelius, in conjunction with the publication of the newest book of Stoic writer Donald Robertson: How to Think Like a Roman Emperor: The Stoic philosophy of Marcus Aurelius.

Marcus was the last emperor of the so called ‘Five-Good-Emperors’ period of the Roman Empire. He spent 12 years of his reign fighting the Germanic tribes on the border of the Empire (the same as seen at the beginning of the film Gladiator).

And, at nights in his tent, he wrote his most famous work Meditation (or ‘to himself’). Consequently, this book is a sort of diary and philosophic text. It contains an amazing recollection of the most important Stoic teachings plus the internal discussion of the emperor Marcus Aurelius, resulting in the most intimate, lonely and rational diary that you will ever encounter.

Simple linear regression in Python

Let’s see a simple way to produce compute a linear regression using Python.


import matplotlib.pyplot as plt # To plot the graph

# Import a database to use in this case I choose the famous Iris database
import matplotlib.pyplot as plt
import pandas as pd

iris = pd.DataFrame(db.load_iris()['data'], 
                    columns=list(db.load_iris()['feature_names']), 
                    index=list(db.load_iris()['target']))

Let’s take two columns from the database and plot it:

length=iris['petal length (cm)']
width=iris['petal width (cm)']

plt.scatter(length, width, c=list(iris.index))
plt.show()
Iris database, petal length vs. petal width

Now, to compute the linear regression we need scipy library:

from scipy import stats

# Here we compute the linear regression
slope, intercept, r_value, p_value, std_err = stats.linregress(length, width)

Not surprisingly, our R-squared value shows a really good fit:

r_value ** 2

# 0.9271098389904932

Let’s use the slope and intercept we got from the regression to plot predicted values vs. observed:

def predict(x):
    return slope * x + intercept

fitLine = predict(length)

plt.scatter(length, width)
plt.plot(length, fitLine, c='red')
plt.show()

UCL PhD thesis, Latex template

As March the 28th 2019, I will officially awarded with my PhD in the University College London (UCL).

While waiting for the thesis to be public available and downloadable I thought to share the LaTeX code I wrote it in.

A template is already present in the share latex website.

However, in my code is not only present the template with the UCL standards but also template of tables, figure and equation.

Last but not least, an example of the use of bibliography.

Hopefully, it will be easier and faster for you to write your thesis.

All needed files are present in my GitHub repository called UCL_PhD_Latex_template.

Continue reading “UCL PhD thesis, Latex template”