cave.analyzer.feature_analysis.feature_analysis module

class cave.analyzer.feature_analysis.feature_analysis.FeatureAnalysis(output_dn: str, scenario, feat_names, feat_importance=None)[source]

Bases: object

From: https://github.com/mlindauer/asapy

Parameters
  • output_dn (str) – output directory name

  • scenario (Scenario) – scenario for features

  • feat_names (list[str]) – names of features as list

  • feat_importance (dict[str] -> float) – maps names to importance

cluster_instances()[source]

Use pca to reduce feature dimensions to 2 and cluster instances using k-means afterwards

correlation_plot(imp=True)[source]

generate correlation plot using spearman correlation coefficient and ward clustering

Returns

path – filename of saved plot

Return type

str

get_box_violin_plots()[source]

for each feature generate a plot with box and violin plot

Returns

Return type

list of tuples of feature name and feature plot file name