Skip to content

Instantly share code, notes, and snippets.

@edenau
Last active December 27, 2019 16:41
Show Gist options
  • Save edenau/d375786fd1452841e01820d2bdffae6c to your computer and use it in GitHub Desktop.
Save edenau/d375786fd1452841e01820d2bdffae6c to your computer and use it in GitHub Desktop.
X_num_row, X_num_col = [2, 10000] # Row is no. of feature, col is no. of datum points
X_raw = np.random.rand(X_num_row,X_num_col) * 100
y_raw = np.concatenate(([(X_raw[0,:] + X_raw[1,:])], [(X_raw[0,:] - X_raw[1,:])], np.abs([(X_raw[0,:] - X_raw[1,:])])))
# for input a and b, output is a+b; a-b and |a-b|
y_num_row, y_num_col = y_raw.shape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment