Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

np.random.rand()

# train test split
df = pd.read_csv('file_location')
mask = np.random.rand(len(df)) < 0.8
train  = df[mask]
test = df[~mask]
Source by blog.csdn.net #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+8 =