input: plaintext
  from keras.models import Sequential
  from keras.layers import Dense
  import pandas as pd
  from sklearn.model_selection import train_test_split
  
  def create_regression_model(data_path: str, input_dim: int, epochs: int = 100, batch_size: int = 20) -> Sequential:
      """Construct a neural network model for basic regression using Keras.
  
      Parameters:
      - data_path (str): The path to the CSV file containing the dataset.
      - input_dim (int): The number of features in the dataset.
      - epochs (int, optional): Number of epochs to train the model. Default is 100.
      - batch_size (int, optional): Batch size for training. Default is 20.
  
      Returns:
      - Sequential: The trained Keras model.
  
      Example:
      >>> model = create_regression_model('data.csv', 12)
      Test score: 0.01
      """
  
      # Load the data
      data = pd.read_csv(data_path)
      
      # Split the data into features and labels
      X = data.drop(['label'], axis=1).values
      y = data['label'].values
      
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Create the neural network
      model = Sequential()
      model.add(Dense(12, input_dim=input_dim, kernel_initializer='normal', activation='relu'))
      model.add(Dense(12, kernel_initializer='normal', activation='relu'))
      model.add(Dense(1, kernel_initializer='normal'))
      
      # Compile the model
      model.compile(loss='mean_squared_error', optimizer='adam')
      
      # Train the model
      model.fit(X_train, y_train, epochs=epochs, batch_size=batch_size, verbose=0)
      
      return model
  
output:     # Evaluate the model
      score = model.evaluate(X_test, y_test, verbose=0)
      print(f"Test score: {score:.2f}")