code:
# %%

from sklearn.preprocessing import StandardScaler
import numpy as np
from sklearn.preprocessing import StandardScaler


# %%
import pandas as pd

chunk_size = 10000  # This depends on your available memory
batch_size = 72 



# %%

def data_generator():
    reader = pd.read_csv(r"C:\Users\arisa\Desktop\combined_day.csv", chunksize=chunk_size)
    for chunk in reader:
        
        X = chunk.drop([
                'Date', 'Symbol',
                'y_High_1d', 'y_Low_1d', 'y_Priority_1d',
                 'y_High_2d', 'y_Low_2d', 'y_Priority_2d',
                  'y_High_3d', 'y_Low_3d', 'y_Priority_3d',
                   'y_High_5d', 'y_Low_5d', 'y_Priority_5d'], axis=1).values
        Y = chunk[['y_High_1d', 'y_Low_1d', 'y_Priority_1d',
                 'y_High_2d', 'y_Low_2d', 'y_Priority_2d',
                  'y_High_3d', 'y_Low_3d', 'y_Priority_3d',
                   'y_High_5d', 'y_Low_5d', 'y_Priority_5d']].values
        xScaler = StandardScaler()
        yScaler = StandardScaler()
        X_scaled = xScaler.fit_transform(X)
        Y_scaled = yScaler.fit_transform(Y)
        # Yield batches
        for i in range(0, len(X_scaled), batch_size):
            X_batch = X_scaled.iloc[i:i+batch_size]
            y_batch = Y_scaled[i:i+batch_size]
            yield np.array(X_batch), np.array(y_batch)

# %%

from tensorflow.keras.layers import Dense, Dropout
from tensorflow.keras import Model
from tensorflow.keras.layers import Input, Dropout

def build_model():
    input_shape = (6427,)

    inputs = Input(shape=input_shape)  # Corrected the input shape specification

    x = Dense(6427, activation='relu')(inputs)
    x = Dropout(0.25) (x)
    x = Dense(3200, activation='relu') (x)
    x = Dropout(0.20) (x)
    x = Dense(1800, activation='relu') (x)
    x = Dropout(0.15) (x)
    x = Dense(1024, activation='relu') (x)
    x = Dropout(0.10) (x)
    x = Dense(512, activation='relu') (x)
    x = Dropout(0.05) (x)
    x = Dense(256, activation='relu') (x)
    x = Dense(128, activation='relu') (x)
    x = Dense(64, activation='relu') (x)
    x = Dense(32, activation='relu')  (x)



    # Defining three separate outputs

    out_high_1d = Dense(1, name='high_output_1d')(x)  # No activation, linear output
    out_low_1d = Dense(1, name='low_output_1d')(x)    # No activation, linear output
    out_priority_1d = Dense(1, activation='sigmoid', name='priority_output_1d')(x)

    out_high_2d = Dense(1, name='high_output_2d')(x)  # No activation, linear output
    out_low_2d = Dense(1, name='low_output_2d')(x)    # No activation, linear output
    out_priority_2d = Dense(1, activation='sigmoid', name='priority_output_2d')(x)

    out_high_3d = Dense(1, name='high_output_3d')(x)  # No activation, linear output
    out_low_3d = Dense(1, name='low_output_3d')(x)    # No activation, linear output
    out_priority_3d = Dense(1, activation='sigmoid', name='priority_output_3d')(x)

    out_high_5d = Dense(1, name='high_output_5d')(x)  # No activation, linear output
    out_low_5d = Dense(1, name='low_output_5d')(x)    # No activation, linear output
    out_priority_5d = Dense(1, activation='sigmoid', name='priority_output_5d')(x)

    # Constructing the model
    model = Model(inputs=inputs, outputs=[
        out_high_1d, out_low_1d, out_priority_1d,out_high_2d, out_low_2d, out_priority_2d,
        out_high_3d, out_low_3d, out_priority_3d,out_high_5d, out_low_5d, out_priority_5d])

    model.compile(optimizer='adam',
                  loss={
                    'high_output_1d': 'mse', 'low_output_1d': 'mse', 'priority_output_1d': 'binary_crossentropy',
                    'high_output_2d': 'mse', 'low_output_2d': 'mse', 'priority_output_2d': 'binary_crossentropy',
                    'high_output_3d': 'mse', 'low_output_3d': 'mse', 'priority_output_3d': 'binary_crossentropy',
                    'high_output_5d': 'mse', 'low_output_5d': 'mse', 'priority_output_5d': 'binary_crossentropy'
                  },
                  metrics={
                    'high_output_1d': ['mae'], 'low_output_1d': ['mae'], 'priority_output_1d': ['accuracy'],
                    'high_output_2d': ['mae'], 'low_output_2d': ['mae'], 'priority_output_2d': ['accuracy'],
                    'high_output_3d': ['mae'], 'low_output_3d': ['mae'], 'priority_output_3d': ['accuracy'],
                    'high_output_5d': ['mae'], 'low_output_5d': ['mae'], 'priority_output_5d': ['accuracy']
                  },
                  loss_weights={
                    'high_output_1d': 1.0, 'low_output_1d': 1.0, 'priority_output_1d': 1.0,
                    'high_output_2d': 1.0, 'low_output_2d': 1.0, 'priority_output_2d': 1.0,
                    'high_output_3d': 1.0, 'low_output_3d': 1.0, 'priority_output_3d': 1.0,
                    'high_output_5d': 1.0, 'low_output_5d': 1.0, 'priority_output_5d': 1.0
                  }
                  )
    return model


# %%

model = build_model()

history = model.fit(data_generator(), steps_per_epoch=100, epochs=10)






error:
{
	"name": "AttributeError",
	"message": "'numpy.ndarray' object has no attribute 'iloc'",
	"stack": "---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[35], line 3
      1 model = build_model()
----> 3 history = model.fit(data_generator(), steps_per_epoch=100, epochs=10)

File c:\\Users\\arisa\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\keras\\src\\utils\\traceback_utils.py:122, in filter_traceback.<locals>.error_handler(*args, **kwargs)
    119     filtered_tb = _process_traceback_frames(e.__traceback__)
    120     # To get the full stack trace, call:
    121     # `keras.config.disable_traceback_filtering()`
--> 122     raise e.with_traceback(filtered_tb) from None
    123 finally:
    124     del filtered_tb

Cell In[34], line 21, in data_generator()
     19 # Yield batches
     20 for i in range(0, len(X_scaled), batch_size):
---> 21     X_batch = X_scaled.iloc[i:i+batch_size]
     22     y_batch = Y_scaled[i:i+batch_size]
     23     yield np.array(X_batch), np.array(y_batch)

AttributeError: 'numpy.ndarray' object has no attribute 'iloc'"
}