<jupyter_start><jupyter_text>Alternative Model 1<jupyter_code># Define the the number of inputs (features) to the model
number_input_features = len(X_train.iloc[0])

# Review the number of features
number_input_features
# Define the number of neurons in the output layer
number_output_neurons_A1 = 1

# Define the number of hidden nodes for the first hidden layer
hidden_nodes_layer1_A1 = (number_input_features + number_output_neurons) // 2 


# Review the number of hidden nodes in the first layer
hidden_nodes_layer1_A1
# Create the Sequential model instance
nn_A1 = Sequential()
# First hidden layer
nn_A1.add(Dense(units=hidden_nodes_layer1_A1, input_dim=number_input_features, activation="relu"))


# Output layer
nn_A1.add(Dense(units=1, activation="sigmoid"))



# Check the structure of the model
nn_A1.summary()
# Compile the Sequential model
nn_A1.compile(loss="binary_crossentropy", optimizer="adam", metrics=["accuracy"])

# Fit the model using 50 epochs and the training data
fit_model_A1 = nn_A1.fit(X_train_scaled, y_train, epochs=50)<jupyter_output>Epoch 1/50
  5/804 [..............................] - ETA: 10s - loss: 0.4986 - accuracy: 0.7750<jupyter_text>Alternative Model 2<jupyter_code># Define the the number of inputs (features) to the model
number_input_features = len(X_train.iloc[0])

# Review the number of features
number_input_features
# Define the number of neurons in the output layer
number_output_neurons_A2 = 1
# Define the number of hidden nodes for the first hidden layer
hidden_nodes_layer1_A2 = (number_input_features + number_output_neurons) // 2 


# Review the number of hidden nodes in the first layer
hidden_nodes_layer1_A2
# Create the Sequential model instance
nn_A2 = Sequential()
# First hidden layer
nn_A2.add(Dense(units=hidden_nodes_layer1_A2, input_dim=number_input_features, activation="relu"))

# Second hidden layer
nn_A2.add(Dense(units=hidden_nodes_layer1_A2, activation="relu"))

# Output layer
nn_A2.add(Dense(units=number_output_neurons_A2, activation="sigmoid"))

# Check the structure of the model
nn_A2.summary()
# Compile the model
nn_A2.compile(loss="binary_crossentropy", optimizer="adam", metrics=["accuracy"])

# Fit the model
fit_model = nn_A2.fit(X_train_scaled, y_train, epochs=100)

print("Original Model Results")

# Evaluate the model loss and accuracy metrics using the evaluate method and the test data
model_loss, model_accuracy = nn.evaluate(X_test_scaled,y_test,verbose=2)

# Display the model loss and accuracy results
print(f"Loss: {model_loss}, Accuracy: {model_accuracy}")
print("Alternative Model 1 Results")

# Evaluate the model loss and accuracy metrics using the evaluate method and the test data
model_loss, model_accuracy = nn_A1.evaluate(X_test_scaled,y_test,verbose=2)

# Display the model loss and accuracy results
print(f"Loss: {model_loss}, Accuracy: {model_accuracy}")
print("Alternative Model 2 Results")

# Evaluate the model loss and accuracy metrics using the evaluate method and the test data
model_loss, model_accuracy = nn_A2.evaluate(X_test_scaled,y_test,verbose=2)

# Display the model loss and accuracy results
print(f"Loss: {model_loss}, Accuracy: {model_accuracy}")
# Set the file path for the first alternative model
file_path = Path("./Resources/AlphabetSoup_A1.h5")

# Export your model to a HDF5 file
nn.save(file_path)
# Set the file path for the second alternative model
file_path = Path("./Resources/AlphabetSoup_A2.h5")

# Export your model to a HDF5 file
nn.save(file_path)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09258733314399319, 'fraction_numerical': 0.0224368077250781, 'mean_word_length': 6.086519114688128, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '229475', 'license': 'MIT', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1130, 'n_words': 346, 'path': 'venture_funding_with_deep_learning.ipynb', 'repo_name': 'owardlaw/Venture_Funding_Deep_Learning', 'size': '3521'}