Skip to content

Commit

Permalink
Updated comments chemplot
Browse files Browse the repository at this point in the history
  • Loading branch information
dajtmullaj committed Jun 28, 2021
1 parent a46907f commit 9734049
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions chemplot/chemplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,10 @@ def from_inchi(cls, inchi_list, target=[], target_type=None, sim_type=None):

def pca(self):
"""
Calculates the first 2 PCA components of ECFP fingerprints and plots
the data based on the result.
Calculates the first 2 PCA components of the molecular descriptors.
:returns: The matplotlib axes containing the plot.
:rtype: Axes
:returns: The dataframe containing the PCA components.
:rtype: Dataframe
"""
self.__data = self.__data_scaler()

Expand All @@ -198,17 +197,16 @@ def pca(self):

def tsne(self, perplexity=None, pca=False, random_state=None):
"""
Calculates the first 2 t-SNE components of ECFP fingerprints and plots
the data based on the result.
Calculates the first 2 t-SNE components of the molecular descriptors.
:param perplexity: perplexity value for the t-SNE model
:param pca: indicates if the features must be preprocessed by PCA
:param random_state: random seed that can be passed as a parameter for reproducing the same results
:type perplexity: int
:type pca: boolean
:type random_state: int
:returns: The matplotlib axes containing the plot.
:rtype: Axes
:returns: The dataframe containing the t-SNE components.
:rtype: Dataframe
"""
self.__data = self.__data_scaler()
self.__plot_title = "t-SNE plot"
Expand Down Expand Up @@ -249,17 +247,16 @@ def tsne(self, perplexity=None, pca=False, random_state=None):

def umap(self, n_neighbors=None, min_dist=None, pca=False, random_state=None):
"""
Calculates the first 2 UMAP components of ECFP fingerprints and plots
the data based on the result.
Calculates the first 2 UMAP components of the molecular descriptors.
:param num_neighbors: Number of neighbours used in the UMAP madel.
:param min_dist: Value between 0.0 and 0.99, indicates how close to each other the points can be displayed.
:param random_state: random seed that can be passed as a parameter for reproducing the same results
:type num_neighbors: int
:type min_dist: float
:type random_state: int
:returns: The matplotlib axes containing the plot.
:rtype: Axes
:returns: The dataframe containing the UMAP components.
:rtype: Dataframe
"""
self.__data = self.__data_scaler()

Expand Down Expand Up @@ -407,8 +404,8 @@ def interactive_plot(self, size=700, kind="scatter", remove_outliers=False, is_c
:type remove_outliers: boolean
:type is_colored: boolean
:type filename: string
:returns: The matplotlib axes containing the plot.
:rtype: Axes
:returns: The bokeh figure containing the plot.
:rtype: Figure
"""
if self.__df_2_components is None:
print('Reduce the dimensions of your molecules before creating a plot.')
Expand Down

0 comments on commit 9734049

Please sign in to comment.