build/lib/AutoMxL/Preprocessing/Deep_Encoder.py
def forward(self, cat_data):
        """Execute the forward propagation fed with categorical data input

        Parameters
        ----------
        cat_data : list
            categorical features sample

        Returns
        -------
         model : updated model
        """

        # embedding layer
        if self.emb_layer_size > 0:
            x = [emb_layer(cat_data[:, i])
                 for i, emb_layer in enumerate(self.emb_layers)]
            x = torch.cat(x, 1)

        # layer 1 (+ dropout)
        x = F.relu(self.linear1(x))
        if self.dropout: x = self.dropout(x)

        # layer 2 (+ dropout)
        x = F.relu(self.linear2(x))
        if self.dropout: x = self.dropout(x)

        # output layer
        x = self.output_layer(x)
        x = torch.sigmoid(x)

        return x
Execute the forward propagation fed with categorical data input

        Parameters
        ----------
        cat_data : list
            categorical features sample

        Returns
        -------
         model : updated model
        
Execute the forward propagation fed with categorical data input
Parameters

cat_data : list
categorical features sample

Returns

model : updated model
Execute the forward propagation fed with categorical data input Parameters cat_data : list categorical features sample Returns model : updated model
def forward(self, cat_data):
        if self.emb_layer_size > 0:
            x = [emb_layer(cat_data[:, i])
                 for i, emb_layer in enumerate(self.emb_layers)]
            x = torch.cat(x, 1)
        x = F.relu(self.linear1(x))
        if self.dropout: x = self.dropout(x)
        x = F.relu(self.linear2(x))
        if self.dropout: x = self.dropout(x)
        x = self.output_layer(x)
        x = torch.sigmoid(x)
        return x
def forward ( self , cat_data ) : if self . emb_layer_size > 0 : x = [ emb_layer ( cat_data [ : , i ] ) for i , emb_layer in enumerate ( self . emb_layers ) ] x = torch . cat ( x , 1 ) x = F . relu ( self . linear1 ( x ) ) if self . dropout : x = self . dropout ( x ) x = F . relu ( self . linear2 ( x ) ) if self . dropout : x = self . dropout ( x ) x = self . output_layer ( x ) x = torch . sigmoid ( x ) return x
Execute the forward propagation fed with categorical data input
Parameters
Execute the forward propagation fed with categorical data input Parameters
"""Execute the forward propagation fed with categorical data input

        Parameters
        ----------
        cat_data : list
            categorical features sample

        Returns
        -------
         model : updated model
        """ # embedding layer # layer 1 (+ dropout) # layer 2 (+ dropout) # output layer
self
cat_data