<jupyter_start><jupyter_text>Opportunity to Run a PCA to clean up Features<jupyter_code>train_test_split = 0.7

num_examples = X.shape[0]
num_train_examples = int(num_examples*train_test_split)
num_test_examples = int(num_examples - num_train_examples)

print(num_examples)
print(num_train_examples)
print(num_test_examples)
optimizer = tf.keras.optimizers.Adam(
    learning_rate=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-07, amsgrad=False, name='Adam'
)
inputs = tf.keras.Input(shape=(38,))
x = tf.keras.layers.Dense(16, activation=tf.nn.relu)(inputs)
x = tf.keras.layers.Dense(16, activation=tf.nn.relu)(x)
outputs = tf.keras.layers.Dense(2, activation=tf.nn.softmax)(x)

model = tf.keras.Model(inputs=inputs, outputs=outputs)
model.summary()
model.compile(
    optimizer=optimizer, 
    loss=tf.keras.losses.SparseCategoricalCrossentropy(), 
    metrics=['accuracy']
)
X_train = X.iloc[0:num_train_examples, :]
y_train = y.iloc[0:num_train_examples]

X_test = X.iloc[num_train_examples:num_examples, :]
y_test = y.iloc[num_train_examples:num_examples]
print(X_test.shape)
X_test.head()
BATCH_SIZE = 32
EPOCHS = 300
X_train = X_train.to_numpy()
y_train = y_train.to_numpy()
model.fit(
    x=X_train, 
    y=y_train, 
    batch_size=BATCH_SIZE, 
    epochs=EPOCHS, 
    verbose='1',
    callbacks=None, 
    validation_split=0.2, 
    shuffle=True,
)
loss, accuracy = model.evaluate(X_test, y_test)<jupyter_output>93/93 [==============================] - 0s 1ms/step - loss: 0.5439 - accuracy: 0.7260
{'fraction_non_alphanumeric': 0.15492021276595744, 'fraction_numerical': 0.0339095744680851, 'mean_word_length': 5.688888888888889, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '610877', 'license': 'MIT', 'n_tokens_mistral': 660, 'n_tokens_neox': 604, 'n_words': 84, 'path': 'lol-wins-dataset.ipynb', 'repo_name': 'karnak52/SQL_Analyzing_Album_Sales_using_Joins', 'size': '1504'}