Skip to content

This repository allows you to check separability of your features using PCA or TSNE dimensionality reduction methods

Notifications You must be signed in to change notification settings

VolodymyrVozniak/feature-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example workflow

Table of Contents


Installation

To install this repo as Python lib just run the following command:

pip install git+https://github.com/VolodymyrVozniak/feature-visualizer

Dependencies

scikit-learn>=1.2.0
pandas>=1.5.2
plotly>=5.7.0

Tutorials

  1. For binary problem check this tutorial
  2. For regression problem check this tutorial
  3. For multiclassification problem check this tutorial

Usage

There is 1 main class for feature visualization:

  • Visualizer - to visualize features for binary, regression and multiclassification problems

Examples

  • Binary problem
from sklearn.datasets import load_breast_cancer
from croatoan_visualizer.visualizer import Visualizer


X, y = load_breast_cancer(return_X_y=True, as_frame=True)
df = X.assign(target=y)

vis = Visualizer(
    df=df.reset_index(),
    id_column="index",
    target_column="target"
)

vis.pca2d()
vis.pca3d()

vis.tsne2d()
vis.tsne3d()

For more details check tutorial

(back to top)

  • Regression problem
from sklearn.datasets import load_diabetes
from croatoan_visualizer.visualizer import Visualizer


X, y = load_diabetes(return_X_y=True, as_frame=True)
df = X.assign(target=y)
df["target"] = pd.qcut(df["target"], 10, labels=False, duplicates='drop')

vis = Visualizer(
    df=df.reset_index(),
    id_column="index",
    target_column="target"
)

vis.pca2d()
vis.pca3d()

vis.tsne2d()
vis.tsne3d()

For more details check tutorial

(back to top)

  • Multiclassification problem
from sklearn.datasets import load_iris
from croatoan_visualizer.visualizer import Visualizer


X, y = load_iris(return_X_y=True, as_frame=True)
df = X.assign(target=y)

vis = Visualizer(
    df=df.reset_index(),
    id_column="index",
    target_column="target"
)

vis.pca2d()
vis.pca3d()

vis.tsne2d()
vis.tsne3d()

For more details check tutorial

(back to top)

About

This repository allows you to check separability of your features using PCA or TSNE dimensionality reduction methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages