greenelab / tybalt

Training and evaluating a variational autoencoder for pan-cancer gene expression data
BSD 3-Clause "New" or "Revised" License
162 stars 61 forks source link

Refactoring Tybalt Class - Adding BaseModel and Adage classes #102

Closed gwaybio closed 6 years ago

gwaybio commented 6 years ago

In adding the Adage class - many of the methods were redundant with the Tybalt methods. The BaseModel class stores these common methods and the pull request also updates Tybalt to inherit these methods.

gwaybio commented 6 years ago

Isn't df guaranteed to be a numpy array or pandas dataframe?

While it's likely the input is already a pandas dataframe, it's not guaranteed. A user will interact with the function compress(). This function will take in the input dataframe (df) and compress it into the latent dimensions using the encoder weights.

Adding the extra step here ensures a consistent data-type being consumed by self.encoder.