spacekit.analyzer.explore
- class spacekit.analyzer.explore.ImagePreviews(X, labels, name='ImagePreviews', **log_kws)[source]
Bases:
object
Base parent class for rendering and displaying images as plots
- class spacekit.analyzer.explore.SVMPreviews(X, labels=None, names=None, ndims=3, channels=3, w=128, h=128, figsize=(10, 10), **log_kws)[source]
Bases:
ImagePreviews
ImagePreviews subclass for previewing SVM images. Primarily can be used to compare original with augmented versions.
- Parameters:
ImagePlots (class) – spacekit.analyzer.explore.ImagePreviews parent class
Instantiates an SVMPreviews class object.
- Parameters:
X (ndarray) – ndimensional array of image pixel values
labels (ndarray, optional) – target class labels for each image
ndims (int, optional) – number of dimensions (frames) per image, by default 3
channels (int, optional) – channels per image frame (rgb color is 3, gray/bw is 1), by default 3
w (int, optional) – width of images, by default 128
h (int, optional) – height of images, by default 128
- class spacekit.analyzer.explore.DataPlots(df, width=1300, height=700, show=False, save_html=None, name='DataPlots', **log_kws)[source]
Bases:
object
Parent class for drawing exploratory data analysis plots from a dataframe.
- bar_plots(X, Y, feature, y_err=[None, None], width=700, height=500, cmap=['dodgerblue', 'fuchsia'])[source]
- feature_stats_by_target(feature)[source]
Calculates statistical info (mean and standard deviation) for a feature within each target class.
- Parameters:
feature (str) – dataframe column to get statistical calculations on
- Returns:
list of means and list of standard deviations for a feature, subdivided for each target class.
- Return type:
nested lists
- feature_subset()[source]
Create a set of groups from a categorical feature (dataframe column). Used for plotting multiple traces on a figure
- Returns:
self.categories attribute containing key-value pairs: groups of observations (values) for each category (keys)
- Return type:
dictionary
- kde_plots(cols, norm=False, targets=False, hist=True, curve=True, binsize=0.2, width=700, height=500, cmap=['#F66095', '#2BCDC1'])[source]
- make_scatter_figs(xaxis_name, yaxis_name, marker_size=15, cmap=['cyan', 'fuchsia'], categories=None, target=None)[source]