In [1]:
%matplotlib inline
import seaborn
import matplotlib.pyplot as plt

In [2]:
import numpy as np
import pandas as pd
import seaborn as sns
sns.set(style="white")


# Generate a random correlated bivariate dataset
rs = np.random.RandomState(5)
mean = [0, 0]
cov = [(1, .5), (.5, 1)]
x1, x2 = rs.multivariate_normal(mean, cov, 500).T
x1 = pd.Series(x1, name="$X_1$")
x2 = pd.Series(x2, name="$X_2$")

In [ ]:


In [3]:
import IPython
from IPython import nbconvert
html_exporter = nbconvert.HTMLExporter()

(body, resources) = html_exporter.from_file("./SaveTest.ipynb")

In [4]:
f = open('./my.html','w')
f.write(body) # python will convert \n to os.linesep
f.close() # you can omit in most cases as the destructor will call it

In [ ]:


In [ ]:


In [69]:
import pyScribbler

In [70]:
docu = pyScribbler.pyScribbler("http://localhost", 4000)

In [71]:
docu.setMetaData(author="Lukas", description="another test once more", title="another_te333st again")
docu.setExperimentName(documentationId="anomaly_detection", experimentId="another_test54")

In [72]:
docu.addParameter(iteration=0, group="SVM", name="kernel", value="rbf")

In [73]:
docu.addPerformanceMeasure(iteration=0,name="F1Sore", value=12)
docu.addPerformanceMeasure(iteration=0,name="Precision", value=10)
docu.addPerformanceMeasure(iteration=0,name="Recall", value=2)

In [74]:
docu.experimentStarted()

In [75]:
docu.experimentIterationFinished()

In [ ]:


In [76]:
fig = plt.figure()
plt.figure()
plt.plot([1, 2])
plt.title("test")
# Show the joint distribution using kernel density estimation
k = sns.jointplot(x1, x2, kind="kde", size=7, space=0)


<matplotlib.figure.Figure at 0x7f284ae2ac50>

In [77]:
docu.savePyplotFigure(k,"sample23")


success

In [78]:
import IPython
from IPython import nbconvert
html_exporter = nbconvert.HTMLExporter()

(body, _) = html_exporter.from_file("./SaveTest.ipynb")

In [79]:
docu.saveHTML(body, "fulldocument")


success

In [80]:
docu.experimentEnded()


document updated

In [ ]:


In [ ]: