software/deep_boltzmann/networks/util.py
def shufflesplit(x, val_ratio):
    """ Shuffles the rows of matrix data x and returns a given ratio of training and validation data.

    Parameters
    ----------
    val_ratio : float
        Ratio of validation data. If 0, None is returned for validation data

    Returns
    -------
    x_train : array
        Training data
    x_val : array
        Validation data
    """
    xshuffle = shuffle(x)
    ntrain = int((1.0-val_ratio)*x.shape[0])
    xtrain = xshuffle[:ntrain]
    if x.shape[0] == ntrain:
        xval = None
    else:
        xval = xshuffle[ntrain:]
    return xtrain, xval
 Shuffles the rows of matrix data x and returns a given ratio of training and validation data.

    Parameters
    ----------
    val_ratio : float
        Ratio of validation data. If 0, None is returned for validation data

    Returns
    -------
    x_train : array
        Training data
    x_val : array
        Validation data
    
Shuffles the rows of matrix data x and returns a given ratio of training and validation data.
Parameters

val_ratio : float
Ratio of validation data. If 0, None is returned for validation data

Returns

x_train : array
Training data
x_val : array
Validation data
Shuffles the rows of matrix data x and returns a given ratio of training and validation data . Parameters val_ratio : float Ratio of validation data . If 0 None is returned for validation data Returns x_train : array Training data x_val : array Validation data
def shufflesplit(x, val_ratio):
    xshuffle = shuffle(x)
    ntrain = int((1.0-val_ratio)*x.shape[0])
    xtrain = xshuffle[:ntrain]
    if x.shape[0] == ntrain:
        xval = None
    else:
        xval = xshuffle[ntrain:]
    return xtrain, xval
def shufflesplit ( x , val_ratio ) : xshuffle = shuffle ( x ) ntrain = int ( ( 1.0 - val_ratio ) * x . shape [ 0 ] ) xtrain = xshuffle [ : ntrain ] if x . shape [ 0 ] == ntrain : xval = None else : xval = xshuffle [ ntrain : ] return xtrain , xval
Shuffles the rows of matrix data x and returns a given ratio of training and validation data.
Shuffles the rows of matrix data x and returns a given ratio of training and validation data .
""" Shuffles the rows of matrix data x and returns a given ratio of training and validation data.

    Parameters
    ----------
    val_ratio : float
        Ratio of validation data. If 0, None is returned for validation data

    Returns
    -------
    x_train : array
        Training data
    x_val : array
        Validation data
    """
x
val_ratio