Kaggle competition: ASHRAE - Great Energy Predictor III
vocab_size = 10000
embedding_dim = 32
max_length = 25
trunc_type='post'
oov_tok = "<OOV>"
tokenizer = Tokenizer(num_words = vocab_size, oov_token=oov_tok)
 tokenizer.fit_on_texts(training_sentences)
 word_index = tokenizer.word_index
sequences = tokenizer.texts_to_sequences(training_sentences)
 padded = pad_sequences(sequences,maxlen=max_length, truncating=trunc_type)
 testing_sequences = tokenizer.texts_to_sequences(testing_sentences)
 testing_padded = pad_sequences(testing_sequences,maxlen=max_length )<string_transform>
register_matplotlib_converters()
sub = None
for dirname, _, filenames in os.walk('/kaggle/input/ultimaincercare/'):
for filename in filenames:
filename = os.path.join(dirname, filename)
 print(filename)
 if sub is None:
sub = pd.read_csv(filename)
 else:
sub.meter_reading += pd.read_csv(filename, usecols=['meter_reading'] ).meter_reading
sub.meter_reading = sub.meter_reading.clip(lower=0.0)/ len(filenames)
 sub.describe()
reverse_word_index = dict([(value, key)for(key, value)in word_index.items() ])
 def decode_review(text):
return ' '.join([reverse_word_index.get(i, '?')for i in text])
 i=8
print(decode_review(padded[16]))
print(training_sentences[i] )<choose_model_class>
sub.to_csv(f'submission-final-1.csv', index=False, float_format='%g' )
<train_model><EOS> 
FileLink('submission-final-1.csv' )