Closed miltminz closed 4 years ago
Describe the problem
When giving an input to color_variable parameter in plot_static_mapper, the resulting variable results scaled in the interval [0, 1]
color_variable
plot_static_mapper
To reproduce
import pandas as pd import numpy as np from sklearn.cluster import DBSCAN from gtda.mapper import ( CubicalCover, make_mapper_pipeline, Projection, plot_static_mapper_graph ) # Create df df = pd.DataFrame( {'A': np.random.randint(low=1, high=1000, size=500), 'B': np.random.normal(size=500), 'C': np.random.uniform(size=500)}) # Make mapper pipeline pipe = make_mapper_pipeline( filter_func=Projection(columns=["A", "B"]), cover=CubicalCover(n_intervals=10, overlap_frac=0.3), clusterer=DBSCAN(), verbose=False, n_jobs=1) # Plot static mapper fig = plot_static_mapper_graph(pipe, df, color_by_columns_dropdown=True, color_variable=df['A']) fig.show(config={'scrollZoom': True})
Proposed solution Show the color_variable unscaled as for the other variables of the dataframe (as one can see in the dropdown menu) or add a boolean parameter to let choose between a scaled version or an unscaled one.
Thanks for reporting this @miltminz!
Describe the problem
When giving an input to
color_variable
parameter inplot_static_mapper
, the resulting variable results scaled in the interval [0, 1]To reproduce
Proposed solution Show the
color_variable
unscaled as for the other variables of the dataframe (as one can see in the dropdown menu) or add a boolean parameter to let choose between a scaled version or an unscaled one.