lux.interestingness package¶
Submodules¶
lux.interestingness.interestingness module¶
-
lux.interestingness.interestingness.
deviation_from_overall
(vis: lux.vis.Vis.Vis, ldf: lux.core.frame.LuxDataFrame, filter_specs: list, msr_attribute: str) → int[source]¶ Difference in bar chart/histogram shape from overall chart Note: this function assumes that the filtered vis.data is operating on the same range as the unfiltered vis.data.
- Parameters
vis (Vis) –
ldf (LuxDataFrame) –
filter_specs (list) – List of filters from the Vis
msr_attribute (str) – The attribute name of the measure value of the chart
- Returns
Score describing how different the vis is from the overall vis
- Return type
int
-
lux.interestingness.interestingness.
interestingness
(vis: lux.vis.Vis.Vis, ldf: lux.core.frame.LuxDataFrame) → int[source]¶ Compute the interestingness score of the vis. The interestingness metric is dependent on the vis type.
- Parameters
vis (Vis) –
ldf (LuxDataFrame) –
- Returns
Interestingness Score
- Return type
int
-
lux.interestingness.interestingness.
monotonicity
(vis: lux.vis.Vis.Vis, attr_specs: list, ignore_identity: bool = True) → int[source]¶ Monotonicity measures there is a monotonic trend in the scatterplot, whether linear or not. This score is computed as the square of the Spearman correlation coefficient, which is the Pearson correlation on the ranks of x and y. See “Graph-Theoretic Scagnostics”, Wilkinson et al 2005: https://research.tableau.com/sites/default/files/Wilkinson_Infovis-05.pdf :param vis: :type vis: Vis :param attr_spec: List of attribute Clause objects :type attr_spec: list :param ignore_identity: Boolean flag to ignore items with the same x and y attribute (score as -1) :type ignore_identity: bool
- Returns
Score describing the strength of monotonic relationship in vis
- Return type
int
-
lux.interestingness.interestingness.
unevenness
(vis: lux.vis.Vis.Vis, ldf: lux.core.frame.LuxDataFrame, measure_lst: list, dimension_lst: list) → int[source]¶ Measure the unevenness of a bar chart vis. If a bar chart is highly uneven across the possible values, then it may be interesting. (e.g., USA produces lots of cars compared to Japan and Europe) Likewise, if a bar chart shows that the measure is the same for any possible values the dimension attribute could take on, then it may not very informative. (e.g., The cars produced across all Origins (Europe, Japan, and USA) has approximately the same average Acceleration.)
- Parameters
vis (Vis) –
ldf (LuxDataFrame) –
measure_lst (list) – List of measures
dimension_lst (list) – List of dimensions
- Returns
Score describing how uneven the bar chart is.
- Return type
int