2019-02-03 05:34:28 +00:00
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
|
|
|
|
# TensorFlow and tf.keras
|
|
|
|
import tensorflow as tf
|
|
|
|
from tensorflow import keras
|
|
|
|
|
|
|
|
# Helper libraries
|
|
|
|
import numpy as np
|
|
|
|
import matplotlib.pyplot as plt
|
2019-02-12 05:11:33 +00:00
|
|
|
import pandas as pd
|
2019-02-03 05:34:28 +00:00
|
|
|
|
2019-02-12 05:11:33 +00:00
|
|
|
from utils import *
|
|
|
|
|
|
|
|
tf.enable_eager_execution()
|
|
|
|
|
2019-02-14 09:06:09 +00:00
|
|
|
df = pd.read_pickle('data_final.p')
|
2019-02-12 05:11:33 +00:00
|
|
|
# print(df.head())
|
|
|
|
|
2019-02-14 09:06:09 +00:00
|
|
|
# dataset = dataframe_to_dataset_biomes(df)
|
|
|
|
dataset = dataframe_to_dataset_temp_precip(df)
|
2019-02-12 05:11:33 +00:00
|
|
|
|
2019-02-14 09:06:09 +00:00
|
|
|
i = 0
|
2019-02-12 05:11:33 +00:00
|
|
|
for feature, target in dataset:
|
2019-02-14 09:06:09 +00:00
|
|
|
i += 1
|
|
|
|
if i > 10:
|
|
|
|
break
|
2019-02-12 05:11:33 +00:00
|
|
|
print('{} => {}'.format(feature, target))
|
2019-02-03 05:34:28 +00:00
|
|
|
|
|
|
|
print(tf.__version__)
|