Plots

This notebook presents some example of possible plots you can make using the package.

First, import the package

In [1]:
import dvb.datascience as ds
C:\ProgramData\Anaconda3\lib\site-packages\deap\tools\_hypervolume\pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow.
  "module. Expect this to be very slow.", ImportWarning)
C:\ProgramData\Anaconda3\lib\importlib\_bootstrap_external.py:426: ImportWarning: Not importing directory C:\ProgramData\Anaconda3\lib\site-packages\mpl_toolkits: missing __init__
  _warnings.warn(msg.format(portions[0]), ImportWarning)
C:\ProgramData\Anaconda3\lib\importlib\_bootstrap_external.py:426: ImportWarning: Not importing directory c:\programdata\anaconda3\lib\site-packages\mpl_toolkits: missing __init__
  _warnings.warn(msg.format(portions[0]), ImportWarning)

Boxplots

In [2]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('boxplot', ds.eda.BoxPlot(), [("read", "df", "df")])
p.transform(name="boxplot_example", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_3_1.png

Transform boxplot_example

Boxplots Transform boxplot_example

_images/ExamplePlots_3_5.png
_images/ExamplePlots_3_6.png
_images/ExamplePlots_3_7.png
_images/ExamplePlots_3_8.png
_images/ExamplePlots_3_9.png

ECDF plots

In [3]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('ecdf', ds.eda.ECDFPlots(), [("read", "df", "df")])
p.transform(name="ecdf_example", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_5_1.png

Transform ecdf_example

ECDF Plots Transform ecdf_example

_images/ExamplePlots_5_5.png
_images/ExamplePlots_5_6.png
_images/ExamplePlots_5_7.png
_images/ExamplePlots_5_8.png
_images/ExamplePlots_5_9.png

Scatter plots

In [4]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('scatter', ds.eda.ScatterPlots(), [("read", "df", "df")])
p.transform(name="scatter_example", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_7_1.png

Transform scatter_example

Scatterplots Transform scatter_example

_images/ExamplePlots_7_5.png
_images/ExamplePlots_7_6.png
_images/ExamplePlots_7_7.png
_images/ExamplePlots_7_8.png
_images/ExamplePlots_7_9.png
_images/ExamplePlots_7_10.png
_images/ExamplePlots_7_11.png
_images/ExamplePlots_7_12.png
_images/ExamplePlots_7_13.png
_images/ExamplePlots_7_14.png
_images/ExamplePlots_7_15.png
_images/ExamplePlots_7_16.png
_images/ExamplePlots_7_17.png
_images/ExamplePlots_7_18.png
_images/ExamplePlots_7_19.png
_images/ExamplePlots_7_20.png
_images/ExamplePlots_7_21.png
_images/ExamplePlots_7_22.png
_images/ExamplePlots_7_23.png
_images/ExamplePlots_7_24.png

Histogram plots

In [5]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('hist', ds.eda.Hist(), [("read", "df", "df")])
p.transform(name="histogram_example", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_9_1.png

Transform histogram_example

Histogram Transform histogram_example

_images/ExamplePlots_9_5.png
_images/ExamplePlots_9_6.png
_images/ExamplePlots_9_7.png
_images/ExamplePlots_9_8.png
_images/ExamplePlots_9_9.png

Swarm plots

In [6]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('swarm', ds.eda.SwarmPlots(), [("read", "df", "df")])
p.transform(name="swarm_example")
'Drawing diagram using blockdiag'
_images/ExamplePlots_11_1.png

Transform swarm_example

Swarmplots Transform swarm_example

_images/ExamplePlots_11_5.png
_images/ExamplePlots_11_6.png
_images/ExamplePlots_11_7.png
_images/ExamplePlots_11_8.png
_images/ExamplePlots_11_9.png
_images/ExamplePlots_11_10.png
_images/ExamplePlots_11_11.png
_images/ExamplePlots_11_12.png
_images/ExamplePlots_11_13.png
_images/ExamplePlots_11_14.png
_images/ExamplePlots_11_15.png
_images/ExamplePlots_11_16.png
_images/ExamplePlots_11_17.png
_images/ExamplePlots_11_18.png
_images/ExamplePlots_11_19.png
_images/ExamplePlots_11_20.png
_images/ExamplePlots_11_21.png
_images/ExamplePlots_11_22.png
_images/ExamplePlots_11_23.png
_images/ExamplePlots_11_24.png
_images/ExamplePlots_11_25.png
_images/ExamplePlots_11_26.png
_images/ExamplePlots_11_27.png
_images/ExamplePlots_11_28.png
_images/ExamplePlots_11_29.png
_images/ExamplePlots_11_30.png
_images/ExamplePlots_11_31.png
_images/ExamplePlots_11_32.png
_images/ExamplePlots_11_33.png
_images/ExamplePlots_11_34.png
_images/ExamplePlots_11_35.png
_images/ExamplePlots_11_36.png
_images/ExamplePlots_11_37.png
_images/ExamplePlots_11_38.png
_images/ExamplePlots_11_39.png
_images/ExamplePlots_11_40.png
_images/ExamplePlots_11_41.png
_images/ExamplePlots_11_42.png
_images/ExamplePlots_11_43.png
_images/ExamplePlots_11_44.png

Dimensionality reduction plots

In [7]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('dimred', ds.eda.DimensionReductionPlots("target"), [("read", "df", "df")])
p.fit_transform(name="dimensionality_reduction_example", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_13_1.png

Transform dimensionality_reduction_example

_images/ExamplePlots_13_4.png
_images/ExamplePlots_13_5.png
_images/ExamplePlots_13_6.png
_images/ExamplePlots_13_7.png
_images/ExamplePlots_13_8.png
C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\spectral_embedding_.py:234: UserWarning: Graph is not fully connected, spectral embedding may not work as expected.
  warnings.warn("Graph is not fully connected, spectral embedding"
_images/ExamplePlots_13_10.png
C:\ProgramData\Anaconda3\lib\site-packages\sklearn\neighbors\base.py:371: RuntimeWarning: invalid value encountered in sqrt
  result = np.sqrt(dist[sample_range, neigh_ind]), neigh_ind
_images/ExamplePlots_13_12.png

Andrews curves plots

In [8]:
p = ds.Pipeline()
p.addPipe('read', ds.data.SampleData('iris'))
p.addPipe('andrews', ds.eda.AndrewsPlot(column="target"), [("read", "df", "df")])
p.transform(name="andrews", close_plt=True)
'Drawing diagram using blockdiag'
_images/ExamplePlots_15_1.png

Transform andrews

Andrews curves Transform andrews

In [ ]: