diff --git a/doc/pub/LogReg/html/._LogReg-bs000.html b/doc/pub/LogReg/html/._LogReg-bs000.html index 893f7e0c6..f34204f18 100644 --- a/doc/pub/LogReg/html/._LogReg-bs000.html +++ b/doc/pub/LogReg/html/._LogReg-bs000.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -142,7 +144,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 16, 2019

    +

    Sep 18, 2019


    @@ -159,7 +161,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs001.html b/doc/pub/LogReg/html/._LogReg-bs001.html index f23dc78c2..c05eb5ea9 100644 --- a/doc/pub/LogReg/html/._LogReg-bs001.html +++ b/doc/pub/LogReg/html/._LogReg-bs001.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -176,7 +178,7 @@ failure etc.
  • 10
  • 11
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs002.html b/doc/pub/LogReg/html/._LogReg-bs002.html index e468c1a6d..840803a49 100644 --- a/doc/pub/LogReg/html/._LogReg-bs002.html +++ b/doc/pub/LogReg/html/._LogReg-bs002.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -154,7 +156,7 @@ models, as we will see later.
  • 11
  • 12
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs003.html b/doc/pub/LogReg/html/._LogReg-bs003.html index e2d495a52..7ad920f8b 100644 --- a/doc/pub/LogReg/html/._LogReg-bs003.html +++ b/doc/pub/LogReg/html/._LogReg-bs003.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -138,7 +140,11 @@ primary goal is to identify the classes to which new unseen samples belong.

    -Let us specialize to the case of two classes only, with outputs \( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a credit card user who could default or not on her/his credit card debt. That is +Let us specialize to the case of two classes only, with outputs +\( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a +credit card user that could default or not on her/his credit card +debt. That is + $$ y_i = \begin{bmatrix} 0 & \mathrm{no}\\ 1 & \mathrm{yes} \end{bmatrix}. $$ @@ -162,7 +168,7 @@ $$

  • 12
  • 13
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs004.html b/doc/pub/LogReg/html/._LogReg-bs004.html index 4b0292fa7..c372ae939 100644 --- a/doc/pub/LogReg/html/._LogReg-bs004.html +++ b/doc/pub/LogReg/html/._LogReg-bs004.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -161,7 +163,7 @@ where \( \hat{y} \) is a vector representing the possible outcomes, \( \hat{X} \
  • 13
  • 14
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs005.html b/doc/pub/LogReg/html/._LogReg-bs005.html index 694bd95ab..4b4948a3f 100644 --- a/doc/pub/LogReg/html/._LogReg-bs005.html +++ b/doc/pub/LogReg/html/._LogReg-bs005.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -129,10 +131,7 @@ MathJax.Hub.Config({ The main problem with our function is that it takes values on the entire real axis. In the case of logistic regression, however, the labels \( y_i \) are discrete -variables. - -

    -The table shows an example where we have a followed a group of students during a whole semester, with the aim to see if there are correlations between the number of hours they study and the number of hours they sleep. The output \( y_i \) is labelled as either \( 0 \) (a a grade below average) and \( 1 \), the latter corresponding to a grade above average. +variables. A typical example is the credit card data discussed below here, where we can set the state of defaulting the debt to \( y_i=1 \) and not to \( y_i=0 \) for one the persons in the data set (see the full example below).

    One simple way to get a discrete output is to have sign @@ -143,13 +142,6 @@ literature. This model is extremely simple. However, in many cases it is more favorable to use a ``soft" classifier that outputs the probability of a given category. This leads us to the logistic function. -

    -The code for plotting the perceptron can be seen here. This si nothing but the standard Heaviside step function. -

    - - -

    
    -

    @@ -171,7 +163,7 @@ The code for plotting the perceptron can be seen here. This si nothing but the s

  • 14
  • 15
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs006.html b/doc/pub/LogReg/html/._LogReg-bs006.html index 7ec6b80f2..657d08d63 100644 --- a/doc/pub/LogReg/html/._LogReg-bs006.html +++ b/doc/pub/LogReg/html/._LogReg-bs006.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -141,11 +143,81 @@ p(t) = \frac{1}{1+\mathrm \exp{-t}}=\frac{\exp{t}}{1+\mathrm \exp{t}}. $$ Note that \( 1-p(t)= p(-t) \). -The following code plots the logistic function. +The following code plots the logistic function, the step function and other functions we will encounter from here and on. +

    -

    
    +
    """The sigmoid function (or the logistic curve) is a
    +function that takes any real number, z, and outputs a number (0,1).
    +It is useful in neural networks for assigning weights on a relative scale.
    +The value z is the weighted sum of parameters involved in the learning algorithm."""
    +
    +import numpy
    +import matplotlib.pyplot as plt
    +import math as mt
    +
    +z = numpy.arange(-5, 5, .1)
    +sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
    +sigma = sigma_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, sigma)
    +ax.set_ylim([-0.1, 1.1])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sigmoid function')
    +
    +plt.show()
    +
    +"""Step Function"""
    +z = numpy.arange(-5, 5, .02)
    +step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
    +step = step_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, step)
    +ax.set_ylim([-0.5, 1.5])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('step function')
    +
    +plt.show()
    +
    +"""Sine Function"""
    +z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
    +t = numpy.sin(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, t)
    +ax.set_ylim([-1.0, 1.0])
    +ax.set_xlim([-2*mt.pi,2*mt.pi])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sine function')
    +
    +plt.show()
    +"""Plots a graph of the squashing function used by a rectified linear
    +unit"""
    +z = numpy.arange(-2, 2, .1)
    +zero = numpy.zeros(len(z))
    +y = numpy.max([zero, z], axis=0)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, y)
    +ax.set_ylim([-2.0, 2.0])
    +ax.set_xlim([-2.0, 2.0])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('Rectified linear unit')
    +
    +plt.show()
     

    @@ -168,6 +240,8 @@ The following code plots the logistic function.

  • 14
  • 15
  • 16
  • +
  • ...
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs007.html b/doc/pub/LogReg/html/._LogReg-bs007.html index 35f605577..3e9d8aa5e 100644 --- a/doc/pub/LogReg/html/._LogReg-bs007.html +++ b/doc/pub/LogReg/html/._LogReg-bs007.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -163,6 +165,7 @@ $$
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs008.html b/doc/pub/LogReg/html/._LogReg-bs008.html index 62f4afddc..edf49abce 100644 --- a/doc/pub/LogReg/html/._LogReg-bs008.html +++ b/doc/pub/LogReg/html/._LogReg-bs008.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -164,6 +166,7 @@ $$
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs009.html b/doc/pub/LogReg/html/._LogReg-bs009.html index af1c8886f..d84c6e902 100644 --- a/doc/pub/LogReg/html/._LogReg-bs009.html +++ b/doc/pub/LogReg/html/._LogReg-bs009.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -162,6 +164,7 @@ in practice we often supplement the cross-entropy with additional regularization
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs010.html b/doc/pub/LogReg/html/._LogReg-bs010.html index f22f85bb5..e6b64d96f 100644 --- a/doc/pub/LogReg/html/._LogReg-bs010.html +++ b/doc/pub/LogReg/html/._LogReg-bs010.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -163,6 +165,7 @@ $$
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs011.html b/doc/pub/LogReg/html/._LogReg-bs011.html index c597e5e18..5849f6046 100644 --- a/doc/pub/LogReg/html/._LogReg-bs011.html +++ b/doc/pub/LogReg/html/._LogReg-bs011.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -163,6 +165,7 @@ $$
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs012.html b/doc/pub/LogReg/html/._LogReg-bs012.html index fa36cbbe8..ee466cb80 100644 --- a/doc/pub/LogReg/html/._LogReg-bs012.html +++ b/doc/pub/LogReg/html/._LogReg-bs012.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -155,6 +157,7 @@ $$
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs013.html b/doc/pub/LogReg/html/._LogReg-bs013.html index ceaac8a45..fdcfdddd3 100644 --- a/doc/pub/LogReg/html/._LogReg-bs013.html +++ b/doc/pub/LogReg/html/._LogReg-bs013.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -166,6 +168,7 @@ and the model is specified in term of \( K-1 \) so-called log-odds or
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs014.html b/doc/pub/LogReg/html/._LogReg-bs014.html index 3d41d9272..0336adf6a 100644 --- a/doc/pub/LogReg/html/._LogReg-bs014.html +++ b/doc/pub/LogReg/html/._LogReg-bs014.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -177,6 +179,7 @@ methods.
  • 14
  • 15
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/._LogReg-bs015.html b/doc/pub/LogReg/html/._LogReg-bs015.html index c4732d14a..b73820234 100644 --- a/doc/pub/LogReg/html/._LogReg-bs015.html +++ b/doc/pub/LogReg/html/._LogReg-bs015.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -178,7 +180,6 @@ MathJax.Hub.Config({ main()

    -

    diff --git a/doc/pub/LogReg/html/._LogReg-bs016.html b/doc/pub/LogReg/html/._LogReg-bs016.html index 289c14c61..da6c50b43 100644 --- a/doc/pub/LogReg/html/._LogReg-bs016.html +++ b/doc/pub/LogReg/html/._LogReg-bs016.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Logistic Regression @@ -54,18 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A _scikit-learn_ example', 2, None, '___sec14'), - ('A simple classification problem', 2, None, '___sec15'), - ('The two-dimensional Ising model, Predicting phase transition ' - 'of the two-dimensional Ising model', - 2, - None, - '___sec16'), - ('Reading in the data', 2, None, '___sec17'), - ('Logistic regression', 2, None, '___sec18'), - ('Exploring the logistic regression', 2, None, '___sec19'), - ('Accuracy of a classification model', 2, None, '___sec20'), - ('Analyzing the results', 2, None, '___sec21')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -117,14 +108,8 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • The Softmax function
  • -
  • A scikit-learn example
  • -
  • A simple classification problem
  • -
  • The two-dimensional Ising model, Predicting phase transition of the two-dimensional Ising model
  • -
  • Reading in the data
  • -
  • Logistic regression
  • -
  • Exploring the logistic regression
  • -
  • Accuracy of a classification model
  • -
  • Analyzing the results
  • +
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -140,61 +125,8 @@ MathJax.Hub.Config({ -

    A simple classification problem

    -

    +

    The Credit Card example

    - -
    import numpy as np
    -from sklearn import datasets, linear_model
    -import matplotlib.pyplot as plt
    -
    -
    -def generate_data():
    -    np.random.seed(0)
    -    X, y = datasets.make_moons(200, noise=0.20)
    -    return X, y
    -
    -
    -def visualize(X, y, clf):
    -    # plt.scatter(X[:, 0], X[:, 1], s=40, c=y, cmap=plt.cm.Spectral)
    -    # plt.show()
    -    plot_decision_boundary(lambda x: clf.predict(x), X, y)
    -    plt.title("Logistic Regression")
    -
    -
    -def plot_decision_boundary(pred_func, X, y):
    -    # Set min and max values and give it some padding
    -    x_min, x_max = X[:, 0].min() - .5, X[:, 0].max() + .5
    -    y_min, y_max = X[:, 1].min() - .5, X[:, 1].max() + .5
    -    h = 0.01
    -    # Generate a grid of points with distance h between them
    -    xx, yy = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h))
    -    # Predict the function value for the whole gid
    -    Z = pred_func(np.c_[xx.ravel(), yy.ravel()])
    -    Z = Z.reshape(xx.shape)
    -    # Plot the contour and training examples
    -    plt.contourf(xx, yy, Z, cmap=plt.cm.Spectral)
    -    plt.scatter(X[:, 0], X[:, 1], c=y, cmap=plt.cm.Spectral)
    -    plt.show()
    -
    -
    -def classify(X, y):
    -    clf = linear_model.LogisticRegressionCV()
    -    clf.fit(X, y)
    -    return clf
    -
    -
    -def main():
    -    X, y = generate_data()
    -    # visualize(X, y)
    -    clf = classify(X, y)
    -    visualize(X, y, clf)
    -
    -
    -if __name__ == "__main__":
    -    main()
    -
    -

    diff --git a/doc/pub/LogReg/html/LogReg-bs.html b/doc/pub/LogReg/html/LogReg-bs.html index 893f7e0c6..f34204f18 100644 --- a/doc/pub/LogReg/html/LogReg-bs.html +++ b/doc/pub/LogReg/html/LogReg-bs.html @@ -55,7 +55,8 @@ Automatically generated HTML file from DocOnce source ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -108,6 +109,7 @@ MathJax.Hub.Config({
  • Including more classes
  • The Softmax function
  • A simple classification problem
  • +
  • The Credit Card example
  • @@ -142,7 +144,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 16, 2019

    +

    Sep 18, 2019


    @@ -159,7 +161,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 16
  • +
  • 17
  • »
  • diff --git a/doc/pub/LogReg/html/LogReg-reveal.html b/doc/pub/LogReg/html/LogReg-reveal.html index e08e16e67..c37caa86a 100644 --- a/doc/pub/LogReg/html/LogReg-reveal.html +++ b/doc/pub/LogReg/html/LogReg-reveal.html @@ -148,7 +148,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    Sep 16, 2019

    +

    Sep 18, 2019


    @@ -226,7 +226,11 @@ primary goal is to identify the classes to which new unseen samples belong.

    -Let us specialize to the case of two classes only, with outputs \( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a credit card user who could default or not on her/his credit card debt. That is +Let us specialize to the case of two classes only, with outputs +\( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a +credit card user that could default or not on her/his credit card +debt. That is +

     
    $$ y_i = \begin{bmatrix} 0 & \mathrm{no}\\ 1 & \mathrm{yes} \end{bmatrix}. @@ -265,10 +269,7 @@ where \( \hat{y} \) is a vector representing the possible outcomes, \( \hat{X} \ The main problem with our function is that it takes values on the entire real axis. In the case of logistic regression, however, the labels \( y_i \) are discrete -variables. - -

    -The table shows an example where we have a followed a group of students during a whole semester, with the aim to see if there are correlations between the number of hours they study and the number of hours they sleep. The output \( y_i \) is labelled as either \( 0 \) (a a grade below average) and \( 1 \), the latter corresponding to a grade above average. +variables. A typical example is the credit card data discussed below here, where we can set the state of defaulting the debt to \( y_i=1 \) and not to \( y_i=0 \) for one the persons in the data set (see the full example below).

    One simple way to get a discrete output is to have sign @@ -278,14 +279,6 @@ We will encounter this model in our first demonstration of neural networks. Hist literature. This model is extremely simple. However, in many cases it is more favorable to use a ``soft" classifier that outputs the probability of a given category. This leads us to the logistic function. - -

    -The code for plotting the perceptron can be seen here. This si nothing but the standard Heaviside step function. -

    - - -

    
    -
    @@ -310,11 +303,81 @@ $$

     
    Note that \( 1-p(t)= p(-t) \). -The following code plots the logistic function. +The following code plots the logistic function, the step function and other functions we will encounter from here and on. +

    -

    
    +
    """The sigmoid function (or the logistic curve) is a
    +function that takes any real number, z, and outputs a number (0,1).
    +It is useful in neural networks for assigning weights on a relative scale.
    +The value z is the weighted sum of parameters involved in the learning algorithm."""
    +
    +import numpy
    +import matplotlib.pyplot as plt
    +import math as mt
    +
    +z = numpy.arange(-5, 5, .1)
    +sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
    +sigma = sigma_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, sigma)
    +ax.set_ylim([-0.1, 1.1])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sigmoid function')
    +
    +plt.show()
    +
    +"""Step Function"""
    +z = numpy.arange(-5, 5, .02)
    +step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
    +step = step_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, step)
    +ax.set_ylim([-0.5, 1.5])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('step function')
    +
    +plt.show()
    +
    +"""Sine Function"""
    +z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
    +t = numpy.sin(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, t)
    +ax.set_ylim([-1.0, 1.0])
    +ax.set_xlim([-2*mt.pi,2*mt.pi])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sine function')
    +
    +plt.show()
    +"""Plots a graph of the squashing function used by a rectified linear
    +unit"""
    +z = numpy.arange(-2, 2, .1)
    +zero = numpy.zeros(len(z))
    +y = numpy.max([zero, z], axis=0)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, y)
    +ax.set_ylim([-2.0, 2.0])
    +ax.set_xlim([-2.0, 2.0])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('Rectified linear unit')
    +
    +plt.show()
     
    @@ -606,6 +669,11 @@ methods. +
    +

    The Credit Card example

    +
    + +
    diff --git a/doc/pub/LogReg/html/LogReg-solarized.html b/doc/pub/LogReg/html/LogReg-solarized.html index 10c862c1a..4d1e3b263 100644 --- a/doc/pub/LogReg/html/LogReg-solarized.html +++ b/doc/pub/LogReg/html/LogReg-solarized.html @@ -49,7 +49,8 @@ div { text-align: justify; text-justify: inter-word; } ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -91,7 +92,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 16, 2019

    +

    Sep 18, 2019


    @@ -163,7 +164,11 @@ primary goal is to identify the classes to which new unseen samples belong.

    -Let us specialize to the case of two classes only, with outputs \( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a credit card user who could default or not on her/his credit card debt. That is +Let us specialize to the case of two classes only, with outputs +\( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a +credit card user that could default or not on her/his credit card +debt. That is + $$ y_i = \begin{bmatrix} 0 & \mathrm{no}\\ 1 & \mathrm{yes} \end{bmatrix}. $$ @@ -198,10 +203,7 @@ where \( \hat{y} \) is a vector representing the possible outcomes, \( \hat{X} \ The main problem with our function is that it takes values on the entire real axis. In the case of logistic regression, however, the labels \( y_i \) are discrete -variables. - -

    -The table shows an example where we have a followed a group of students during a whole semester, with the aim to see if there are correlations between the number of hours they study and the number of hours they sleep. The output \( y_i \) is labelled as either \( 0 \) (a a grade below average) and \( 1 \), the latter corresponding to a grade above average. +variables. A typical example is the credit card data discussed below here, where we can set the state of defaulting the debt to \( y_i=1 \) and not to \( y_i=0 \) for one the persons in the data set (see the full example below).

    One simple way to get a discrete output is to have sign @@ -212,13 +214,6 @@ literature. This model is extremely simple. However, in many cases it is more favorable to use a ``soft" classifier that outputs the probability of a given category. This leads us to the logistic function. -

    -The code for plotting the perceptron can be seen here. This si nothing but the standard Heaviside step function. -

    - - -

    
    -











    @@ -240,11 +235,81 @@ p(t) = \frac{1}{1+\mathrm \exp{-t}}=\frac{\exp{t}}{1+\mathrm \exp{t}}. $$ Note that \( 1-p(t)= p(-t) \). -The following code plots the logistic function. +The following code plots the logistic function, the step function and other functions we will encounter from here and on. +

    -

    
    +
    """The sigmoid function (or the logistic curve) is a
    +function that takes any real number, z, and outputs a number (0,1).
    +It is useful in neural networks for assigning weights on a relative scale.
    +The value z is the weighted sum of parameters involved in the learning algorithm."""
    +
    +import numpy
    +import matplotlib.pyplot as plt
    +import math as mt
    +
    +z = numpy.arange(-5, 5, .1)
    +sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
    +sigma = sigma_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, sigma)
    +ax.set_ylim([-0.1, 1.1])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sigmoid function')
    +
    +plt.show()
    +
    +"""Step Function"""
    +z = numpy.arange(-5, 5, .02)
    +step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
    +step = step_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, step)
    +ax.set_ylim([-0.5, 1.5])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('step function')
    +
    +plt.show()
    +
    +"""Sine Function"""
    +z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
    +t = numpy.sin(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, t)
    +ax.set_ylim([-1.0, 1.0])
    +ax.set_xlim([-2*mt.pi,2*mt.pi])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sine function')
    +
    +plt.show()
    +"""Plots a graph of the squashing function used by a rectified linear
    +unit"""
    +z = numpy.arange(-2, 2, .1)
    +zero = numpy.zeros(len(z))
    +y = numpy.max([zero, z], axis=0)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, y)
    +ax.set_ylim([-2.0, 2.0])
    +ax.set_xlim([-2.0, 2.0])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('Rectified linear unit')
    +
    +plt.show()
     











    @@ -499,6 +564,9 @@ methods. main()

    +









    + +

    The Credit Card example

    diff --git a/doc/pub/LogReg/html/LogReg.html b/doc/pub/LogReg/html/LogReg.html index a9f4c031e..89b4d6d0d 100644 --- a/doc/pub/LogReg/html/LogReg.html +++ b/doc/pub/LogReg/html/LogReg.html @@ -54,7 +54,8 @@ div { text-align: justify; text-justify: inter-word; } ('Extending to more predictors', 2, None, '___sec11'), ('Including more classes', 2, None, '___sec12'), ('The Softmax function', 2, None, '___sec13'), - ('A simple classification problem', 2, None, '___sec14')]} + ('A simple classification problem', 2, None, '___sec14'), + ('The Credit Card example', 2, None, '___sec15')]} end of tocinfo --> @@ -96,7 +97,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 16, 2019

    +

    Sep 18, 2019


    @@ -168,7 +169,11 @@ primary goal is to identify the classes to which new unseen samples belong.

    -Let us specialize to the case of two classes only, with outputs \( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a credit card user who could default or not on her/his credit card debt. That is +Let us specialize to the case of two classes only, with outputs +\( y_i=0 \) and \( y_i=1 \). Our outcomes could represent the status of a +credit card user that could default or not on her/his credit card +debt. That is + $$ y_i = \begin{bmatrix} 0 & \mathrm{no}\\ 1 & \mathrm{yes} \end{bmatrix}. $$ @@ -203,10 +208,7 @@ where \( \hat{y} \) is a vector representing the possible outcomes, \( \hat{X} \ The main problem with our function is that it takes values on the entire real axis. In the case of logistic regression, however, the labels \( y_i \) are discrete -variables. - -

    -The table shows an example where we have a followed a group of students during a whole semester, with the aim to see if there are correlations between the number of hours they study and the number of hours they sleep. The output \( y_i \) is labelled as either \( 0 \) (a a grade below average) and \( 1 \), the latter corresponding to a grade above average. +variables. A typical example is the credit card data discussed below here, where we can set the state of defaulting the debt to \( y_i=1 \) and not to \( y_i=0 \) for one the persons in the data set (see the full example below).

    One simple way to get a discrete output is to have sign @@ -217,13 +219,6 @@ literature. This model is extremely simple. However, in many cases it is more favorable to use a ``soft" classifier that outputs the probability of a given category. This leads us to the logistic function. -

    -The code for plotting the perceptron can be seen here. This si nothing but the standard Heaviside step function. -

    - - -

    
    -











    @@ -245,11 +240,81 @@ p(t) = \frac{1}{1+\mathrm \exp{-t}}=\frac{\exp{t}}{1+\mathrm \exp{t}}. $$ Note that \( 1-p(t)= p(-t) \). -The following code plots the logistic function. +The following code plots the logistic function, the step function and other functions we will encounter from here and on. +

    -

    
    +
    """The sigmoid function (or the logistic curve) is a
    +function that takes any real number, z, and outputs a number (0,1).
    +It is useful in neural networks for assigning weights on a relative scale.
    +The value z is the weighted sum of parameters involved in the learning algorithm."""
    +
    +import numpy
    +import matplotlib.pyplot as plt
    +import math as mt
    +
    +z = numpy.arange(-5, 5, .1)
    +sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
    +sigma = sigma_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, sigma)
    +ax.set_ylim([-0.1, 1.1])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sigmoid function')
    +
    +plt.show()
    +
    +"""Step Function"""
    +z = numpy.arange(-5, 5, .02)
    +step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
    +step = step_fn(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, step)
    +ax.set_ylim([-0.5, 1.5])
    +ax.set_xlim([-5,5])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('step function')
    +
    +plt.show()
    +
    +"""Sine Function"""
    +z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
    +t = numpy.sin(z)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, t)
    +ax.set_ylim([-1.0, 1.0])
    +ax.set_xlim([-2*mt.pi,2*mt.pi])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('sine function')
    +
    +plt.show()
    +"""Plots a graph of the squashing function used by a rectified linear
    +unit"""
    +z = numpy.arange(-2, 2, .1)
    +zero = numpy.zeros(len(z))
    +y = numpy.max([zero, z], axis=0)
    +
    +fig = plt.figure()
    +ax = fig.add_subplot(111)
    +ax.plot(z, y)
    +ax.set_ylim([-2.0, 2.0])
    +ax.set_xlim([-2.0, 2.0])
    +ax.grid(True)
    +ax.set_xlabel('z')
    +ax.set_title('Rectified linear unit')
    +
    +plt.show()
     











    @@ -504,6 +569,9 @@ methods. main()

    +









    + +

    The Credit Card example

    diff --git a/doc/pub/LogReg/ipynb/LogReg.ipynb b/doc/pub/LogReg/ipynb/LogReg.ipynb index 986079ce9..f6d6e81d0 100644 --- a/doc/pub/LogReg/ipynb/LogReg.ipynb +++ b/doc/pub/LogReg/ipynb/LogReg.ipynb @@ -10,7 +10,7 @@ " \n", "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", "\n", - "Date: **Sep 16, 2019**\n", + "Date: **Sep 18, 2019**\n", "\n", "Copyright 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n", "\n", @@ -74,7 +74,10 @@ "primary goal is to identify the classes to which new unseen samples\n", "belong.\n", "\n", - "Let us specialize to the case of two classes only, with outputs $y_i=0$ and $y_i=1$. Our outcomes could represent the status of a credit card user who could default or not on her/his credit card debt. That is" + "Let us specialize to the case of two classes only, with outputs\n", + "$y_i=0$ and $y_i=1$. Our outcomes could represent the status of a\n", + "credit card user that could default or not on her/his credit card\n", + "debt. That is" ] }, { @@ -125,10 +128,7 @@ "The main problem with our function is that it \n", "takes values on the entire real axis. In the case of\n", "logistic regression, however, the labels $y_i$ are discrete\n", - "variables. \n", - "\n", - "The table shows an example where we have a followed a group of students during a whole semester, with the aim to see if there are correlations between the number of hours they study and the number of hours they sleep. The output $y_i$ is labelled as either $0$ (a a grade below average) and $1$, the latter corresponding to a grade above average. \n", - "\n", + "variables. A typical example is the credit card data discussed below here, where we can set the state of defaulting the debt to $y_i=1$ and not to $y_i=0$ for one the persons in the data set (see the full example below).\n", "\n", "One simple way to get a discrete output is to have sign\n", "functions that map the output of a linear regressor to values $\\{0,1\\}$,\n", @@ -138,13 +138,7 @@ "favorable to use a ``soft\" classifier that outputs\n", "the probability of a given category. This leads us to the logistic function.\n", "\n", - "The code for plotting the perceptron can be seen here. This si nothing but the standard [Heaviside step function](https://en.wikipedia.org/wiki/Heaviside_step_function)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "\n", "## The logistic function\n", "\n", "The perceptron is an example of a ``hard classification\" model. We\n", @@ -173,7 +167,89 @@ "metadata": {}, "source": [ "Note that $1-p(t)= p(-t)$.\n", - "The following code plots the logistic function." + "The following code plots the logistic function, the step function and other functions we will encounter from here and on." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "\n", + "\"\"\"The sigmoid function (or the logistic curve) is a\n", + "function that takes any real number, z, and outputs a number (0,1).\n", + "It is useful in neural networks for assigning weights on a relative scale.\n", + "The value z is the weighted sum of parameters involved in the learning algorithm.\"\"\"\n", + "\n", + "import numpy\n", + "import matplotlib.pyplot as plt\n", + "import math as mt\n", + "\n", + "z = numpy.arange(-5, 5, .1)\n", + "sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))\n", + "sigma = sigma_fn(z)\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "ax.plot(z, sigma)\n", + "ax.set_ylim([-0.1, 1.1])\n", + "ax.set_xlim([-5,5])\n", + "ax.grid(True)\n", + "ax.set_xlabel('z')\n", + "ax.set_title('sigmoid function')\n", + "\n", + "plt.show()\n", + "\n", + "\"\"\"Step Function\"\"\"\n", + "z = numpy.arange(-5, 5, .02)\n", + "step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)\n", + "step = step_fn(z)\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "ax.plot(z, step)\n", + "ax.set_ylim([-0.5, 1.5])\n", + "ax.set_xlim([-5,5])\n", + "ax.grid(True)\n", + "ax.set_xlabel('z')\n", + "ax.set_title('step function')\n", + "\n", + "plt.show()\n", + "\n", + "\"\"\"Sine Function\"\"\"\n", + "z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)\n", + "t = numpy.sin(z)\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "ax.plot(z, t)\n", + "ax.set_ylim([-1.0, 1.0])\n", + "ax.set_xlim([-2*mt.pi,2*mt.pi])\n", + "ax.grid(True)\n", + "ax.set_xlabel('z')\n", + "ax.set_title('sine function')\n", + "\n", + "plt.show()\n", + "\"\"\"Plots a graph of the squashing function used by a rectified linear\n", + "unit\"\"\"\n", + "z = numpy.arange(-2, 2, .1)\n", + "zero = numpy.zeros(len(z))\n", + "y = numpy.max([zero, z], axis=0)\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "ax.plot(z, y)\n", + "ax.set_ylim([-2.0, 2.0])\n", + "ax.set_xlim([-2.0, 2.0])\n", + "ax.grid(True)\n", + "ax.set_xlabel('z')\n", + "ax.set_title('Rectified linear unit')\n", + "\n", + "plt.show()" ] }, { @@ -537,14 +613,12 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ - "%matplotlib inline\n", - "\n", "import numpy as np\n", "from sklearn import datasets, linear_model\n", "import matplotlib.pyplot as plt\n", @@ -595,6 +669,13 @@ "if __name__ == \"__main__\":\n", " main()" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The Credit Card example" + ] } ], "metadata": {}, diff --git a/doc/pub/LogReg/ipynb/ipynb-LogReg-src.tar.gz b/doc/pub/LogReg/ipynb/ipynb-LogReg-src.tar.gz index 06b1868d2..c05017931 100644 Binary files a/doc/pub/LogReg/ipynb/ipynb-LogReg-src.tar.gz and b/doc/pub/LogReg/ipynb/ipynb-LogReg-src.tar.gz differ diff --git a/doc/pub/LogReg/pdf/LogReg-minted.pdf b/doc/pub/LogReg/pdf/LogReg-minted.pdf index 804c0d9c7..061076741 100644 Binary files a/doc/pub/LogReg/pdf/LogReg-minted.pdf and b/doc/pub/LogReg/pdf/LogReg-minted.pdf differ diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs000.html b/doc/pub/NeuralNet/html/._NeuralNet-bs000.html index 0c296c5a0..cd4cca246 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs000.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs000.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks @@ -374,7 +375,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 19, 2018

    +

    Sep 18, 2019


    @@ -416,7 +417,7 @@ MathJax.Hub.Config({

    - © 1999-2018, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license + © 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs001.html b/doc/pub/NeuralNet/html/._NeuralNet-bs001.html index 3437f1a87..960ac2062 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs001.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs001.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs002.html b/doc/pub/NeuralNet/html/._NeuralNet-bs002.html index 5a7d876bf..d56670e32 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs002.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs002.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs003.html b/doc/pub/NeuralNet/html/._NeuralNet-bs003.html index 7433bc433..0cb9b5c5c 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs003.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs003.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs004.html b/doc/pub/NeuralNet/html/._NeuralNet-bs004.html index ebf6a3c7d..0de6da0a7 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs004.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs004.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs005.html b/doc/pub/NeuralNet/html/._NeuralNet-bs005.html index df80cc897..2e3d0264a 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs005.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs005.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs006.html b/doc/pub/NeuralNet/html/._NeuralNet-bs006.html index 1ea3e0bd1..d0da32e46 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs006.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs006.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs007.html b/doc/pub/NeuralNet/html/._NeuralNet-bs007.html index 9d8096052..b35c2a78b 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs007.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs007.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs008.html b/doc/pub/NeuralNet/html/._NeuralNet-bs008.html index 77faa1342..819546894 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs008.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs008.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs009.html b/doc/pub/NeuralNet/html/._NeuralNet-bs009.html index 508e66518..646f7017b 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs009.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs009.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs010.html b/doc/pub/NeuralNet/html/._NeuralNet-bs010.html index 8a4eda371..60f7590a7 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs010.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs010.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs011.html b/doc/pub/NeuralNet/html/._NeuralNet-bs011.html index be98b9ac7..6198666c3 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs011.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs011.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs012.html b/doc/pub/NeuralNet/html/._NeuralNet-bs012.html index 5732e72e9..bb2fccc7c 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs012.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs012.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs013.html b/doc/pub/NeuralNet/html/._NeuralNet-bs013.html index 5d37eacce..8c02901ff 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs013.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs013.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs014.html b/doc/pub/NeuralNet/html/._NeuralNet-bs014.html index d405b7739..bca27d454 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs014.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs014.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs015.html b/doc/pub/NeuralNet/html/._NeuralNet-bs015.html index 55ee3dbf0..a77a7e7ad 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs015.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs015.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs016.html b/doc/pub/NeuralNet/html/._NeuralNet-bs016.html index bc3f4581d..709546317 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs016.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs016.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs017.html b/doc/pub/NeuralNet/html/._NeuralNet-bs017.html index df8aceedb..a62a3d261 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs017.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs017.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs018.html b/doc/pub/NeuralNet/html/._NeuralNet-bs018.html index 46287989f..e0dbfb7f7 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs018.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs018.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs019.html b/doc/pub/NeuralNet/html/._NeuralNet-bs019.html index 189c0d256..9ec70eb01 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs019.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs019.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs020.html b/doc/pub/NeuralNet/html/._NeuralNet-bs020.html index 6bc393196..341255f5d 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs020.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs020.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs021.html b/doc/pub/NeuralNet/html/._NeuralNet-bs021.html index 659318202..f608b5c1b 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs021.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs021.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs022.html b/doc/pub/NeuralNet/html/._NeuralNet-bs022.html index d666679a6..c265e5f95 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs022.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs022.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs023.html b/doc/pub/NeuralNet/html/._NeuralNet-bs023.html index eea7ead41..3d603f845 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs023.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs023.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs024.html b/doc/pub/NeuralNet/html/._NeuralNet-bs024.html index b15b61ad6..dcfbe41ea 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs024.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs024.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs025.html b/doc/pub/NeuralNet/html/._NeuralNet-bs025.html index a8afb96d0..887f3a3b2 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs025.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs025.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs026.html b/doc/pub/NeuralNet/html/._NeuralNet-bs026.html index 08f610ded..085bdb252 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs026.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs026.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks @@ -371,7 +372,7 @@ $$ and using the Hadamard product of two vectors we can write this as $$ -\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}L)}. +\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}. $$

    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs027.html b/doc/pub/NeuralNet/html/._NeuralNet-bs027.html index 3d2cb8d3f..960bc40d5 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs027.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs027.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs028.html b/doc/pub/NeuralNet/html/._NeuralNet-bs028.html index 531157c51..615803cac 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs028.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs028.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs029.html b/doc/pub/NeuralNet/html/._NeuralNet-bs029.html index 52d2ecf9b..83351440b 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs029.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs029.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs030.html b/doc/pub/NeuralNet/html/._NeuralNet-bs030.html index 81f845bbb..3b3091423 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs030.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs030.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs031.html b/doc/pub/NeuralNet/html/._NeuralNet-bs031.html index 6cad37323..12100ebaf 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs031.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs031.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs032.html b/doc/pub/NeuralNet/html/._NeuralNet-bs032.html index bde55aac9..18ff4402b 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs032.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs032.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs033.html b/doc/pub/NeuralNet/html/._NeuralNet-bs033.html index 4b6741d79..099688291 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs033.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs033.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs034.html b/doc/pub/NeuralNet/html/._NeuralNet-bs034.html index fcdc8f7b8..f55858ae2 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs034.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs034.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs035.html b/doc/pub/NeuralNet/html/._NeuralNet-bs035.html index 2219f3dbd..b108344a5 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs035.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs035.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs036.html b/doc/pub/NeuralNet/html/._NeuralNet-bs036.html index 7972fa977..8c6088a45 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs036.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs036.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs037.html b/doc/pub/NeuralNet/html/._NeuralNet-bs037.html index 32aaefdca..d3c9992e5 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs037.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs037.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs038.html b/doc/pub/NeuralNet/html/._NeuralNet-bs038.html index 5be78f07d..e05ec4ae3 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs038.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs038.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs039.html b/doc/pub/NeuralNet/html/._NeuralNet-bs039.html index fbf7fde6d..765e83e84 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs039.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs039.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs040.html b/doc/pub/NeuralNet/html/._NeuralNet-bs040.html index 77566ed0f..4201a313d 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs040.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs040.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs041.html b/doc/pub/NeuralNet/html/._NeuralNet-bs041.html index dfec677f9..bda78a044 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs041.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs041.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs042.html b/doc/pub/NeuralNet/html/._NeuralNet-bs042.html index fbadb1c4b..528eece01 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs042.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs042.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs043.html b/doc/pub/NeuralNet/html/._NeuralNet-bs043.html index 29a5bcf7c..52b8bad03 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs043.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs043.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs044.html b/doc/pub/NeuralNet/html/._NeuralNet-bs044.html index 90fddebd1..33ef8fdf3 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs044.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs044.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs045.html b/doc/pub/NeuralNet/html/._NeuralNet-bs045.html index 5bd49f3e1..bba1f13e8 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs045.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs045.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs046.html b/doc/pub/NeuralNet/html/._NeuralNet-bs046.html index e4a73380a..f26bbe9c5 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs046.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs046.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs047.html b/doc/pub/NeuralNet/html/._NeuralNet-bs047.html index 613a5dc46..a043f7dc3 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs047.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs047.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs048.html b/doc/pub/NeuralNet/html/._NeuralNet-bs048.html index 79d59fd0b..a19219e49 100644 --- a/doc/pub/NeuralNet/html/._NeuralNet-bs048.html +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs048.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks @@ -366,17 +367,16 @@ being realizations of this object with different hyperparameters. An implementat

    class NeuralNetwork:
         def __init__(
    -        self,
    -        X_data,
    -        Y_data,
    -        n_hidden_neurons=50,
    -        n_categories=10,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    +            self,
    +            X_data,
    +            Y_data,
    +            n_hidden_neurons=50,
    +            n_categories=10,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
     
    -    ):
             self.X_data_full = X_data
             self.Y_data_full = Y_data
     
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs049.html b/doc/pub/NeuralNet/html/._NeuralNet-bs049.html
    index f71738a7e..f0dfefaaf 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs049.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs049.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs050.html b/doc/pub/NeuralNet/html/._NeuralNet-bs050.html
    index df2fbff1d..8b2ff7147 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs050.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs050.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs051.html b/doc/pub/NeuralNet/html/._NeuralNet-bs051.html
    index 11f161b54..272cb5712 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs051.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs051.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs052.html b/doc/pub/NeuralNet/html/._NeuralNet-bs052.html
    index 02f6960cd..84e011c0f 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs052.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs052.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs053.html b/doc/pub/NeuralNet/html/._NeuralNet-bs053.html
    index d11d46492..f5562fb89 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs053.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs053.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs054.html b/doc/pub/NeuralNet/html/._NeuralNet-bs054.html
    index 36a58f392..e8664cde3 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs054.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs054.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs055.html b/doc/pub/NeuralNet/html/._NeuralNet-bs055.html
    index 7c91ede4e..72d1a9649 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs055.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs055.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs056.html b/doc/pub/NeuralNet/html/._NeuralNet-bs056.html
    index 3cb5d0094..ce5339572 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs056.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs056.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs057.html b/doc/pub/NeuralNet/html/._NeuralNet-bs057.html
    index 45127b18d..b7804cbe8 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs057.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs057.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    @@ -369,19 +370,18 @@ MathJax.Hub.Config({
     
     class NeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_neurons_layer1=100,
    -        n_neurons_layer2=50,
    -        n_categories=2,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_neurons_layer1=100,
    +            n_neurons_layer2=50,
    +            n_categories=2,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             # keep track of number of steps
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs058.html b/doc/pub/NeuralNet/html/._NeuralNet-bs058.html
    index af0a7130a..0843f1bdc 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs058.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs058.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs059.html b/doc/pub/NeuralNet/html/._NeuralNet-bs059.html
    index 6b3da62f1..0fb319d24 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs059.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs059.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs060.html b/doc/pub/NeuralNet/html/._NeuralNet-bs060.html
    index 8eadb921c..57a6b77fb 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs060.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs060.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs061.html b/doc/pub/NeuralNet/html/._NeuralNet-bs061.html
    index 77bd15e0b..cbc2baebb 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs061.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs061.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs062.html b/doc/pub/NeuralNet/html/._NeuralNet-bs062.html
    index 01338cb55..5ea711bde 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs062.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs062.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs063.html b/doc/pub/NeuralNet/html/._NeuralNet-bs063.html
    index a53731217..af606f259 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs063.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs063.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs064.html b/doc/pub/NeuralNet/html/._NeuralNet-bs064.html
    index e81c30225..bc0361422 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs064.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs064.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs065.html b/doc/pub/NeuralNet/html/._NeuralNet-bs065.html
    index ee9e11a31..c92db07b2 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs065.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs065.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs066.html b/doc/pub/NeuralNet/html/._NeuralNet-bs066.html
    index 30575d9f4..26e51620a 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs066.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs066.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs067.html b/doc/pub/NeuralNet/html/._NeuralNet-bs067.html
    index 4ac465f8f..2aa758ab1 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs067.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs067.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs068.html b/doc/pub/NeuralNet/html/._NeuralNet-bs068.html
    index 3112352fd..d72bffd72 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs068.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs068.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs069.html b/doc/pub/NeuralNet/html/._NeuralNet-bs069.html
    index a097400f2..da788dd10 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs069.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs069.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs070.html b/doc/pub/NeuralNet/html/._NeuralNet-bs070.html
    index 8912ccbb0..f73821456 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs070.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs070.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs071.html b/doc/pub/NeuralNet/html/._NeuralNet-bs071.html
    index d3a258cb5..0c1e94a66 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs071.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs071.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs072.html b/doc/pub/NeuralNet/html/._NeuralNet-bs072.html
    index 0d69841c7..1a6ad0b7e 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs072.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs072.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs073.html b/doc/pub/NeuralNet/html/._NeuralNet-bs073.html
    index 10eab5a52..101b4991d 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs073.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs073.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs074.html b/doc/pub/NeuralNet/html/._NeuralNet-bs074.html
    index 3db00e542..a090b39e9 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs074.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs074.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs075.html b/doc/pub/NeuralNet/html/._NeuralNet-bs075.html
    index 5b41bdb34..3a9cb0fd9 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs075.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs075.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs076.html b/doc/pub/NeuralNet/html/._NeuralNet-bs076.html
    index a6bacf9a6..abe65d382 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs076.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs076.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs077.html b/doc/pub/NeuralNet/html/._NeuralNet-bs077.html
    index 09bebf34e..7298651d5 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs077.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs077.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs078.html b/doc/pub/NeuralNet/html/._NeuralNet-bs078.html
    index c13d902d5..fbeb37103 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs078.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs078.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs079.html b/doc/pub/NeuralNet/html/._NeuralNet-bs079.html
    index 2caa7d852..220ff8660 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs079.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs079.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs080.html b/doc/pub/NeuralNet/html/._NeuralNet-bs080.html
    index a0ed1ac3e..a7b126f2e 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs080.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs080.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs081.html b/doc/pub/NeuralNet/html/._NeuralNet-bs081.html
    index 790bf815a..acb6a74ed 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs081.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs081.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    @@ -366,22 +367,21 @@ We need to define model and architecture and choose cost function and optmizer.
     
     class ConvolutionalNeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_filters=10,
    -        n_neurons_connected=50,
    -        n_categories=10,
    -        receptive_field=3,
    -        stride=1,
    -        padding=1,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_filters=10,
    +            n_neurons_connected=50,
    +            n_categories=10,
    +            receptive_field=3,
    +            stride=1,
    +            padding=1,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
             
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs082.html b/doc/pub/NeuralNet/html/._NeuralNet-bs082.html
    index b2adef723..62fcbef5d 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs082.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs082.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs083.html b/doc/pub/NeuralNet/html/._NeuralNet-bs083.html
    index f848e5ade..0e8cfbef7 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs083.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs083.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs084.html b/doc/pub/NeuralNet/html/._NeuralNet-bs084.html
    index eea852e9c..dc7a5b9e8 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs084.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs084.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs085.html b/doc/pub/NeuralNet/html/._NeuralNet-bs085.html
    index 4b235b1f1..5e4a8787c 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs085.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs085.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs086.html b/doc/pub/NeuralNet/html/._NeuralNet-bs086.html
    index 422a5bffa..31bd9a9f4 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs086.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs086.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs087.html b/doc/pub/NeuralNet/html/._NeuralNet-bs087.html
    index a0b7e5007..fd4a8324f 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs087.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs087.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs088.html b/doc/pub/NeuralNet/html/._NeuralNet-bs088.html
    index 733e3b52e..2a50d08ab 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs088.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs088.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs089.html b/doc/pub/NeuralNet/html/._NeuralNet-bs089.html
    index f78f8ee6c..905a633d8 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs089.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs089.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs090.html b/doc/pub/NeuralNet/html/._NeuralNet-bs090.html
    index 9dfbca8d1..13746c2e2 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs090.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs090.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs091.html b/doc/pub/NeuralNet/html/._NeuralNet-bs091.html
    index 4216aec1e..10df77f5a 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs091.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs091.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs092.html b/doc/pub/NeuralNet/html/._NeuralNet-bs092.html
    index b499e91b6..26b3039aa 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs092.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs092.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs093.html b/doc/pub/NeuralNet/html/._NeuralNet-bs093.html
    index daa78f4be..bc2b2fc69 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs093.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs093.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs094.html b/doc/pub/NeuralNet/html/._NeuralNet-bs094.html
    index 2afa599f6..e4a339caa 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs094.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs094.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs095.html b/doc/pub/NeuralNet/html/._NeuralNet-bs095.html
    index d2f9e0e3c..a3272c00f 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs095.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs095.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs096.html b/doc/pub/NeuralNet/html/._NeuralNet-bs096.html
    index 4458d483f..b04f41ab9 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs096.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs096.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs097.html b/doc/pub/NeuralNet/html/._NeuralNet-bs097.html
    index e406304cc..237c7cadd 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs097.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs097.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs098.html b/doc/pub/NeuralNet/html/._NeuralNet-bs098.html
    index ef5e97c8e..fed41bee5 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs098.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs098.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs099.html b/doc/pub/NeuralNet/html/._NeuralNet-bs099.html
    index 69d592b71..09a8a658a 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs099.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs099.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs100.html b/doc/pub/NeuralNet/html/._NeuralNet-bs100.html
    index 676cf404a..791bad473 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs100.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs100.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs101.html b/doc/pub/NeuralNet/html/._NeuralNet-bs101.html
    index 9e8e49b8d..67fdfcc8d 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs101.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs101.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs102.html b/doc/pub/NeuralNet/html/._NeuralNet-bs102.html
    index 204ca01b7..ecde5f507 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs102.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs102.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs103.html b/doc/pub/NeuralNet/html/._NeuralNet-bs103.html
    index 82f95bb3f..c489c0def 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs103.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs103.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/._NeuralNet-bs104.html b/doc/pub/NeuralNet/html/._NeuralNet-bs104.html
    index b9dbd8af4..7f6d8214e 100644
    --- a/doc/pub/NeuralNet/html/._NeuralNet-bs104.html
    +++ b/doc/pub/NeuralNet/html/._NeuralNet-bs104.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    diff --git a/doc/pub/NeuralNet/html/NeuralNet-bs.html b/doc/pub/NeuralNet/html/NeuralNet-bs.html
    index 0c296c5a0..cd4cca246 100644
    --- a/doc/pub/NeuralNet/html/NeuralNet-bs.html
    +++ b/doc/pub/NeuralNet/html/NeuralNet-bs.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    @@ -374,7 +375,7 @@ MathJax.Hub.Config({
     
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 19, 2018

    +

    Sep 18, 2019


    @@ -416,7 +417,7 @@ MathJax.Hub.Config({

    - © 1999-2018, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license + © 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
    diff --git a/doc/pub/NeuralNet/html/NeuralNet-reveal.html b/doc/pub/NeuralNet/html/NeuralNet-reveal.html index 30803e519..ea9d4665a 100644 --- a/doc/pub/NeuralNet/html/NeuralNet-reveal.html +++ b/doc/pub/NeuralNet/html/NeuralNet-reveal.html @@ -1,8 +1,8 @@ -\ + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks @@ -148,12 +148,12 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    Oct 19, 2018

    +

    Sep 18, 2019


    - © 1999-2018, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license + © 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
    @@ -972,7 +972,7 @@ $$ and using the Hadamard product of two vectors we can write this as

     
    $$ -\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}L)}. +\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}. $$

     
    @@ -2123,17 +2123,16 @@ being realizations of this object with different hyperparameters. An implementat

    class NeuralNetwork:
         def __init__(
    -        self,
    -        X_data,
    -        Y_data,
    -        n_hidden_neurons=50,
    -        n_categories=10,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    +            self,
    +            X_data,
    +            Y_data,
    +            n_hidden_neurons=50,
    +            n_categories=10,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
     
    -    ):
             self.X_data_full = X_data
             self.Y_data_full = Y_data
     
    @@ -2565,19 +2564,18 @@ X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=t
     
     class NeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_neurons_layer1=100,
    -        n_neurons_layer2=50,
    -        n_categories=2,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_neurons_layer1=100,
    +            n_neurons_layer2=50,
    +            n_categories=2,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             # keep track of number of steps
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
    @@ -3436,22 +3434,21 @@ We need to define model and architecture and choose cost function and optmizer.
     
     class ConvolutionalNeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_filters=10,
    -        n_neurons_connected=50,
    -        n_categories=10,
    -        receptive_field=3,
    -        stride=1,
    -        padding=1,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_filters=10,
    +            n_neurons_connected=50,
    +            n_categories=10,
    +            receptive_field=3,
    +            stride=1,
    +            padding=1,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
             
    diff --git a/doc/pub/NeuralNet/html/NeuralNet-solarized.html b/doc/pub/NeuralNet/html/NeuralNet-solarized.html
    index 95c8c283e..f0a37cebb 100644
    --- a/doc/pub/NeuralNet/html/NeuralNet-solarized.html
    +++ b/doc/pub/NeuralNet/html/NeuralNet-solarized.html
    @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
     
     
     
    +
     
     
     Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks
    @@ -260,7 +261,7 @@ MathJax.Hub.Config({
     
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 19, 2018

    +

    Sep 18, 2019












    @@ -1014,7 +1015,7 @@ $$ and using the Hadamard product of two vectors we can write this as $$ -\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}L)}. +\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}. $$

    @@ -2035,17 +2036,16 @@ being realizations of this object with different hyperparameters. An implementat

    class NeuralNetwork:
         def __init__(
    -        self,
    -        X_data,
    -        Y_data,
    -        n_hidden_neurons=50,
    -        n_categories=10,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    +            self,
    +            X_data,
    +            Y_data,
    +            n_hidden_neurons=50,
    +            n_categories=10,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
     
    -    ):
             self.X_data_full = X_data
             self.Y_data_full = Y_data
     
    @@ -2468,19 +2468,18 @@ X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=t
     
     class NeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_neurons_layer1=100,
    -        n_neurons_layer2=50,
    -        n_categories=2,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_neurons_layer1=100,
    +            n_neurons_layer2=50,
    +            n_categories=2,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             # keep track of number of steps
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
    @@ -3325,22 +3324,21 @@ We need to define model and architecture and choose cost function and optmizer.
     
     class ConvolutionalNeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_filters=10,
    -        n_neurons_connected=50,
    -        n_categories=10,
    -        receptive_field=3,
    -        stride=1,
    -        padding=1,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_filters=10,
    +            n_neurons_connected=50,
    +            n_categories=10,
    +            receptive_field=3,
    +            stride=1,
    +            padding=1,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
             
    @@ -4301,7 +4299,7 @@ the solution minimizes the cost function.
     
     
     
    - © 1999-2018, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license + © 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
    diff --git a/doc/pub/NeuralNet/html/NeuralNet.html b/doc/pub/NeuralNet/html/NeuralNet.html index 37461c5ce..fc7153615 100644 --- a/doc/pub/NeuralNet/html/NeuralNet.html +++ b/doc/pub/NeuralNet/html/NeuralNet.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks @@ -265,7 +266,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 19, 2018

    +

    Sep 18, 2019












    @@ -1019,7 +1020,7 @@ $$ and using the Hadamard product of two vectors we can write this as $$ -\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}L)}. +\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}. $$

    @@ -2040,17 +2041,16 @@ being realizations of this object with different hyperparameters. An implementat

    class NeuralNetwork:
         def __init__(
    -        self,
    -        X_data,
    -        Y_data,
    -        n_hidden_neurons=50,
    -        n_categories=10,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    +            self,
    +            X_data,
    +            Y_data,
    +            n_hidden_neurons=50,
    +            n_categories=10,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
     
    -    ):
             self.X_data_full = X_data
             self.Y_data_full = Y_data
     
    @@ -2473,19 +2473,18 @@ X_train, X_test, Y_train, Y_test = train_tes
     
     class NeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_neurons_layer1=100,
    -        n_neurons_layer2=50,
    -        n_categories=2,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_neurons_layer1=100,
    +            n_neurons_layer2=50,
    +            n_categories=2,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             # keep track of number of steps
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
    @@ -3330,22 +3329,21 @@ We need to define model and architecture and choose cost function and optmizer.
     
     class ConvolutionalNeuralNetworkTensorflow:
         def __init__(
    -        self,
    -        X_train,
    -        Y_train,
    -        X_test,
    -        Y_test,
    -        n_filters=10,
    -        n_neurons_connected=50,
    -        n_categories=10,
    -        receptive_field=3,
    -        stride=1,
    -        padding=1,
    -        epochs=10,
    -        batch_size=100,
    -        eta=0.1,
    -        lmbd=0.0,
    -    ):
    +            self,
    +            X_train,
    +            Y_train,
    +            X_test,
    +            Y_test,
    +            n_filters=10,
    +            n_neurons_connected=50,
    +            n_categories=10,
    +            receptive_field=3,
    +            stride=1,
    +            padding=1,
    +            epochs=10,
    +            batch_size=100,
    +            eta=0.1,
    +            lmbd=0.0):
             
             self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
             
    @@ -4306,7 +4304,7 @@ the solution minimizes the cost function.
     
     
     
    - © 1999-2018, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license + © 1999-2019, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
    diff --git a/doc/pub/NeuralNet/html/reveal.js/.gitignore b/doc/pub/NeuralNet/html/reveal.js/.gitignore index e7b4f216a..a5df3133d 100644 --- a/doc/pub/NeuralNet/html/reveal.js/.gitignore +++ b/doc/pub/NeuralNet/html/reveal.js/.gitignore @@ -1,8 +1,3 @@ -.idea/ -*.iml -*.iws -*.eml -out/ .DS_Store .svn log/*.log @@ -10,4 +5,4 @@ tmp/** node_modules/ .sass-cache css/reveal.min.css -js/reveal.min.js \ No newline at end of file +js/reveal.min.js diff --git a/doc/pub/NeuralNet/html/reveal.js/.travis.yml b/doc/pub/NeuralNet/html/reveal.js/.travis.yml index ec3b27d5d..165d9ae9f 100644 --- a/doc/pub/NeuralNet/html/reveal.js/.travis.yml +++ b/doc/pub/NeuralNet/html/reveal.js/.travis.yml @@ -1,7 +1,5 @@ language: node_js node_js: - - 4 + - 0.10 before_script: - - npm install -g grunt-cli -after_script: - - grunt retire + - npm install -g grunt-cli \ No newline at end of file diff --git a/doc/pub/NeuralNet/html/reveal.js/LICENSE b/doc/pub/NeuralNet/html/reveal.js/LICENSE index c3e6e5fd6..09623076f 100644 --- a/doc/pub/NeuralNet/html/reveal.js/LICENSE +++ b/doc/pub/NeuralNet/html/reveal.js/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors +Copyright (C) 2015 Hakim El Hattab, http://hakim.se Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/pub/NeuralNet/html/reveal.js/README.md b/doc/pub/NeuralNet/html/reveal.js/README.md index f2ab6ca88..573b19597 100644 --- a/doc/pub/NeuralNet/html/reveal.js/README.md +++ b/doc/pub/NeuralNet/html/reveal.js/README.md @@ -1,58 +1,12 @@ -# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) Slides +# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) -A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://revealjs.com/). +A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/). -reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). There's also a fully featured visual editor and platform for sharing reveal.js presentations at [slides.com](https://slides.com?ref=github). +reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). It's best viewed in a modern browser but [fallbacks](https://github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere. -## Table of contents -- [Online Editor](#online-editor) -- [Instructions](#instructions) - - [Markup](#markup) - - [Markdown](#markdown) - - [Element Attributes](#element-attributes) - - [Slide Attributes](#slide-attributes) -- [Configuration](#configuration) -- [Presentation Size](#presentation-size) -- [Dependencies](#dependencies) -- [Ready Event](#ready-event) -- [Auto-sliding](#auto-sliding) -- [Keyboard Bindings](#keyboard-bindings) -- [Touch Navigation](#touch-navigation) -- [Lazy Loading](#lazy-loading) -- [API](#api) - - [Slide Changed Event](#slide-changed-event) - - [Presentation State](#presentation-state) - - [Slide States](#slide-states) - - [Slide Backgrounds](#slide-backgrounds) - - [Parallax Background](#parallax-background) - - [Slide Transitions](#slide-transitions) - - [Internal links](#internal-links) - - [Fragments](#fragments) - - [Fragment events](#fragment-events) - - [Code syntax highlighting](#code-syntax-highlighting) - - [Slide number](#slide-number) - - [Overview mode](#overview-mode) - - [Fullscreen mode](#fullscreen-mode) - - [Embedded media](#embedded-media) - - [Stretching elements](#stretching-elements) - - [postMessage API](#postmessage-api) -- [PDF Export](#pdf-export) -- [Theming](#theming) -- [Speaker Notes](#speaker-notes) - - [Share and Print Speaker Notes](#share-and-print-speaker-notes) - - [Server Side Speaker Notes](#server-side-speaker-notes) -- [Multiplexing](#multiplexing) - - [Master presentation](#master-presentation) - - [Client presentation](#client-presentation) - - [Socket.io server](#socketio-server) -- [MathJax](#mathjax) -- [Installation](#installation) - - [Basic setup](#basic-setup) - - [Full setup](#full-setup) - - [Folder Structure](#folder-structure) -- [License](#license) -#### More reading +#### More reading: +- [Installation](#installation): Step-by-step instructions for getting reveal.js running on your computer. - [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history. - [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own! - [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks. @@ -60,36 +14,14 @@ reveal.js comes with a broad range of features including [nested slides](https:/ ## Online Editor -Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [https://slides.com](https://slides.com?ref=github). +Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [http://slides.com](http://slides.com). ## Instructions ### Markup -Here's a barebones example of a fully working reveal.js presentation: -```html - - - - - - -
    -
    -
    Slide 1
    -
    Slide 2
    -
    -
    - - - - -``` - -The presentation markup hierarchy needs to be `.reveal > .slides > section` where the `section` represents one slide and can be repeated indefinitely. If you place multiple `section` elements inside of another `section` they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and will be included in the horizontal sequence. For example: +Markup hierarchy needs to be ``
    `` where the ``
    `` represents one slide and can be repeated indefinitely. If you place multiple ``
    ``'s inside of another ``
    `` they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and it will be included in the horizontal sequence. For example: ```html
    @@ -105,36 +37,32 @@ The presentation markup hierarchy needs to be `.reveal > .slides > section` wher ### Markdown -It's possible to write your slides using Markdown. To enable Markdown, add the `data-markdown` attribute to your `
    ` elements and wrap the contents in a ` +
    ``` #### External Markdown -You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file: the `data-separator` attribute defines a regular expression for horizontal slides (defaults to `^\r?\n---\r?\n$`, a newline-bounded horizontal rule) and `data-separator-vertical` defines vertical slides (disabled by default). The `data-separator-notes` attribute is a regular expression for specifying the beginning of the current slide's speaker notes (defaults to `note:`). The `data-charset` attribute is optional and specifies which charset to use when loading the external file. +You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file. The ```data-charset``` attribute is optional and specifies which charset to use when loading the external file. -When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). The following example customises all available options: +When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). ```html -
    -
    ``` @@ -164,19 +92,6 @@ Special syntax (in html comment) is available for adding attributes to the slide
    ``` -#### Configuring *marked* - -We use [marked](https://github.com/chjj/marked) to parse Markdown. To customise marked's rendering, you can pass in options when [configuring Reveal](#configuration): - -```javascript -Reveal.initialize({ - // Options which are passed into marked - // See https://github.com/chjj/marked#options-1 - markdown: { - smartypants: true - } -}); -``` ### Configuration @@ -185,26 +100,12 @@ At the end of your page you need to initialize reveal by running the following c ```javascript Reveal.initialize({ - // Display presentation control arrows + // Display controls in the bottom right corner controls: true, - // Help the user learn the controls by providing hints, for example by - // bouncing the down arrow when they first encounter a vertical slide - controlsTutorial: true, - - // Determines where controls appear, "edges" or "bottom-right" - controlsLayout: 'bottom-right', - - // Visibility rule for backwards navigation arrows; "faded", "hidden" - // or "visible" - controlsBackArrows: 'faded', - // Display a presentation progress bar progress: true, - // Set default timing of 2 minutes per slide - defaultTiming: 120, - // Display the page number of the current slide slideNumber: false, @@ -229,9 +130,6 @@ Reveal.initialize({ // Change the presentation direction to be RTL rtl: false, - // Randomizes the order of slides each time the presentation loads - shuffle: false, - // Turns fragments on and off globally fragments: true, @@ -243,15 +141,6 @@ Reveal.initialize({ // key is pressed help: true, - // Flags if speaker notes should be visible to all viewers - showNotes: false, - - // Global override for autoplaying embedded media (video/audio/iframe) - // - null: Media will only autoplay if data-autoplay is present - // - true: All media will autoplay, regardless of individual setting - // - false: No media will autoplay, regardless of individual setting - autoPlayMedia: null, - // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -260,9 +149,6 @@ Reveal.initialize({ // Stop auto-sliding after user input autoSlideStoppable: true, - // Use this method for navigation when auto-sliding - autoSlideMethod: Reveal.navigateNext, - // Enable slide navigation via mouse wheel mouseWheel: false, @@ -270,18 +156,16 @@ Reveal.initialize({ hideAddressBar: true, // Opens links in an iframe preview overlay - // Add `data-preview-link` and `data-preview-link="false"` to customise each link - // individually previewLinks: false, // Transition style - transition: 'slide', // none/fade/slide/convex/concave/zoom + transition: 'default', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom + backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom // Number of slides away from the current that are visible viewDistance: 3, @@ -292,14 +176,10 @@ Reveal.initialize({ // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - // Number of pixels to move the parallax background per slide - // - Calculated automatically unless specified - // - Set to 0 to disable movement along an axis - parallaxBackgroundHorizontal: null, - parallaxBackgroundVertical: null, - - // The display mode that will be used to show slides - display: 'block' + // Amount to move parallax background (horizontal and vertical) on slide change + // Number, e.g. 100 + parallaxBackgroundHorizontal: '', + parallaxBackgroundVertical: '' }); ``` @@ -316,6 +196,56 @@ Reveal.configure({ autoSlide: 5000 }); ``` +### Dependencies + +Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example: + +```javascript +Reveal.initialize({ + dependencies: [ + // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ + { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, + + // Interpret Markdown in
    elements + { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + + // Syntax highlight for elements + { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, + + // Zoom in and out with Alt+click + { src: 'plugin/zoom-js/zoom.js', async: true }, + + // Speaker notes + { src: 'plugin/notes/notes.js', async: true }, + + // Remote control your reveal.js presentation using a touch device + { src: 'plugin/remotes/remotes.js', async: true }, + + // MathJax + { src: 'plugin/math/math.js', async: true } + ] +}); +``` + +You can add your own extensions using the same syntax. The following properties are available for each dependency object: +- **src**: Path to the script to load +- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false +- **callback**: [optional] Function to execute when the script has loaded +- **condition**: [optional] Function which must return true for the script to be loaded + + +### Ready Event + +A 'ready' event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`. + +```javascript +Reveal.addEventListener( 'ready', function( event ) { + // event.currentSlide, event.indexh, event.indexv +} ); +``` + + ### Presentation Size All presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport. @@ -343,69 +273,6 @@ Reveal.initialize({ }); ``` -If you wish to disable this behavior and do your own scaling (e.g. using media queries), try these settings: - -```javascript -Reveal.initialize({ - - ... - - width: "100%", - height: "100%", - margin: 0, - minScale: 1, - maxScale: 1 -}); -``` - -### Dependencies - -Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example: - -```javascript -Reveal.initialize({ - dependencies: [ - // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, - - // Interpret Markdown in
    elements - { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - - // Syntax highlight for elements - { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, - - // Zoom in and out with Alt+click - { src: 'plugin/zoom-js/zoom.js', async: true }, - - // Speaker notes - { src: 'plugin/notes/notes.js', async: true }, - - // MathJax - { src: 'plugin/math/math.js', async: true } - ] -}); -``` - -You can add your own extensions using the same syntax. The following properties are available for each dependency object: -- **src**: Path to the script to load -- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false -- **callback**: [optional] Function to execute when the script has loaded -- **condition**: [optional] Function which must return true for the script to be loaded - -To load these dependencies, reveal.js requires [head.js](http://headjs.com/) *(a script loading library)* to be loaded before reveal.js. - -### Ready Event - -A 'ready' event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`. - -```javascript -Reveal.addEventListener( 'ready', function( event ) { - // event.currentSlide, event.indexh, event.indexv -} ); -``` - -Note that we also add a `.ready` class to the `.reveal` element so that you can hook into this with CSS. ### Auto-sliding @@ -429,8 +296,6 @@ You can also override the slide duration for individual slides and fragments by
    ``` -To override the method used for navigation when auto-sliding, you can specify the ```autoSlideMethod``` setting. To only navigate along the top layer and ignore vertical slides, set this to ```Reveal.navigateRight```. - Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired. @@ -448,13 +313,6 @@ Reveal.configure({ }); ``` -### Touch Navigation - -You can swipe to navigate through a presentation on any touch-enabled device. Horizontal swipes change between horizontal slides, vertical swipes change between vertical slides. If you wish to disable this you can set the `touch` config option to false when initializing reveal.js. - -If there's some part of your content that needs to remain accessible to touch events you'll need to highlight this by adding a `data-prevent-swipe` attribute to the element. One common example where this is useful is elements that need to be scrolled. - - ### Lazy Loading When working on presentation with a lot of media or iframe content it's important to load lazily. Lazy loading means that reveal.js will only load content for the few slides nearest to the current slide. The number of slides that are preloaded is determined by the `viewDistance` configuration option. @@ -489,18 +347,11 @@ Reveal.next(); Reveal.prevFragment(); Reveal.nextFragment(); -// Randomize the order of slides -Reveal.shuffle(); - // Toggle presentation states, optionally pass true/false to force on/off Reveal.toggleOverview(); Reveal.togglePause(); Reveal.toggleAutoSlide(); -// Shows a help overlay with keyboard shortcuts, optionally pass true/false -// to force on/off -Reveal.toggleHelp(); - // Change a config value at runtime Reveal.configure({ controls: true }); @@ -514,14 +365,9 @@ Reveal.getScale(); Reveal.getPreviousSlide(); Reveal.getCurrentSlide(); -Reveal.getIndices(); // { h: 0, v: 0 } } -Reveal.getPastSlideCount(); -Reveal.getProgress(); // (0 == first slide, 1 == last slide) -Reveal.getSlides(); // Array of all slides -Reveal.getTotalSlides(); // total number of slides - -// Returns the speaker notes for the current slide -Reveal.getSlideNotes(); +Reveal.getIndices(); // { h: 0, v: 0 } } +Reveal.getProgress(); // 0-1 +Reveal.getTotalSlides(); // State checks Reveal.isFirstSlide(); @@ -574,59 +420,26 @@ Reveal.addEventListener( 'somestate', function() { ### Slide Backgrounds -Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a ```data-background``` attribute to your ```
    ``` elements. Four different types of backgrounds are supported: color, image, video and iframe. +Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a ```data-background``` attribute to your ```
    ``` elements. Four different types of backgrounds are supported: color, image, video and iframe. Below are a few examples. -#### Color Backgrounds -All CSS color formats are supported, like rgba() or hsl(). ```html -
    -

    Color

    +
    +

    All CSS color formats are supported, like rgba() or hsl().

    +
    +
    +

    This slide will have a full-size background image.

    +
    +
    +

    This background image will be sized to 100px and repeated.

    +
    +
    +

    Video. Multiple sources can be defined using a comma separated list. Video will loop when the data-background-video-loop attribute is provided.

    +
    +
    +

    Embeds a web page as a background. Note that the page won't be interactive.

    ``` -#### Image Backgrounds -By default, background images are resized to cover the full page. Available options: - -| Attribute | Default | Description | -| :--------------------------- | :--------- | :---------- | -| data-background-image | | URL of the image to show. GIFs restart when the slide opens. | -| data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. | -| data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. | -| data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. | -```html -
    -

    Image

    -
    -
    -

    This background image will be sized to 100px and repeated

    -
    -``` - -#### Video Backgrounds -Automatically plays a full size video behind the slide. - -| Attribute | Default | Description | -| :--------------------------- | :------ | :---------- | -| data-background-video | | A single video source, or a comma separated list of video sources. | -| data-background-video-loop | false | Flags if the video should play repeatedly. | -| data-background-video-muted | false | Flags if the audio should be muted. | -| data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. | - -```html -
    -

    Video

    -
    -``` - -#### Iframe Backgrounds -Embeds a web page as a slide background that covers 100% of the reveal.js width and height. The iframe is in the background layer, behind your slides, and as such it's not possible to interact with it by default. To make your background interactive, you can add the `data-background-interactive` attribute. -```html -
    -

    Iframe

    -
    -``` - -#### Background Transitions Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing ```backgroundTransition: 'slide'``` to the ```Reveal.initialize()``` call. Alternatively you can set ```data-background-transition``` on any section with a background to override that specific transition. @@ -643,16 +456,16 @@ Reveal.initialize({ // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto) - // Number of pixels to move the parallax background per slide - // - Calculated automatically unless specified - // - Set to 0 to disable movement along an axis + // Amount of pixels to move the parallax background per slide step, + // a value of 0 disables movement along the given axis + // These are optional, if they aren't specified they'll be calculated automatically parallaxBackgroundHorizontal: 200, parallaxBackgroundVertical: 50 }); ``` -Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://revealjs.com/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg¶llaxBackgroundSize=2100px%20900px). +Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://lab.hakim.se/reveal-js/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg¶llaxBackgroundSize=2100px%20900px). @@ -673,15 +486,15 @@ You can also use different in and out transitions for the same slide: ```html
    - The train goes on … + The train goes on …
    -
    - and on … +
    + and on …
    -
    +
    and stops.
    -
    +
    (Passengers entering and leaving)
    @@ -690,6 +503,9 @@ You can also use different in and out transitions for the same slide: ``` +Note that this does not work with the page and cube transitions. + + ### Internal links It's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute (```
    ```): @@ -712,7 +528,7 @@ You can also add relative navigation links, similar to the built in reveal.js co ### Fragments -Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://revealjs.com/#/fragments +Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/fragments The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment: @@ -721,7 +537,6 @@ The default fragment style is to start out invisible and fade in. This style can

    grow

    shrink

    fade-out

    -

    fade-up (also down, left and right!)

    visible only once

    blue only once

    highlight-red

    @@ -767,41 +582,33 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) { ### Code syntax highlighting -By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: [lib/css/zenburn.css](lib/css/zenburn.css)). - -Below is an example with clojure code that will be syntax highlighted. When the `data-trim` attribute is present, surrounding whitespace is automatically removed. HTML will be escaped by default. To avoid this, for example if you are using `` to call out a line of code, add the `data-noescape` attribute to the `` element. +By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted. When the `data-trim` attribute is present surrounding whitespace is automatically removed. ```html
    -
    
    +	
    
     (def lazy-fib
       (concat
        [0 1]
    -   ((fn rfib [a b]
    +   ((fn rfib [a b]
             (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
     	
    ``` ### Slide number -If you would like to display the page number of the current slide you can do so using the ```slideNumber``` and ```showSlideNumber``` configuration values. +If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value. ```javascript // Shows the slide number using default formatting Reveal.configure({ slideNumber: true }); // Slide number formatting can be configured using these variables: -// "h.v": horizontal . vertical slide number (default) -// "h/v": horizontal / vertical slide number -// "c": flattened slide number -// "c/t": flattened slide number / total slides -Reveal.configure({ slideNumber: 'c/t' }); - -// Control which views the slide number displays on using the "showSlideNumber" value: -// "all": show on all views (default) -// "speaker": only show slide numbers on speaker notes view -// "print": only show slide numbers when printing to PDF -Reveal.configure({ showSlideNumber: 'speaker' }); +// h: current slide's horizontal index +// v: current slide's vertical index +// c: current slide index (flattened) +// t: total number of slides (flattened) +Reveal.configure({ slideNumber: 'c / t' }); ``` @@ -819,26 +626,20 @@ Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } ); Reveal.toggleOverview(); ``` - ### Fullscreen mode Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode. ### Embedded media +Embedded HTML5 `
    diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/example.md b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/example.md index 89c75345e..6f6f577a1 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/example.md +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/example.md @@ -29,8 +29,3 @@ Content 3.1 ## External 3.2 Content 3.2 - - -## External 3.3 - -![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/markdown.js b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/markdown.js index aa08ee5ed..15e3b40b3 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/markdown.js +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/markdown.js @@ -4,26 +4,33 @@ * of external markdown documents. */ (function( root, factory ) { - if (typeof define === 'function' && define.amd) { - root.marked = require( './marked' ); - root.RevealMarkdown = factory( root.marked ); - root.RevealMarkdown.initialize(); - } else if( typeof exports === 'object' ) { + if( typeof exports === 'object' ) { module.exports = factory( require( './marked' ) ); - } else { + } + else { // Browser globals (root is window) root.RevealMarkdown = factory( root.marked ); root.RevealMarkdown.initialize(); } }( this, function( marked ) { + if( typeof marked === 'undefined' ) { + throw 'The reveal.js Markdown plugin requires marked to be loaded'; + } + + if( typeof hljs !== 'undefined' ) { + marked.setOptions({ + highlight: function( lang, code ) { + return hljs.highlightAuto( lang, code ).value; + } + }); + } + var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$', - DEFAULT_NOTES_SEPARATOR = 'notes?:', + DEFAULT_NOTES_SEPARATOR = 'note:', DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$', DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$'; - var SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__'; - /** * Retrieves the markdown contents of a slide section @@ -31,15 +38,11 @@ */ function getMarkdownFromSlide( section ) { - // look for a ' ); - var leadingWs = text.match( /^\n?(\s*)/ )[1].length, leadingTabs = text.match( /^\n?(\t*)/ )[1].length; @@ -109,13 +112,9 @@ var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) ); if( notesMatch.length === 2 ) { - content = notesMatch[0] + ''; + content = notesMatch[0] + ''; } - // prevent script end tags in the content from interfering - // with parsing - content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER ); - return ''; } @@ -178,7 +177,7 @@ markdownSections += '
    '; sectionStack[i].forEach( function( child ) { - markdownSections += '
    ' + createMarkdownSlide( child, options ) + '
    '; + markdownSections += '
    ' + createMarkdownSlide( child, options ) + '
    '; } ); markdownSections += '
    '; @@ -380,24 +379,6 @@ return { initialize: function() { - if( typeof marked === 'undefined' ) { - throw 'The reveal.js Markdown plugin requires marked to be loaded'; - } - - if( typeof hljs !== 'undefined' ) { - marked.setOptions({ - highlight: function( code, lang ) { - return hljs.highlightAuto( code, [lang] ).value; - } - }); - } - - var options = Reveal.getConfig().markdown; - - if ( options ) { - marked.setOptions( options ); - } - processSlides(); convertSlides(); }, diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/marked.js b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/marked.js index 555c1dc1d..70af29bf9 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/marked.js +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/markdown/marked.js @@ -3,4 +3,4 @@ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) * https://github.com/chjj/marked */ -(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file +(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.rules=this.options.tables?p.tables:p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.rules=this.options.breaks?u.breaks:u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?String.fromCharCode("x"===t.charAt(1)?parseInt(t.substring(2),16):+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;rAn error occured:

    "+s(c.message+"",!0)+"
    ";throw c}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;c>u;u++)h=i[u],a=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(a-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+a+"}","gm"),"")),this.options.smartLists&&u!==c-1&&(o=p.bullet.exec(i[u+1])[0],l===o||l.length>1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=this.mangle(":"===i[1].charAt(6)?i[1].substring(7):i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^
    /i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=s(this.smartypants(i[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",r=e.length,s=0;r>s;s++)t=e.charCodeAt(s),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:s(e,!0))+"\n
    \n":"
    "+(n?e:s(e,!0))+"\n
    "},n.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(s){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var l='
    "},n.prototype.image=function(e,t,n){var r=''+n+'":">"},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;ebody{font-family: sans-serif;}

    reveal.js multiplex server.

    Generate token'); - res.end(); - }); - stream.on('readable', function() { - stream.pipe(res); - }); + fs.createReadStream(opts.baseDir + '/index.html').pipe(res); }); app.get("/token", function(req,res) { @@ -55,7 +47,7 @@ var createHash = function(secret) { }; // Actually listen -server.listen( opts.port || null ); +app.listen(opts.port || null); var brown = '\033[33m', green = '\033[32m', diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/multiplex/master.js b/doc/pub/NeuralNet/html/reveal.js/plugin/multiplex/master.js index 7f4bf4511..b6a7eb7dc 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/multiplex/master.js +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/multiplex/master.js @@ -1,34 +1,51 @@ (function() { - // Don't emit events from inside of notes windows if ( window.location.search.match( /receiver/gi ) ) { return; } var multiplex = Reveal.getConfig().multiplex; - var socket = io.connect( multiplex.url ); + var socket = io.connect(multiplex.url); - function post() { + var notify = function( slideElement, indexh, indexv, origin ) { + if( typeof origin === 'undefined' && origin !== 'remote' ) { + var nextindexh; + var nextindexv; - var messageData = { - state: Reveal.getState(), - secret: multiplex.secret, - socketId: multiplex.id - }; + var fragmentindex = Reveal.getIndices().f; + if (typeof fragmentindex == 'undefined') { + fragmentindex = 0; + } - socket.emit( 'multiplex-statechanged', messageData ); + if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') { + nextindexh = indexh; + nextindexv = indexv + 1; + } else { + nextindexh = indexh + 1; + nextindexv = 0; + } + var slideData = { + indexh : indexh, + indexv : indexv, + indexf : fragmentindex, + nextindexh : nextindexh, + nextindexv : nextindexv, + secret: multiplex.secret, + socketId : multiplex.id + }; + + socket.emit('slidechanged', slideData); + } + } + + Reveal.addEventListener( 'slidechanged', function( event ) { + notify( event.currentSlide, event.indexh, event.indexv, event.origin ); + } ); + + var fragmentNotify = function( event ) { + notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin ); }; - // post once the page is loaded, so the client follows also on "open URL". - window.addEventListener( 'load', post ); - - // Monitor events that trigger a change in state - Reveal.addEventListener( 'slidechanged', post ); - Reveal.addEventListener( 'fragmentshown', post ); - Reveal.addEventListener( 'fragmenthidden', post ); - Reveal.addEventListener( 'overviewhidden', post ); - Reveal.addEventListener( 'overviewshown', post ); - Reveal.addEventListener( 'paused', post ); - Reveal.addEventListener( 'resumed', post ); - -}()); + Reveal.addEventListener( 'fragmentshown', fragmentNotify ); + Reveal.addEventListener( 'fragmenthidden', fragmentNotify ); +}()); \ No newline at end of file diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/client.js b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/client.js index 00b277baf..628586ffb 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/client.js +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/client.js @@ -41,15 +41,10 @@ } // When a new notes window connects, post our current state - socket.on( 'new-subscriber', function( data ) { + socket.on( 'connect', function( data ) { post(); } ); - // When the state changes from inside of the speaker view - socket.on( 'statechanged-speaker', function( data ) { - Reveal.setState( data.state ); - } ); - // Monitor events that trigger a change in state Reveal.addEventListener( 'slidechanged', post ); Reveal.addEventListener( 'fragmentshown', post ); diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/index.js b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/index.js index b95f07188..df917f112 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/index.js +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/index.js @@ -1,40 +1,37 @@ -var http = require('http'); var express = require('express'); var fs = require('fs'); var io = require('socket.io'); +var _ = require('underscore'); var Mustache = require('mustache'); -var app = express(); +var app = express.createServer(); var staticDir = express.static; -var server = http.createServer(app); -io = io(server); +io = io.listen(app); var opts = { port : 1947, baseDir : __dirname + '/../../' }; -io.on( 'connection', function( socket ) { +io.sockets.on( 'connection', function( socket ) { - socket.on( 'new-subscriber', function( data ) { - socket.broadcast.emit( 'new-subscriber', data ); + socket.on( 'connect', function( data ) { + socket.broadcast.emit( 'connect', data ); }); socket.on( 'statechanged', function( data ) { - delete data.state.overview; socket.broadcast.emit( 'statechanged', data ); }); - socket.on( 'statechanged-speaker', function( data ) { - delete data.state.overview; - socket.broadcast.emit( 'statechanged-speaker', data ); - }); - }); -[ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { - app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); +app.configure( function() { + + [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { + app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); + }); + }); app.get('/', function( req, res ) { @@ -55,7 +52,7 @@ app.get( '/notes/:socketId', function( req, res ) { }); // Actually listen -server.listen( opts.port || null ); +app.listen( opts.port || null ); var brown = '\033[33m', green = '\033[32m', @@ -65,5 +62,5 @@ var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' console.log( brown + 'reveal.js - Speaker Notes' + reset ); console.log( '1. Open the slides at ' + green + slidesLocation + reset ); -console.log( '2. Click on the link in your JS console to go to the notes page' ); +console.log( '2. Click on the link your JS console to go to the notes page' ); console.log( '3. Advance through your slides and your notes will advance automatically' ); diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/notes.html b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/notes.html index ab8c5b17a..72d0317f1 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/notes.html +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/notes-server/notes.html @@ -8,7 +8,6 @@ @@ -247,7 +152,7 @@
    -
    Upcoming
    +
    UPCOMING:

    Time Click to Reset

    @@ -265,10 +170,6 @@
    -
    - - -
    @@ -281,20 +182,11 @@ currentState, currentSlide, upcomingSlide, - layoutLabel, - layoutDropdown, connected = false; var socket = io.connect( window.location.origin ), socketId = '{{socketId}}'; - var SPEAKER_LAYOUTS = { - 'default': 'Default', - 'wide': 'Wide', - 'tall': 'Tall', - 'notes-only': 'Notes only' - }; - socket.on( 'statechanged', function( data ) { // ignore data from sockets that aren't ours @@ -303,6 +195,7 @@ if( connected === false ) { connected = true; + setupIframes( data ); setupKeyboard(); setupNotes(); setupTimer(); @@ -313,28 +206,13 @@ } ); - setupLayout(); - - // Load our presentation iframes - setupIframes(); - - // Once the iframes have loaded, emit a signal saying there's - // a new subscriber which will trigger a 'statechanged' - // message to be sent back window.addEventListener( 'message', function( event ) { var data = JSON.parse( event.data ); if( data && data.namespace === 'reveal' ) { if( /ready/.test( data.eventName ) ) { - socket.emit( 'new-subscriber', { socketId: socketId } ); - } - } - - // Messages sent by reveal.js inside of the current slide preview - if( data && data.namespace === 'reveal' ) { - if( /slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) { - socket.emit( 'statechanged-speaker', { state: data.state } ); + socket.emit( 'connect', { socketId: socketId } ); } } @@ -389,7 +267,7 @@ /** * Creates the preview iframes. */ - function setupIframes() { + function setupIframes( data ) { var params = [ 'receiver', @@ -399,8 +277,9 @@ 'backgroundTransition=none' ].join( '&' ); - var currentURL = '/?' + params + '&postMessageEvents=true'; - var upcomingURL = '/?' + params + '&controls=false'; + var hash = '#/' + data.state.indexh + '/' + data.state.indexv; + var currentURL = '/?' + params + '&postMessageEvents=true' + hash; + var upcomingURL = '/?' + params + '&controls=false' + hash; currentSlide = document.createElement( 'iframe' ); currentSlide.setAttribute( 'width', 1280 ); @@ -472,74 +351,6 @@ } - /** - * Sets up the speaker view layout and layout selector. - */ - function setupLayout() { - - layoutDropdown = document.querySelector( '.speaker-layout-dropdown' ); - layoutLabel = document.querySelector( '.speaker-layout-label' ); - - // Render the list of available layouts - for( var id in SPEAKER_LAYOUTS ) { - var option = document.createElement( 'option' ); - option.setAttribute( 'value', id ); - option.textContent = SPEAKER_LAYOUTS[ id ]; - layoutDropdown.appendChild( option ); - } - - // Monitor the dropdown for changes - layoutDropdown.addEventListener( 'change', function( event ) { - - setLayout( layoutDropdown.value ); - - }, false ); - - // Restore any currently persisted layout - setLayout( getLayout() ); - - } - - /** - * Sets a new speaker view layout. The layout is persisted - * in local storage. - */ - function setLayout( value ) { - - var title = SPEAKER_LAYOUTS[ value ]; - - layoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' ); - layoutDropdown.value = value; - - document.body.setAttribute( 'data-speaker-layout', value ); - - // Persist locally - if( window.localStorage ) { - window.localStorage.setItem( 'reveal-speaker-layout', value ); - } - - } - - /** - * Returns the ID of the most recently set speaker layout - * or our default layout if none has been set. - */ - function getLayout() { - - if( window.localStorage ) { - var layout = window.localStorage.getItem( 'reveal-speaker-layout' ); - if( layout ) { - return layout; - } - } - - // Default to the first record in the layouts hash - for( var id in SPEAKER_LAYOUTS ) { - return id; - } - - } - function zeroPadInteger( num ) { var str = '00' + parseInt( num ); diff --git a/doc/pub/NeuralNet/html/reveal.js/plugin/notes/notes.html b/doc/pub/NeuralNet/html/reveal.js/plugin/notes/notes.html index 4c5b799b5..0cc8cf612 100644 --- a/doc/pub/NeuralNet/html/reveal.js/plugin/notes/notes.html +++ b/doc/pub/NeuralNet/html/reveal.js/plugin/notes/notes.html @@ -8,7 +8,6 @@