xx
This commit is contained in:
parent
148eb732ae
commit
7d0a91cdd6
14
run.py
14
run.py
@ -16,8 +16,8 @@ test_A = pd.read_csv("test-A/in.tsv", header=None, sep="\t")
|
||||
|
||||
|
||||
def preprocess_data(df_to_process, main_df=None):
|
||||
final_df = pd.get_dummies(df_to_process, columns=[0, 1, 2, 3, 4])
|
||||
# final_df.drop(columns=[0], inplace=True)
|
||||
final_df = pd.get_dummies(df_to_process, columns=[1, 2, 3, 4])
|
||||
final_df.drop(columns=[0], inplace=True)
|
||||
# numeric = [3]
|
||||
# sc = StandardScaler()
|
||||
# final_df[numeric] = sc.fit_transform(final_df[numeric])
|
||||
@ -42,10 +42,16 @@ y = train_expected[0]
|
||||
|
||||
# Define model
|
||||
# model = Sequential()
|
||||
# model = Sequential()
|
||||
# model.add(Dense(20, input_dim=76, kernel_initializer='normal', activation='relu'))
|
||||
# model.add(Dense(1, kernel_initializer='normal'))
|
||||
# Compile model
|
||||
# model.compile(loss='mean_squared_error', optimizer='adam')
|
||||
# evaluate model with stand
|
||||
model = tensorflow.keras.models.Sequential(
|
||||
[
|
||||
tensorflow.keras.layers.Dense(
|
||||
128, activation="relu", input_dim=97, kernel_regularizer="l2"
|
||||
128, activation="relu", input_dim=76, kernel_regularizer="l2"
|
||||
),
|
||||
tensorflow.keras.layers.Dropout(0.5),
|
||||
tensorflow.keras.layers.Dense(128 // 2, activation="relu", kernel_regularizer="l2"),
|
||||
@ -63,7 +69,7 @@ model = tensorflow.keras.models.Sequential(
|
||||
#model.summary() #Print model Summary
|
||||
|
||||
model.compile(loss= "mean_squared_error" , optimizer="adam", metrics=["mean_squared_error"])
|
||||
model.fit(train_df, y, epochs=20)
|
||||
model.fit(train_df, y, epochs=100)
|
||||
|
||||
|
||||
# param_grid = {
|
||||
|
1420
test-A/out.tsv
1420
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user