请教了敖老师
def transform_time(x,min_=28805,max_=70197,delta=5*60):
num=ceil((max_-min_)/delta)
x_norm=(x-min_)/(max_-min_)
idx=min(int(x_norm*num),num-1)
one_hot_=[0 for _ in range(num)]
one_hot_[idx]=1
return one_hot_
请教了敖老师
def transform_time(x,min_=28805,max_=70197,delta=5*60):
num=ceil((max_-min_)/delta)
x_norm=(x-min_)/(max_-min_)
idx=min(int(x_norm*num),num-1)
one_hot_=[0 for _ in range(num)]
one_hot_[idx]=1
return one_hot_