What does y_p :::python do in this (or any) script?
Question: I am trying to work through the tutorial by Sebastian Raschka on Feature
scaling and I can't get the code below to run because it throws and error with
the third line, the one that end in 'python'.

    
    
    from matplotlib import pyplot as plt
    
    fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2, figsize=(10,5))
    
    y_p    :::python
        # Standardization
    
        x = [1,4,5,6,6,2,3]
        mean = sum(x)/len(x)
        std_dev = (1/len(x) * sum([ (x_i - mean)**2 for x_i in x]))**0.5
    
        z_scores = [(x_i - mean)/std_dev for x_i in x]
    
        # Min-Max scaling
    
        minmax = [(x_i - min(x)) / (min(x) - max(x)) for x_i in x]os = [0 for i in range(len(x))]
    
    ax1.scatter(z_scores, y_pos, color='g')
    ax1.set_title('Python standardization', color='g')
    
    ax2.scatter(minmax, y_pos, color='g')
    ax2.set_title('Python Min-Max scaling', color='g')
    
    ax3.scatter(z_scores_np, y_pos, color='b')
    ax3.set_title('Python NumPy standardization', color='b')
    The-effect-of-standardization
    ax4.scatter(np_minmax, y_pos, color='b')
    ax4.set_title('Python NumPy Min-Max scaling', color='b')
    
    plt.tight_layout()
    
    for ax in (ax1, ax2, ax3, ax4):
        ax.get_yaxis().set_visible(False)
        ax.grid()
    
    plt.show()
    

So, what does the y_p :::python do?


Answer: The answer is it isn't valid python code.

You should look at the ipython notebook that I believe you got some parts of
that code from.

<http://nbviewer.jupyter.org/github/rasbt/pattern_classification/blob/master/preprocessing/about_standardization_normalization.ipynb>

The relevant snippet is

    
    
    from matplotlib import pyplot as plt
    
    fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2, figsize=(10,5))
    
    y_pos = [0 for i in range(len(x))]
    
    ax1.scatter(z_scores, y_pos, color='g')
    ax1.set_title('Python standardization', color='g')
    

