plots

silk_ml.plots.plot_corr(data, values=True)[source]

Plots correlation matrix

Parameters
  • data (pd.DataFrame) – Data to compute correlation matrix

  • values (bool or None) – Plot values in the matrix

silk_ml.plots.plot_mainfold(method, data, target_name)[source]

Plots the information using dimensionality reduction

Parameters
  • method (Class.fit_transform) – Mainfold transformation method

  • data (pd.DataFrame) – Dataset to reduce, with two classes

  • target_name (str) – Name of the variable to classify

silk_ml.plots.plot_categorical(X, Y, catego_var, target_name)[source]

Plots the categorical variable, showing the two classes

Parameters
  • X (pd.DataFrame) – Main dataset with the categorical variables

  • Y (pd.Series) – Target variable

  • catego_var (str) – Name of the categorical variable to plot

  • target_name (str) – Name of the target variable to classify

silk_ml.plots.plot_numerical(positive, negative, numeric_var, target_name)[source]

Plots the information using dimentionality reduction

Parameters
  • positive (pd.Series) – Serie with the positive class to plot

  • negative (pd.Series) – Serie with the negative class to plot

  • numeric_var (str) – Name of the numerical variable to plot

  • target_name (str) – Name of the target variable to classify

silk_ml.plots.single_cross_val(classifier, model_name, color, X, Y)[source]

Appends a ROC from the classifier

Parameters
  • classifier – Model to run the classification task to append to the plot

  • model_name (str) – Name of the model for the plot

  • color (str) – Color to plot

  • X (pd.DataFrame) – Main dataset with the variables

  • Y (pd.Series) – Target variable

silk_ml.plots.plot_roc_cross_val(X, Y, models)[source]

Plots all the models with their ROC

Parameters
  • X (pd.DataFrame) – Main dataset with the variables

  • Y (pd.Series) – Target variable

  • models (list(tuple)) – Models to evaluate