Commit 66f2ea84 authored by 郭羽's avatar 郭羽

update feature

parent a70efdce
......@@ -92,9 +92,9 @@ def getWeight(x):
def getDataSet(df,shuffleSize = 10000,batchSize=128):
# print(df.dtypes)
labels = df.pop('label')
df["page_stay"] = labels["label"].map(lambda x:1)
weights = df.pop('page_stay')
dataSet = tf.data.Dataset.from_tensor_slices((dict(df), labels,weights)).shuffle(shuffleSize).batch(batchSize)
# df["page_stay"] = df["page_stay"].map(getWeight)
# weights = df.pop('page_stay')
dataSet = tf.data.Dataset.from_tensor_slices((dict(df), labels)).shuffle(shuffleSize).batch(batchSize)
return dataSet
def getTrainColumns(train_columns,data_vocab):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment