{'fraction_non_alphanumeric': 0.032106250902266494, 'fraction_numerical': 0.005456907752273712, 'mean_word_length': 4.751494520092993, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ML-based Visualization Recommendation: Learning to Recommend Visualizations from Data

Visualization recommendation seeks to generate, score, and recommend to users useful visualizations automatically, and are fundamentally important for exploring and gaining insights into a new or existing dataset quickly. In this work, we propose the first end-to-end ML-based visualization recommendation system that takes as input a large corpus of datasets and visualizations, learns a model based on this data. Then, given a new unseen dataset from an arbitrary user, the model automatically generates visualizations for that new dataset, derive scores for the visualizations, and output a list of recommended visualizations to the user ordered by effectiveness. We also describe an evaluation framework to quantitatively evaluate visualization recommendation models learned from a large corpus of visualizations and datasets. Through quantitative experiments, a user study, and qualitative analysis, we show that our end-to-end ML-based system recommends more effective and useful visualizations compared to existing state-of-the-art rule-based systems. Finally, we observed a strong preference by the human experts in our user study towards the visualizations recommended by our ML-based system as opposed to the rule-based system (5.92 from a 7-point Likert scale compared to only 3.45).


INTRODUCTION
Nowadays, visualization has been a convenient vehicle for exploratory data analysis. However, due to the increasing size of real-world datasets, there are sometimes obstacles for practitioners, such as decision makers, data analysts, and researchers, to efficiently and effectively create visualizations. It could be overwhelming to understand an unfamiliar dataset, then select the most proper visualizations out of a myriad of valid visualization choices. Automatic visualization recommendation systems have been developed to assist data analysts in creating visualizations. An end-to-end visualization recommendation system would automatically recommend a list of visualizations ordered by importance, where the visualizations uses the proper visual design to show insights about a selection of attributes 1 in the dataset. A successful system would greatly reduce the amount of time, cost, and effort that human spend in insight discovery process.
Previous end-to-end systems are rule-based, and leverage a small set of manually defined rules crafted by domain experts to score the generated visualizations [16,18]. As such, these rule-based systems have many issues that our proposed approach addresses. First, these systems often have quality issues, limiting the utility and usefulness of the recommended visualizations. Second, when visualizations are scored using a set of manually defined rules/heuristics, many of the visualizations receive the same exact score. This issue arises due to the way scoring is done using the rules, which often simply assigns a positive (or negative) score depending on the rule they abide by or violate, and at the end, all such scores from the small set of rules that actually apply to the visualization are combined to obtain the final score, which results in many visualizations having the same score, and thus, unable to differentiate between the visualizations receiving the same heuristic score. Third, adding additional rules to these systems is tedious and costly in terms of time and effort required. Finally, in contrast to our proposed approach that is completely automatic and data-driven, and able to adapt based on new data, or user-preferences, the existing rule-based systems are not automatic, not data-driven, and hard to iterate or improve as the preferences of users and visualizations change over time.
While there are only a few such end-to-end visualization recommendation systems, all of them are fundamentally rule-based [16,18]. Previous work such as VizML [3] have used machine learning to predict the type of a chart (e.g., bar, scatter) instead of complete visualization, whereas other work such as Draco [9] used a model to infer weights for a set of manually defined rules. There is no such work that uses machine learning for end-to-end visualization recommendation 2 in a completely automated and data-driven fashion. This paper fills this gap by proposing the first completely automated and data-driven approach for end-to-end ML-based visualization recommendation.
In this work, we propose the first end-to-end deep learning-based visualization recommendation system that automatically learns to generate effective and useful visualizations by leveraging previous user-generated visualizations as training. Suppose a user selects or uploads a new dataset of interest, we can then use the learned model M to automatically score and recommend to the user the top-k most relevant visualizations for the users' dataset. The approach is completely automatic, fully data-driven, flexible, and effective. It is able to learn a general recommendation model M from a large corpus of datasets and their visualizations, which can then be applied for scoring and recommending visualizations for any other arbitrary dataset.
We first formalize the ML-based visualization recommendation problem and describe a general learning framework for it. To learn a visualization recommendation model from a large corpus of training visualizations, we decompose a visualization into the subset of attributes selected from one of the datasets in the training corpus and a visualization configuration that describes the design choices and types of attributes required. In particular, the proposed notion of a visualization configuration represents a data-independent abstraction where the data attributes used in the design choices are replaced by their general type. Both of these provide us with everything required to characterize a visualization. Next, we propose a wide-and-deep learning model for visualization recommendation based on this problem formulation that learns from the attribute selections and their visualization configurations. In the wide component, we learn from sparse attribute meta-features along with sparse visualization configuration features whereas in the deep component we learn from dense representations of the meta-features of the attributes and visualization configurations. Scores from both these components and then combined to obtain the final score of a complete visualization.
Many new evaluation issues and challenges arise when quantitatively evaluating the ranking of visualizations from an end-toend trained ML-based visualization recommendation model. For instance, since visualizations held-out for evaluation are from different datasets, and the space of possible visualizations to recommend differs for each dataset (as shown in Sec. 3), then standard ranking evaluation metrics fail since the size of the visualization space changes depending on the data. Consider two datasets, one with a large number of attributes and another with only two such attributes, then the ML-based visualization ranking problem in the dataset with a few attributes is significantly easier than the one with a large number of attributes. To address these challenges, we propose a general framework for evaluation of end-to-end ML-based visualization recommendation system. This is the first evaluation framework for ML-based visualization recommender systems, and as such, we believe it will be useful for making further progress in developing better and more accurate end-to-end visualization recommendation systems that leverage machine learning. The evaluation framework serves as a foundation for quantitative evaluation of future ML-based vis. rec. systems that build upon our work.
Extensive experiments evaluating the effectiveness of our approach are provided in the paper. Overall, the results demonstrate the effectiveness and utility of the proposed end-to-end ML-based visualization recommendation system. First, we conduct extensive experiments using a large-scale public corpus of datasets and usergenerated visualizations. Our empirical results demonstrate the effectiveness of our approach as it is able to recover the held-out ground-truth visualizations among the large exponential space of lower quality/irrelevant visualizations. We also conduct a user study to investigate the quality of our wide-and-deep learningbased end-to-end visualization recommendation system compared to the state-of-the-art rule-based system. In nearly all cases, the visualizations generated and recommended by our end-to-end MLbased system are at least as good, and most often, better than those recommended by the rule-based system. Furthermore, we demonstrate the effectiveness of our approach through a number of case studies that clearly show a variety of important advantages of our approach compared to the existing rule-based system.

Main Contributions
A summary of the main contributions of this work are as follows: • First ML-based Visualization Recommender: In this work, we propose the first end-to-end ML-based visualization recommendation system that automatically learns a model from a large set of N training datasets and the corresponding N sets of usergenerated visualizations. The learned model not only captures simple visual rules, but is able to learn complex high-dimensional latent characteristics behind effective user-generated visualizations from the training corpus along with the latent characteristics of the data (subset of attributes) that are associated with the visualizations. Given a new (unseen) dataset of interest, our learned model can then generate, score, and automatically recommend the top most insightful and effective visualizations for this new dataset. 3 • Problem Formulation: We carefully formalize the problem of learning a visualization recommendation model from training data consisting of N datasets and N sets of visualizations. 4 To the best of our knowledge, this is the first formal presentation of the ML-based vis. rec. problem. • Evaluation Framework: We describe a general framework for evaluation of end-to-end ML-based visualization recommendation systems using a held-out set of known ground-truth visualizations from a set of new held-out datasets that were not used to train the model. The evaluation framework serves as a foundation for quantitative evaluation of future ML-based vis. rec. systems that build upon our work. • Effectiveness: We demonstrate the effectiveness of our approach through a comprehensive set of experiments including quantitative evaluation of the visualization ranking (Sec. 6.1), user study comparing our ML-based system to a rule-based system (Sec. 6.2), and a qualitative case study (Sec. 6.3). Overall, the results demonstrate the effectiveness and utility of the proposed end-to-end ML-based visualization recommendation system.

RELATED WORK
Related work can be categorized as follows: (i) rule-based systems that recommend entire visualizations, and (ii) approaches designed for simpler, but fundamentally different sub-tasks such as predicting the chart type of a visualization. Despite that they do not solve the end-to-end visualization recommendation problem, we include them since some of them use machine learning to solve a fundamentally different problem.
Systems that recommend entire visualizations to users have existed since 1980s [5]. Early systems include Automatic Presentation Tool (APT) [7] that generates graphical presentations from data, SAGE [11] that uses a search algorithm to select and compose graphics from data, and ShowMe [8]. These systems can be attributed as rule-based solutions. For example, Automatic Presentation Tool (APT) [7] uses logical statements of visualization design knowledge that come from human perceptual experiments. SAGE [11] generates visualizations based on partial specifications. ShowMe [8] offers users with a set of defaults to filter valid visualization types based on characteristics of selected data. Mixed-initiative systems such as Voyager [13,16,18], VizDeck [10], and DIVE [4] incorporate visual encoding rules to assist user data exploration data exploration. Rule-based systems have many limitations that our work addresses. For instance, rule-based recommendation systems rely entirely on a large set of manually defined rules from domain experts, which are costly in terms of the manual labor required, and may miss many important rules that would provide users with significantly more effective visualizations for their dataset of interest. Such approaches are clearly not data-driven and difficult to adapt as one would need to routinely incorporate new rules in a manual fashion, which is costly in terms of the time and effort required by domain experts to maintain such systems. Further, rules for such systems need to be manually defined with respect to the domain of interest. For instance, visualizations for data scientists, or scientific domains are likely different from visualizations that journalists prefer or those that would work well for elderly populations. Therefore, new rule sets would likely be required to effectively recommend visualizations for each group. These systems also require tailored experiments with human users to validate the manually defined rules. In comparison, our work learns a model M to recommend entire visualizations directly from a large corpus of training data, in a fully automatic data-driven fashion. Furthermore, we also propose an evaluation framework to validate the effectiveness of ML-based visualization recommendation models.
On the other hand, there are systems that tackle sub-tasks in visualization recommendation. Each of those systems has a distinct focus in some end goals such as improving expressiveness, improving perceptual effectiveness, matching user task types, etc. The sub-tasks can generally be divided two categories [5,17]: whether the solution focuses on recommending data (what data to visualize), such as Discovery-driven Data Cubes [12], Scagnostics [14], AutoVis [15], and MuVE [1]) or recommending encoding (how to design and visually encode the data), such as APT [7], ShowMe [8], and Draco-learn [9]). While some of those are ML-based, none recommends entire visualizations, and thus does not solve the visualization recommendation problem that lies at the heart of our work. For example, VizML [3] used machine learning to predict the type of a chart (e.g., bar,scatter, etc.) instead of complete visualization. Another work Draco [9] used a model to infer weights for a set of manually defined rules. VisPilot [6] recommended different drill-down data subsets from datasets. Instead of solving simple sub tasks such as predicting the chart type of a visualization, we focus on the end-to-end visualization recommendation task where the goal is to automatically recommend users the top-k most effective visualizations as the output, given an input dataset from the user. This paper fills the gap by proposing the first end-to-end MLbased visualization recommendation approach that is completely automatic and data-driven. It tackles both choosing data from datasets, and recommending encoding for selected data, therefore achieving the goal of recommending complete visualizations from arbitrary datasets using an automatically learned model M from a large corpus of training data.

ML-BASED PROBLEM FORMULATION
In this section, we formally introduce the ML-based visualization recommendation problem, and present a generic learning framework for it, which includes two key parts: • Model Training (Sec. 3.1): Given a training visualization corpus and the corresponding N sets of visualizations {V i } N i=1 , 5 we first learn a model M from the training corpus that best captures and scores effective visualizations highly and assigns low scores to bad/ineffective visualizations. 6 • Recommending Visualizations (Sec. 3.2): Given a new (unseen) dataset X test of interest, our learned visualization recommendation model ℳ is used to generate, score, and automatically recommend the top most insightful and effective visualizations for this new dataset. 7 Notice that the fundamental difference between the rule-based visualization recommendation problem and our proposed ML-based visualization recommendation problem is that ML-based models are automatically learned from data whereas rule-based approaches are manually defined (and are not true models).
The visualization recommendation training data can be general, as it can consist of a set of datasets and a set of relevant visualizations from each dataset collected from a variety of different sources. 8 For instance, the corpus may consist of datasets and visualizations collected from websites (e.g., by crawling the web) or from a visual analytic platform such as Tableau and Power BI where users upload datasets and created corresponding visualizations. Depending on the corpus, the definition of a visualization to be effective is also flexible and that reflects how users from that corpus source perceive as effective visualizations. For example, a visualization in a data journalism website emphasizes attractiveness while a visualization in scientific papers need to be straightforward and scientifically meaningful. We use the corpus to train the ML-based vis. rec. model. Each visualization uses a subset of attributes from a dataset X i , which we call the subset as the attribute combination. We now define the space of attribute i ,. . .} for an arbitrary dataset X i , which can be either a training dataset X i ∈ or a new test dataset X test ← X i .

Definition 1 (Space of Attribute Combinations).
Given an arbitrary dataset matrix X i , let i denote the space of attribute combinations of X i defined as where Σ is an attribute combination generation function and every X (k ) i ∈ i is a different subset (combination) of attributes from X i , and thus X (k ) i may consist of one, two, or more attributes from X i .
When the dataset X i is a new test dataset X i , we use X test to denote the new unseen dataset and the space of attribute combinations from the new test dataset is test .
Let |X i | and |X j | denote the number of attributes (columns) of two arbitrary datasets |X i | and |X j |, respectively.
The proof of Property 1 is straightforward, but Property 1 will be important later when characterizing the space of possible visualizations from a given dataset.

Definition 2 (Space of Visualization Configurations).
Let denote the space of all visualization configurations such that a visualization configuration C ik ∈ defines an abstraction of a visualization where for each visual design choice (x, y, marker-type, color, size, etc.) that maps to an attribute in X i , we replace it with its type. Therefore visualization configurations are essentially visualizations without any attribute (data).

Property 2.
Every visualization configuration C ik ∈ is independent of any data matrix X (by Definition 2).
The above implies that C ik ∈ can potentially arise from any arbitrary dataset and is therefore not tied to any specific dataset since visualization configurations are general abstractions where the data bindings have been replaced with their general type (e.g., if x/y in some visualization mapped to an attribute in X i , then it is replaced by the type of that attribute, that is, ordinal, quantitative, categorical, etc.
A visualization configuration and the attributes selected 9 is everything necessary to generate a visualization. See Figure 1 for an example. The size of the space of visualization configurations is large since visualization configurations come from all possible combinations of design choices and their values such as, • mark/chart: bar, scatter, ...  Recall that Σ is an attribute combination generation function defined as Σ : X i → i where i is the space of all combinations of attributes from dataset X i , i.e., all subsets of one or more 9 Selected attributes is the same as the combination of attributes defined in Eq. 2.
attributes from X i . For instance, suppose we have a dataset with three attributes X = [ x 1 x 2 x 3 ], then Σ(X) = is: Definition 3 (Space of Visualizations of X i ). Given an arbitrary dataset matrix X i , we define V ⋆ i as the space of all possible visualizations that can be generated from X i . More formally, the space of visualizations V ⋆ i is defined with respect to a dataset X i and the space of visualization configurations , . .} is the set of all possible attribute/attribute combinations of X i (Def. 1). More succinctly, ξ : In other words, given an attribute combination X (k ) i ∈ i consisting of a subset of attributes from dataset X i and a visualization configuration C ∈ , then ξ (X This is straightforward to see and implies that when is fixed, the space of visualizations is entirely dependent on the dataset, and for any two datasets X i and X j without any shared attributes/overlap X i X j , then the set of possible visualizations that can be generated from either dataset are entirely disjoint from one another, Definition 4 (Positive Visualizations of X i ). Given an arbitrary dataset matrix X i , we define V i as the set of positive visualizations (user-generated, observed) from dataset X i . Therefore, Definition 5 (Negative Visualizations of X i ). Let V ⋆ i denote the space of all visualizations that arise from the ith dataset X i such that the user-generated (positive) visualizations V i satisfies This follows from Note. The space of negative visualizations between different datasets is also obviously completely disjoint.
Given V ⋆ i as the space of all visualizations of the ith dataset X i where it consists of positive and negative visualizations, denoted The negative visualization space is large and therefore sampling of this vast space is required to ensure fast and computationally tractable inference. In Eq. 9, we sample the negative visualization space of dataset X i uniformly at random with replacement. Recall that any form of estimation is difficult since the size of the space of visualizations V ⋆ i , including positive visualizations V i and negative visualizations V − i depends entirely on the number of attributes/attributes in the dataset X i (and their types, such as real-valued, ordinal, categorical, etc.) used in their generation, and thus the size of the different visualization spaces varies based on it. Sampling negative visualizations is important for both training and testing.

Learning Vis. Rec. Model
Now we formulate the problem of training a visualization recommendation model ℳ from a large training corpus of datasets and sets of visualizations associated to each dataset.

Definition 7 (Learning Vis. Recommendation Model).
for the N datasets. Given the set of training datasets and relevant vi- , the goal is to learn a visualization recommendation model M by optimizing the following general objective function, where L is the loss function, i ⊆ X i is the combination of attributes used in the visualization. In Eq. 11, Ψ and f are general functions over the attribute combination X For computational tractability, we replace V − i in Eq. 11 with the set V − i of sampled negative visualizations for the ith dataset matrix X i . As an aside, we provide a general formulation of the training of the model M in Definition 7. Intuitively, the learned model M from Eq. 11 can then be used to score the effectiveness of any arbitrary visualization. Most importantly, it even enables us to score visualizations generated from entirely new datasets not used for training M, i.e., a dataset X test outside the training corpus Hence, given an arbitrary visualization, M outputs a score describing the effectiveness or importance of the visualization. The ML-based model learning formulation for visualization recommendation shown in Eq. 11 can naturally be used to recover many different types of visualization recommendation models.

Definition 8 (Meta-Feature Function).
Let Ψ denote the meta-feature learning function that maps an attribute x of any dimensionality (from any dataset X) to a shared K-dimensional metafeature space that captures the important characteristics of x. More formally, Ψ : x → R K (13) where x can be of an arbitrary attribute type (e.g., real-valued, integral, nominal, ordinal, etc) and size, e.g., two attributes x ∈ X and y ∈ Y from two different datasets are almost surely of different dimensionality (# rows). Further, given M attributes of a dataset Hence, from Eq. 13 Ψ(x) ∈ R K and Ψ(X) ∈ R K ×M .

Recommending Visualizations via Model
Once we have learned the visualization recommendation model M (Eq. 11) using the training visualization corpus , then we can use M to score and recommend a list of the top most important and insightful visualizations generated from an arbitrary new dataset X test .

Definition 9 (ml-based Visualization Recommendation).
Let M be the trained visualization recommender model from Def. 7.
test , . . .} is the space of attribute combinations from X test and is the space of visualization configuration. Given the set of generated visualizations V test = {V 1 , V 2 , . . . , V Q }, we derive a ranking of the visualizations V test from X test as follows: where Q = |V test |. Hence, given an arbitrary visualization, M outputs a score describing the effectiveness or importance of the visualization.
Informally, given a new dataset X test to recommend visualizations for via the trained model M (Eq. 11), then M(ξ (Σ(X test ), )) where is the space of relevant visualization configurations. Notice that M(V test ) = M(ξ (Σ(X test ), )). For tractability, we replace the set of possible visualization configurations with the set of relevant configurations r = R( ) where R is a function consisting of visual rules that enables us to discard configurations that are invalid with respect to the manually defined rules. The list of rules from Voyager and other rule-based systems can read from a file similar to stopwords in information retrieval. Hence, r ⊆ .
Given a new dataset of interest, the space of visualizations to search over is completely different from the space of visualizations that arises from any other (non-identical) dataset. More formally, let V ⋆ i and V ⋆ j denote the space of all possible visualizations that arise from X i and X j held-out datasets, then ∀r, s, j holds. Further, this obviously holds ∀i, j ∈ [T ] as well. Clearly, the above holds, since a visualization consists of a subset of attributes (data) and design choices. The above demonstrates the difficulty of the visualization recommendation learning problem, in the sense that, the model must recommend relevant visualizations from a space of visualizations never seen by the learning algorithm. Moreover, we can even show a weaker property regarding the cardinality of the space of visualizations that arise from different held-out datasets, Claim 1. Let V ⋆ i and V ⋆ j denote the space of all possible visualizations that arise from X i and X j held-out datasets, then with high probability |V ⋆ i | |V ⋆ j | almost surely holds ∀i, j ∈ [T ].

WIDE & DEEP VISUALIZATION RECOMMENDATION
Following the general ML-based visualization recommendation formulation in Section 3, we now describe our proposed wide-anddeep visualization recommendation approach. Table 1 provides a summary of the key notation.

Wide-and-Deep Network Overview
We now give a brief overview of the wide-and-deep learning-based visualization recommendation approach. Figure 2 shows the wideand-deep network architecture.
• Encoding Visualizations and Their Attributes (Sec. 4.2): The network first encodes the visualization V ik from one arbitrary dataset X i ∈ by its attribute combination X Given an entirely new unseen dataset X test , we then describe the inference procedure that uses M to score and recommend visualizations for the new dataset X test of interest.
The scoreŶ ik is given bŷ

Encoding the Input
Every visualization can naturally be decomposed into the subset of attributes from the dataset X i and the visualization configuration, i are specific to an arbitrary dataset X i , the first step is to encode the input X (k ) i and C ik into features in some shared space for the network.

Encode attributes into meta-features. Attributes from datasets in the training corpus
are naturally from different domains and have fundamentally different characteristics such as their types, sizes, meanings, and so on. This makes it fundamentally important to encode every attribute from any dataset in the corpus in a shared K-dimensional space where we can naturally characterize similarity between the attributes. For this purpose, we leverage the meta-feature function Ψ from Def. 8. Since Ψ represents an attribute x in a shared K-dimensional space, we apply Ψ ∀x ∈ X i .
We propose the meta-feature learning framework, as an instance of Ψ for the network. The framework has several components including nested meta-feature functions, attribute representation functions (where each of which can be used with the set of nested meta-feature functions), and so on. The framework is summarized in Table 2. More formally, first we compute the meta-feature functions over different representations of the data as follows: where ψ (x) is the meta-features from x directly, ψ (p(x)) are the meta-features from the probability distribution of x, and so on. Next, given a partitioning (or clustering, binning) function Π that divides a vector x (or p(x), д(x)) of values into k partitions, we can 11 X i can be either a new unseen dataset X test , or a dataset from the training corpus an arbitrary dataset that has many attributes x an attribute vector from an arbitrary dataset concatenated dense features derive meta-features for each partition as follows: ψ (Π 1 (p(x))), . . . ,ψ (Π k (p(x))), (20) ψ (Π 1 (д(x))), . . . ,ψ (Π k (д(x))) In the above, we use Π k to denote the kth partition of values from the partitioning function Π. In this work, leverage multiple partitioning functions, and each can be used in a similar fashion as shown in Eq. 19. All the meta-features derived from Eq. 18 and Eq. 19 are then concatenated into a single vector of meta-features describing the characteristics of the attribute x. More formally, the meta-feature function Ψ : x → R K is defined as follows: ψ (Π 1 (p(x))),...,ψ (Π k (p(x))),...,ψ (Π 1 (д(x))),...,ψ (Π k (д(x))) As an example, given an attribute vector x from any arbitrary dataset X, the first step is to derive many different data representations of x, e.g., using different normalization/scaling functions, probability distribution, log binning of x, etc. Then, we partition the values of each of the different representations of x previously computed in Step 1 of Table 2. Now, for every different data representation of x from Step 1 and every different partition of values from Step 2, we apply meta-feature functions from Step 3 (see Table 3) over each one to get meta-features of x. Finally, we concatenate the meta-features from Step 3. The resulting Ψ(x) is a dense vector. We denote it as d x -the meta-features, a.k.a. the dense feature of the attribute x. Without loss generality, we also normalize each meta-feature in d x , by min-max scaling to scale each meta-feature value in d x to be between 0 and 1. Our approach is agnostic to the precise meta-feature functions used, and is flexible to use with any alternative set of meta-feature functions.
We obtain Ψ(x) as the meta-features for each attribute x. An attribute combination X (k ) i usually has more than one attributes, whose meta-features need to be combined to get an overall dense feature d x . We concatenate all of meta-features d x i j from each attribute x i j ∈ X (k ) i to get the overall dense feature d x , written as See Figure 2 for an example. It has two attributes selected, i.e. X i , C ik ), this configuration is independent from any dataset or visualization (Property 2). It is possible to learn embeddings for all configurations in and use the embeddings to encode C ik . Function). Let E denote a configuration embedding function that maps a configuration C ik to a shared K-dimensional embedding space such that the Table 3: Summary of meta-feature functions for attribute. The functions will be called from the learning framework in Table 2. Let x denote an arbitrary attribute vector and π (x) is the sorted vector of x.

Definition 10 (Configuration Embedding
Variance-to-mean ratio σ 2 x/µx Signal-to-noise ratio (SNR) We denote H (C ik ) as the dense feature d c of the configuration C ik , i.e. d c = H (C ik ). H works as follows: Suppose we are scoring visualizations for an arbitrary dataset, one visualization is V ik = (X (k ) i , C ik ). We first abstract the configuration C ik from V ik , and look up the positional identity of C ik in . Then, we one-hot encode the identity C ik and apply configuration embedding function H to the one-hot encoding. This gives a k-dimensional dense feature d c , written as Note that H is learnable with the model M.

Complement Dense Features with Sparse
Features. Up so far, both the configuration embedding vector d c and attribute metafeatures d x are dense features (vectors in real-value). On the other hand, our approach wants to capture some frequent feature patterns about the attribute combination X (k ) i and the configuration C ik that commonly lead to effective visualizations. The frequent feature patterns can be best expressed through sparse features, i.e. whether this visualization has the feature(s) X or not. For example, scatterplot is generally more effective to visualize attributes that have many rows, than line charts and bar charts. If a visualization V i , C ik ) has sparse features indicating that the number of rows in one attribute of X (k ) i is larger than 50 and the configuration C ik is about scatterplot, our model M should be able to assign a high score to this visualization and consider it as effective. Therefore, we create the set of sparse features s x and s c to complement the dense features d x and d c , which will also be used as the input to M.
There are many choices to create sparse features s x and s c . For example, one simple option to get the sparse feature s x for attribute combination X (k) i is to bin-bucket the dense features d x . Recall that the dense feature (i.e. meta-features) d x is a vector normalized in each dimension. We could bin-bucket each dimension of the normalized meta-features d x into a fixed number of n-bins within the range of [0, 1]. Each bin has an equal width of 1 n . Another option to get the sparse features from d x is to first cluster each dimension from d x of all seen visualizations, then one-hot encode the cluster identity for the value in each dimension of the dense feature d x . Our wide-and-deep network is agnostic to the actual option and the precise meta-features that are being used in d x .
To get the sparse feature s c from a configuration embedding vector d c , one option is to use the original one-hot sparse vector as its sparse feature. Another option is to one-hot encode each pair of field and value that appears in the configuration C ik . For example, we could assign a value of 1 to one dimension of s c for a configuration C ik , if the configuration C ik satisfies a specific pair of field and value, such as "marker.symbol = circle. "

The Wide Model
The Wide model is a linear model over the set of sparse features s c and s x . The goal of leveraging sparse features is to capture any occurrence of feature-pairs that commonly lead to effective visualizations in the training corpus. As an example, if the corpus has many visualizations that use scatterplot with default point size and point color to visualize two quantitative attributes with more than 50 rows, 12 a fully-trained model M should be able to pick up this pattern: when a new dataset comes in, which has over 50 rows and at least two quantitative attributes in similar characteristics, M would be able to generate, score, and recommend a similar-style scatterplot that visualizes over a subset of two quantitative attributes.
First, we concatenate s c and s x into one single sparse vector s where ϕ 1 is a concatenation operator.
Next, we augment s with cross-product features from s, denoted as s ′ . Cross-product features s ′ captures co-occurrences of some specific features in the original s. Formally, it is calculated as the concatenation of values from a set of cross-product transformation functions.
s ′ = {. . . , ϕ k (s), . . .} (28) where ϕ k (s) is the k-th cross-product transformation function. The operator ϕ k (·) checks whether a few selected dimensions in s are all 1, written as where t ki is a boolean value indicating whether or not the k-th cross-product transformation function ϕ k (s) "cares" about the i-th feature of s. For example, suppose ϕ k (·) checks whether a visualization satisfies (1) the entropy of its first attribute is in the range of [0.2, 0.4) and (2) its configuration is configuration no.3. The crossproduct feature ϕ k (s) is 1 if and only s has feature dimensions of entropy-1st-var-bucket=2 and config-bucket=3 both as 1.
Finally, the sparse feature s and the cross-product transformed feature s ′ get concatenated using the concatenation operator ϕ 1 , then go through a linear transformation, to get the wide score. More formally, the wide score is where W T s and b denote the weight matrix and the bias vector for the wide model. Θ s = {W T s , b} denotes the entire set of parameters in the wide model. The wide score is a numeric value, i.e. satisfies f wide (s c , s x |Θ s ) ∈ R.

The Deep Model
The Deep model uses dense features and non-linear transformations to generalize to feature pairs that do not frequently appear in the training set yet may lead to effective visualizations with a good rationale. Suppose the same corpus = {X i , V i } N i=1 as in Sec. 4.3 not only has the frequently-observed pattern about scatterplots, but also a few scatterplots with half point size that visualize two quantitative attributes with hundreds of rows, a fully-trained model M should be able to generalize from this. When a new dataset with thousands of rows and at least two quantitative attributes comes in, M would be able to generate, score, and recommend a scatterplot that preferably has smaller point size to visualize a subset of two quantitative attributes.
The concatenated vector d are then fed into a total of L hidden layers (standard MLP layers). The initial layer starts with d. At the kth layer, an intermediate vector d k−1 from the previous layer (k − 1) go through non-linear transformations with the model parameter W dk and the activation function a k −1 . The activation function a k −1 could either be the rectified linear unit (ReLU) or the sigmoid function. This design offers greater flexibility to model feature interaction. The last layer gives the output from the deep model, as the deep score f deep (d c , d x |Θ d ). Formally, it can be written as

Training the Network
Previous two sections describe the set of model parameters Θ that constitutes the wide-and-deep network and that goes into Eq. 17 In this section, we elaborate upon Def. 7 to show how to optimize the wide-and-deep network parameters Θ with a probabilistic approach [2].
The training corpus Each dataset X i has a set of positive visualizations V i , which we also complement a sampled set of negative visualizationŝ V − i (as in Def. 6). The set of training visualizations for X i is then In other words, during training, each visualization V ik comes from an arbitrary dataset X i and has a binary ground-truth label Y ik ∈ {0, 1}. A label of 1 indicates a positive visualization, i.e. V ik ∈V i . Hence, the visualization is generated by the user. Label 0 indicates a negative (non-relevant) visualization, i.e. V ik ∈V − i . Non-relevant visualizations are sampled from the space of all visualizations that belong to the dataset X i . Def. 6 and Section 5.3 discuss more details about how we sample non-relevant visualizations to support training.
Our goal is to have the model scoreŶ ik ∈ [0, 1] of each training visualization V ik as close as possible to its ground-truth label Y ik . We train the model by optimizing the likelihood of model scores rounding up to match the ground-truth labels, for all visualizations throughout the entire corpus consisting of N datasets {X i } N i=1 . Eq. 33 shows the calculation of the likelihood: for each dataset X i i consists of the configuration C ik ∈ and the subset of attributes X The closer thatŶ ik is to the ground-truth label Y ik , the better. Taking the negative log of the likelihood in Eq. 33 and summing over all datasets give us the loss L.
(34) We minimize the objective function through stochastic gradient descent (SGD) to update the model parameters Θ in M.

Inference
Given the trained wide-and-deep visualization recommendation model M from Section 4.5, we now describe the inference procedure for scoring and recommending visualizations from an arbitrary new dataset of interest. Recall from Section 3 that the set of visualizations to recommend depends entirely on the dataset of interest, that is, the set of visualizations for one dataset is guaranteed to be completely disjoint for another dataset. As illustrated in the lower part of where f wide (s c , s x |Θ s ) is the wide score and f deep (d c , d x |Θ d ) is the deep score. w wide and w deep are two real values, i.e. w wide ∈ R and w deep ∈ R. The entire set of parameters Θ, including Θ s , Θ d , w wide and w deep are learned through backward propagation as described in Section 4.5.
We repeat the above to score all possible visualizations in V ⋆ test , and then recommend top visualizations based on the prediction scores. This process is consistent with Def. 9. We expand more details about the evaluation of this process in Section 5.4.

EVALUATION FRAMEWORK
One of the contributions in this work is the proposed evaluation framework for end-to-end ML-based visualization recommendation systems. This framework serves as a fundamental basis for systematically evaluating ML-based visualization recommender systems, including our own model and those that arise in the future. We first summarize the differences that make it infeasible to use traditional techniques for evaluation of ML-based visualization recommendation systems, which motivates the need for such a framework, and then discuss each component of the evaluation framework.

Motivation
Since the visualization recommendation problem is fundamentally different from the traditional recommendation problem (i.e., recommending items to users), we are unable to leverage the same commonly used evaluation techniques. We summarize some of these fundamental differences below, which motivate the need for the proposed evaluation framework.
• Visualization Complexity (Sec. 5.2): While traditional recommender systems have a simple object to recommend such as an item, ML-based visualization recommendation models must learn from a far more complex visualization object consisting of a subset of attributes from an arbitrary dataset, and a set of design choices.

Corpus: Datasets and Visualizations
In most traditional recommender systems that recommend items to users, there is a single shared set of items (e.g., movies on Netflix, products on Amazon, etc). However, in visualization recommendation, there is not a shared set of visualizations to recommend to users, as it depends entirely on the dataset of interest. Hence, if we have N datasets, then there are N completely disjoint sets of visualizations that can be recommended. However, in visualization recommendation, we begin with a general corpus consisting of datasets and relevant visualizations. Each dataset has a set of relevant visualizations that are exclusive to the dataset. Moreover, each visualization only uses a small subset of attributes from the dataset. There can be attributes in the dataset that are never used in a visualization. While the goal of traditional recommender systems is typically to recommend items (from a specific dataset) to users, in visualization recommendation, the goal is to learn a model to score and ultimately recommend visualizations that are generated for a specific unseen dataset. Therefore, the model learned in visualization recommender systems must be able to generalize for use in scoring visualizations generated from any unseen dataset in the future.
Every new dataset gives rise to an exponential amount of possible visualizations. This makes this recommendation problem extremely challenging. In addition to the exponential space of visualizations that one must search for just a single dataset, the visualization search space is also completely disjoint from the search space of another arbitrary dataset as shown in Lemma 1. Therefore, given an available corpus that consist of datasets and relevant visualizations, our framework first splits the corpus by datasets into various sets required for training, validation, and testing. For datasets in the testing set, Section 5.5 discusses how to apply evaluation metrics to a number of ranked lists, where each list has recommended visualizations that are tied to one test dataset.
To learn a ML-based visualization recommendation model within our framework, we can use any available corpus as long as it has a set of datasets and relevant user-created visualizations that use a subset of attributes from the datasets. Notably, the corpus can be visualizations and datasets from a variety of different sources, e.g., they can be visualizations and datasets collected from the web or even a visual analytics platform such as Tableau.

Training from the Corpus
The next step is to create a training set from the corpus of datasets and visualizations. For example, the wide-and-deep network approach addresses the issue of the dynamic space of visualizations by creating visualizations that come from a combination of attributes and a visualization configuration. However, the framework would generalize to other approaches of visualization recommendation that may have a different way extracting a visualization instance. Given a single dataset from the corpus that has a set of relevant visualizations, we construct positive (relevant) visualizations as in Figure 1, and complement with "negative" (or non-relevant) visualizations.
While it is intuitive to think that non-relevant visualizations in our problem are visualizations that users do not create, such set of non-relevant instances does not naturally exist in the corpus. The corpus only contains visualizations that users do create. Our framework needs to compute non-relevant visualizations on-the-fly from the dynamic space of visualizations that depends on each dataset. In other words, given a different dataset, there is a different set of non-relevant visualizations since the underlying data in the actual visualizations is different. Our framework follows Def. 5 to achieve that. Moreover, the space of non-relevant visualizations is typically exponential with a size that easily exceeds several thousands. It is difficult to train with a large number of non-relevant visualizations along with a much smaller set of relevant visualizations. Our framework follows Def. 6 to uniformly sample a fixed number of non-relevant visualizations from the same dataset. Our framework also welcomes other ways of sampling non-relevant visualizations, e.g. drawing non-uniform samples from the pool of non-relevant visualizations (e.g. based on the popularity of the configuration in a visualization, or biased to sample most-similar or least-similar non-relevant visualizations to relevant visualizations).

Testing and Deployment
Now, we discuss how a visualization recommendation model M learned from the training set of relevant and non-relevant visualizations can be used for testing and deployment. Given a new or selected held-out dataset from the corpus, the model outputs a list of recommended visualizations for the specific dataset. Different from traditional recommender systems where the space of items are shared for all users (including new users), our framework generates a ranking of visualizations to recommend with on-the-fly, which are dependent to the dataset. As the entire space of visualizations for each dataset can be large, negative sampling of non-relevant visualizations allow us to test on more datasets efficiently and derive evaluation metrics without losing statistical rigor. We describe the evaluation metrics for our visualization recommendation problem in Sec. 5.5. When the model gets deployed and tested on a new dataset, the recommended visualizations are selected from the entire space of visualizations for that dataset (as in Def. 3).

Evaluation Metrics
Evaluating the quality of the ranking of visualizations (recommendations) given by the learned model has its unique challenges. We summarize the challenges and propose a suitable evaluation metric.
In traditional recommender systems, there is a shared global set of items to recommend to any user. However, in visualization recommendation, the set of visualizations to be recommended is generated on-the-fly based on the dataset of interest. Since each dataset gives rise to a new set of visualizations that can be recommended, we therefore must evaluate the quality of ranking for each individual dataset and explicitly account for the different space of visualizations being ranked for every different dataset X i . Therefore, the standard ranking metrics such as nDCG cannot be used directly for visualization recommendation. This evaluation must be performed completely independent of any other dataset in the corpus. For instance, in traditional recommender systems, we simply use a model to infer scores for every item since all items are shared by all users. However, in visualization recommender systems, suppose we want to evaluate whether the model can rank actual relevant/positive visualizations from a held-out test dataset highly, then we have to generate all possible visualizations for the specific dataset, and then compute the ranking metric over this set of visualizations independently of other visualizations from other datasets. As such, we have to repeat this process for every dataset, correct for the difference in space, and then average the result. Furthermore, the number of possible visualizations the ranking is computed over depends entirely on the dataset and the number of attributes in it. Therefore, the difficulty of the visualization ranking problem varies based on the dataset, and more specifically, the number of attributes in that dataset. For instance, it is easy to score a high nDCG for a dataset with only two attributes as opposed to one with hundreds.
For these reasons,the traditional ranking metrics (e.g., nDCG) are not appropriate for the visualization recommendation problem and give incorrect and misleading results. This leads us to propose a modified version of nDCG that can be used for evaluation of ML-based visualization recommendation models. As an aside, other evaluation metrics can also be corrected in a similar fashion. Given N test datasets along with N sets of held-out positive visualizations , then we propose a modified nDCG defined formally as: where j is the rank, Y i j ∈ {0, 1} is the ground-truth label (relevant/irrelevant) of the visualization at position j in the ranking of visualizations for dataset X i , and Z K i is the normalization factor for dataset X i . The dataset-dependent normalization factor Z K i ensures that a perfect ranking for our visualization recommendation problem receives a perfect score of 1. This is required since each dataset X i may have a different number of positive visualizations |V i |, that is, for any arbitrary two datasets X i and X j , |V i | |V j |. The perfect ranking recommends all (but no more than K) positive visualizations at the top. Our modified nDCG emphasizes the quality of the visualization ranking at the top of the list of recommended visualizations for each dataset X i since 1/log 2(j + 2) decreases quickly and then asymptotes to a constant as j increases. Therefore, a good end-to-end learning-based visualization recommender system must be able to give up some of its performance at the bottom of the list of recommended visualizations to improve the performance at the top. In Sec. 6.1, we use the proposed nDCG metric from Eq. 36 up to the 20th position.

EXPERIMENTS
In this section, we conduct experiments to answer the following research questions: • RQ1: Given an arbitrary and unseen user selected data set, is our learned model able to automatically recommend the top visualizations that are most important to the user, i.e., the visualizations they manually created, which are held-out for evaluation (Sec. 6.1)? • RQ2: Does our proposed wide-and-deep approach outperform common-sense baselines for end-to-end visualization recommendation? Is the best performance achieved when using the full wide-and-deep model or do the simpler variants of our approach, namely, using the wide-only or deep-only component of our model perform better (Sec. 6.1)? • RQ3: Do human experts prefer our ML-based visualization recommendations or the ones from the rule-based system, Voyager2, that uses CompassQL (Sec. 6.2)?  To answer RQ1 and RQ2, we quantitatively evaluate our MLbased visualization recommendation system in Section 6.1. For RQ3, we perform a user study in Section 6.2 comparing the effectiveness of our ML-based visualization recommender system to the state-ofthe-art rule-based system called CompassQL, which is used in both Voyager and Voyager2. Finally, in Section 6.3, we show a number of examples that demonstrate the ability of our ML-based approach to learn rules from the training corpus, and in many cases, perform better than CompassQL (used in Voyager2), and therefore, overcome many of the limitations that exist in such rule-based systems. These examples also show that our model does not require any manual effort to define such rules, but can automatically learn them from the visualization corpus used for training our model.

Quantitative Results
In this section, we answer RQ1 and RQ2 by evaluating our MLbased visualization recommendation system quantitatively. For quantitative evaluation, we use the evaluation framework proposed in Section 5. For training our ML-based models, we use a training corpus of 1K datasets (and their visualizations) from the Plot.ly corpus [3]. We provide the statistics of the training corpus used for learning our model in Table 4. Notably, as shown in Table 4, there are roughly 1K datasets that have an average of about 12 attributes each. Our ML-based model for visualization recommendation is learned using 1K datasets consisting of about 12K attributes and about 5K user-generated visualizations that use some of the 12K attributes.
Since this work proposes the first end-to-end learning-based visualization recommender system, we compare our approach using two common-sense baselines along with two simpler variants of our model. The first common-sense baseline is called random, and refers to a method that simply recommends the top-k visualizations chosen uniformly at random from the set of generated visualizations for the specific dataset. This baseline is important for understanding if our wide-and-deep learning approach is able to learn something meaningful from the raw data (e.g., what visualization preferences, like chart types and so forth users prefer for data with certain characteristics, or what makes a visualization better than another one, and so forth) and if the model is meaningful and useful for visualization recommendation or if it performs no better than random. We also propose another common-sense baseline for evaluating ML-based visualization recommender systems based solely on the popularity (or frequency) of a visualization configuration in the training corpus. We call this baseline ConfigPop. As an aside, the notion of a visualization configuration, which is proposed in this work, is essentially an abstraction of a visualization, consisting of all the design choices, but not the actual data (or attribute names) used in the visualization, see Section 3 for a more formal definition of the proposed notion of a visualization configuration.
To evaluate the effectiveness of the top recommended visualizations, we use the modified normalized Discounted Cumulative Gain (nDCG) at k ∈ {1, 2, 5, 10, 20} as in Sec. 5.5 for the different top-k visualization recommendations (nDCG@k). Results are reported in Table 5. Strikingly, our wide-and-deep learning-based model for visualization recommendation performs the best, achieving a high nDCG across all k = 1, ..., 20, as shown in Table 5. Hence, this confirms that our ML-based visualization recommendation model accurately learns to recommend the top visualizations that are most important to the user, despite that the model has never seen the dataset nor the visualizations created by that user before (RQ1). In addition, we observe that our full wide-and-deep learning-based approach and the simpler model variants of our approach always outperform the other methods across all k ∈ {1, 2, 5, 10, 20}. Furthermore, our approach with both the wide and deep components, has the highest nDCG scores compared to the two common-sense baselines, and our two ablation model variants that use only the wide or deep components of our model, as shown in Table 5 (RQ2). It is also important to note that results at smaller k are obviously more important, and these are exactly the situations where our models and the variants perform extremely well compared to the others. As an example, at nDCG@1, our wide-and-deep learning visualization recommendation model achieves 0.827 at k=1, whereas the best baseline is only able to achieve an nDCG of 0.366. This is an improvement in nDCG of 124% over the best baseline at k=1.   This result clearly demonstrates the effectiveness of our end-toend ML-based visualization recommendation model as it is able to effectively recover the held-out ground-truth visualization that was generated and therefore preferred by an actual user. Furthermore, the model is also able to distinguish between visualizations that were not preferred by a user, as they receive a lower score from the ML-based recommendation model. These results and findings confirm that our model learns to recommend high quality visualizations that a user will likely prefer from an arbitrary and unseen user-selected data set. From Table 5, we also observe that while the full wide-and-deep learning model outperforms our other model variants, the second best performing model is our deep only variant, and it achieves better performance than the wide-only variant across all k. Finally, our ML-based visualization recommendation models always outperform the other baselines across all k, and thus are the top 3 best performing models followed by the other baselines that lack any machine learning (using essentially rules, e.g., config-Pop always predicts the most popular visualization configuration for a given data set).

User Study
In this section, we perform a user study to compare our end-to-end ML-based visualization recommender system to the existing endto-end system that uses rules as opposed to learning. 13 For this, we take the top 5 recommended visualizations from the rule-based system (Voyager2 using CompassQL) and the top-5 recommended visualizations from our ML-based system (for the standard car data). The top-5 from the rule-based and our ML-based end-to-end visualization recommender system is shown in Figure 3. Given the set of 10 visualizations, we randomize the order by taking a uniform random permutation of them, and then display them to the human experts in this order. Human experts are asked to assign a score to each visualization in 7-point Likert scale. Afterwards, we compute the overall score of a visualization by taking the mean of the scores assigned by the experts. In this study, there were 21 human experts rating the top-5 visualizations from either system using a 7-point Likert scale.
Comparing the top-5 recommended visualizations from either system, human experts gave significantly higher scores to those visualizations that our ML-based system recommended. Hence, we observed a strong preference by the human experts towards the visualizations recommended by our system as opposed to the rulebased system. Overall, the human experts assigned a mean score of 5.92 to the top-5 visualizations from the ML-based approach and a mean score of 3.45 to those from the rule-based approach (RQ3). Hence, we can clearly see that the ML-based visualization recommendations are significantly better than the rule-based approach. This result is significant at p-val=0.01. We also provide the mean score and the ±variance for each of the top-5 visualizations from either system in Figure 4. Strikingly, the top ranked visualization by the human experts is exactly the top ranked visualization from our ML-based system. Furthermore, among the 10 visualizations that human experts scored, the top 4 visualizations with the highest score are those from our ML-based visualization recommendation system, and not from the rule-based system. As shown in Figure 4, the variance of the ML-based recommendations are nearly always less than the rule-based system. This difference is also significant. We posit that this is due to the discrete nature of the rule-based recommender system that scores visualization in a discrete fashion using manually defined rules, and so even though the visualization may appear to be high quality with respect to the manually defined rules, it is not of high quality with respect to the actual data and insights that visualizations seek to show from the data.

Qualitative Analysis
While Section 6.1 demonstrated the effectiveness of the visualization ranking from our ML-based approach using a quantitative ranking evaluation metric whereas Section 6.2 revealed that human experts overwhelmingly preferred visualizations recommended by the ML-based visualization recommendation model compared to those from the state-of-the-art rule-based approach. In this section, we perform a case study to investigate whether the ML-based visualization recommendation model is able to learn meaningful visual rules from the large training corpus.
To investigate the effectiveness of the visualization recommendations given by our end-to-end ML-based approach, we compare with the existing end-to-end rule-based approach (Voyager2). As shown in Figure 5, we developed an interface for our ML-based visualization recommendation system that allows the user to select or upload a dataset of interest, and then we automatically recommend them the top visualizations for that given dataset using the learned model. The recommended visualizations are then displayed to the user in order of relevance/importance score which is inferred from our ML-based model. In addition, the user can specify different queries interactively using the interface. For instance, they can select the attribute types (quantitative, nominal, and temporal) that they want to visualize, and the system immediately infers and displays the top most relevant recommended visualizations to the user. As an aside, the user can also select attributes of interest to include in the recommended visualizations, aggregations to use, chart-types, and so on. This is similar to the interface used by Voyager2.
In this case study, we use the cars dataset about car specifications, and specify a few queries. Results reveal several aspects where our end-to-end ML-based visualization recommendation approach is more effective than the end-to-end rule-based approach (Voyager2), and the ability of our system to automatically learn to recommend visualizations that would be preferred by even domain experts, without the manual specification of any rules (RQ4).
6.3.1 Learning to place attributes like an expert. Now we demonstrate how our ML-based system is able to learn to prefer visualizations that a human expert would also prefer. Using a query for visualizations containing two nominal attributes, we see that both approaches recommend visualizations with the attribute car model name in their top visualizations as shown in Figure 6. However, the rule-based system incorrectly recommends a visualization with a vertical layout whereas the ML-based approach learns to recommend a horizontal layout and penalizes the vertical charts. Interestingly, the ML-based model is able to learn the fact that domain experts prefer to do these types of charts horizontally, as opposed to vertically, and therefore our wide-and-deep learning model penalizes the vertical charts to ensure they are not recommended to the user. This is in complete contrast to the rule-based approach, which seems to favor vertical layout, despite that human experts would recommend against such charts.

Tie-breaking issues.
A key fundamental problem with the existing rule-based visualization recommender system (Voyager2 using CompassQL) is that visualizations are often scored using a set   Figure 7: Tie-breaking issues of the rule-based approach where all visualizations are scored the same and thus the system fails to find an appropriate high quality ranking. In comparison, our wide-and-deep learning approach is able to learn more meaningful scores that appropriately differentiate between the most important and insightful visualizations and those that are less important.
of manually defined rules that assign simple discrete scores to visualizations that either satisfy or violate the manual rules defined by people. This oversimplified scoring results in many visualizations having exactly the same score, and therefore, no way to actually rank them. In this case, the existing end-to-end system simply displays the visualizations in the order they were generated, which is most often not very appropriate. In Figure 7, we show one such case of this where the top visualizations from the rule-based are all assigned the same score of 0, and thus fails to prefer one over the other and vice-versa. Moreover, while we show only three visualizations here with score 0, there are even more further down the list that also have score of 0. Hence, in this case, the rule-based system simply breaks ties randomly, and often ends up with low quality visualizations that are ranked higher than some visualizations that are clearly better. In comparison, our wide-and-deep learning approach is able to learn more meaningful scores that appropriately differentiate between the most important and insightful visualizations and those that are less important. For instance, our ML-based visualization recommendation model assigns a score to the visualization shown in the 3rd position by the rule-based approach, which is clearly not a useful visualization, especially compared to the exponential amount of other possibilities. There are many other similar situations where our scores are significantly more useful and completely avoid the tie-breaking issues of the rule-based approach.

CONCLUSION
In this work, we proposed the first end-to-end ML-based visualization recommendation system. We first formalized the ML-based visualization recommendation problem and described a generic learning framework for solving it. Next, we proposed a wide-anddeep learning architecture that combines a wide component with a deep learning component. Each visualization is scored with the input of two parts, an attribute combination and a visualization configuration, using our wide-and-deep learning visualization recommendation model. Given a new unseen dataset from an arbitrary user, the learned model is used to automatically generate, score, and output a list of recommended visualizations for that specific dataset. Further, we present an evaluation framework that can evaluate visualization recommendation system learned from a large corpus of visualizations and datasets. We demonstrated the effectiveness of the proposed approach in three different ways. First, we used the evaluation framework to quantitatively demonstrate the effectiveness of the ranking of visualizations from our ML-based visualization recommendation system. Second, we also validated the effectiveness of our ML-based system through a user study of 20 human experts, and found that the top-1 ranked visualization from human experts matched exactly the top-1 visualization from our system. Most importantly, human experts overwhelming preferred the ML-based visualization recommendations over the existing rulebased system as shown in Section 6.2. Third, we also performed qualitative analysis on the recommendations from our ML-based model and the state-of-the-art rule-based approach, and discussed many different advantages where our model is able to learn visual rules from the large training corpus that are not even incorporated in the rule-based approach.