Answers for "split list python percent"

0

split list python percent

files = [1,2,3,4,5,6,7,8,9,10]
training = files[:int(len(files)*0.8)] #[1, 2, 3, 4, 5, 6, 7, 8]
validation = files[-int(len(files)*0.1):] #[10]
testing = files[-int(len(files)*0.1):] #[10]
Posted by: Guest on August-21-2021
0

split list python percent

train, validate, test = np.split(files, [int(len(files)*0.8), int(len(files)*0.9)])
Posted by: Guest on August-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language