## Marcus Aurelius: The Philosopher Emperor

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.

``````[code language="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

[/code]``````

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

``````[code language="python"]
length=iris['petal length (cm)']
width=iris['petal width (cm)']

plt.scatter(length, width, c=list(iris.index))
plt.show()
[/code]``````

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

``````[code language="python"]
from scipy import stats

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

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

``````[code language="python"]
r_value ** 2

# 0.9271098389904932
[/code]``````

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

``````[code language="python"]
def predict(x):
return slope * x + intercept

fitLine = predict(length)

plt.scatter(length, width)
plt.plot(length, fitLine, c='red')
plt.show()
[/code]``````

## 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”