test poly keras
This commit is contained in:
parent
ec296f7853
commit
282084ae4c
12
run2.py
12
run2.py
@ -10,8 +10,8 @@ df = pd.read_csv("train/in.tsv", names=in_columns, sep="\t")
|
||||
df_test = pd.read_csv("dev-0/in.tsv", names=in_columns, sep="\t")
|
||||
|
||||
df = pd.concat([df, df_test])
|
||||
df = df.drop(["nazwa_stacji", "typ_zbioru"], axis=1)
|
||||
x = pd.get_dummies(df, columns=["id_stacji", "rok", "miesiąc"])
|
||||
df = df.drop(["nazwa_stacji"], axis=1)
|
||||
x = pd.get_dummies(df, columns=["id_stacji", "typ_zbioru", "rok", "miesiąc"])
|
||||
|
||||
x = x.iloc[:-600]
|
||||
y = pd.read_csv("train/expected.tsv", sep="\t", names=["rainfall"])
|
||||
@ -24,7 +24,7 @@ df = poly.fit_transform(x)
|
||||
|
||||
model = Sequential(
|
||||
[
|
||||
Dense(512, activation="relu", input_dim=2702),
|
||||
Dense(512, activation="relu", input_dim=2927),
|
||||
tensorflow.keras.layers.BatchNormalization(),
|
||||
Dense(512 // 2, activation="relu"),
|
||||
tensorflow.keras.layers.BatchNormalization(),
|
||||
@ -41,14 +41,14 @@ model = Sequential(
|
||||
model.compile(
|
||||
loss="mean_squared_error", optimizer="adam", metrics=["mean_squared_error"]
|
||||
)
|
||||
model.fit(df, y, epochs=60)
|
||||
model.fit(df, y, epochs=100)
|
||||
|
||||
x_test = pd.read_csv("test-A/in.tsv", sep="\t", names=in_columns)
|
||||
df_train = pd.read_csv("train/in.tsv", names=in_columns, sep="\t")
|
||||
|
||||
x_test = pd.concat([x_test, df_train])
|
||||
x_test = x_test.drop(["nazwa_stacji", "typ_zbioru"], axis=1)
|
||||
x_test = pd.get_dummies(x_test, columns=["id_stacji", "rok", "miesiąc"])
|
||||
x_test = x_test.drop(["nazwa_stacji"], axis=1)
|
||||
x_test = pd.get_dummies(x_test, columns=["id_stacji", "typ_zbioru", "rok", "miesiąc"])
|
||||
|
||||
x_test = x_test.iloc[:-8760]
|
||||
poly = PolynomialFeatures(2, interaction_only=True)
|
||||
|
1440
test-A/out.tsv
1440
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user