# Generalized Low Rank Models (GLRM)¶

## Introduction¶

宁夏微乐滑水麻将下载generalized low rank models (glrm) is an algorithm for dimensionality reduction of a dataset. it is a general, parallelized optimization algorithm that applies to a variety of loss and regularization functions. categorical columns are handled by expansion into 0/1 indicator columns for each level. with this approach, glrm is useful for reconstructing missing values and identifying important features in heterogeneous data.

## What is a Low-Rank Model?¶

given large collections of data with numeric and categorical values, entries in the table may be noisy or even missing altogether. low rank models facilitate the understanding of tabular data by producing a condensed vector representation for every row and column in the dataset. specifically, given a data table a with m rows and n columns, a glrm consists of a decomposition of a into numeric matrices x and y. the matrix x has the same number of rows as a, but only a small, user-specified number of columns k. the matrix y has k rows and d columns, where d is equal to the total dimension of the embedded features in a. for example, if a has 4 numeric columns and 1 categorical column with 3 distinct levels (e.g., red, blue and green), then y will have 7 columns. when a contains only numeric features, the number of columns in a and y are identical.

both x and y have practical interpretations. each row of y is an archetypal feature formed from the columns of a, and each row of x corresponds to a row of a projected into this reduced dimension feature space. we can approximately reconstruct a from the matrix product xy, which has rank k. the number k is chosen to be much less than both m and n: a typical value for 1 million rows and 2,000 columns of numeric data is k = 15. the smaller k is, the more compression gained from the low-rank representation.

## Defining a GLRM Model¶

model_id: (Optional) Specify a custom name for the model to use as a reference. By default, H2O automatically generates a destination key.

training_frame: (Required) Specify the dataset used to build the model. NOTE: In Flow, if you click the

**Build a model**button from the`Parse`

宁夏微乐滑水麻将下载 cell, the training frame is entered automatically.validation_frame宁夏微乐滑水麻将下载: (Optional) Specify the dataset used to evaluate the accuracy of the model.

x: Specify a vector containing the names or indices of the predictor variables to use when building the model. If

`x`

宁夏微乐滑水麻将下载 is missing, then all columns are used.ignored_columns: (Optional, Python and Flow only) Specify the column or columns to be exclude from the model. In Flow, click the checkbox next to a column name to add it to the list of columns excluded from the model. To add all columns, click the

**All**button. To remove a column from the list of ignored columns, click the X next to the column name. To remove all columns from the list of ignored columns, click the**None**button. To search for a specific column, type the column name in the**Search**field above the column list. To only show columns with a specific percentage of missing values, specify the percentage in the**Only show columns with more than 0% missing values**field. To change the selections for the hidden columns, use the**Select Visible**or**Deselect Visible**buttons.ignore_const_cols宁夏微乐滑水麻将下载: (Optional) Specify whether to ignore constant training columns, since no information can be gained from them. This option is selected by default.

score_each_iteration: (Optional) Specify whether to score during each iteration of the model training.

**loading_name**: Specify the frame key to save the resulting X.transform宁夏微乐滑水麻将下载: Specify the transformation method for the training data: None, Standardize, Normalize, Demean, or Descale. The default is None.

k: (Required) Specify the rank of matrix approximation.

**loss**: Specify the numeric loss function: Quadratic, Absolute, Huber, Poisson, Hinge, or Periodic.**loss_by_col**: Specify the loss function by column override: Quadratic, Absolute, Huber, Poisson, Hinge, or Periodic, Categorical, or Ordinal.**loss_by_col_idx**: Specify the loss function by column index override.**multi_loss**: Specify either**Categorical**or**Ordinal**for the categorical loss function.**period**: When`loss=periodic`

, specify the length of the period.**regularization_x**宁夏微乐滑水麻将下载: Specify the regularization function for the X matrix: None, Quadratic, L2, L1, NonNegative, OneSparse, UnitOneSparse, or Simplex.**regularization_y**宁夏微乐滑水麻将下载: Specify the regularization function for the Y matrix: None, Quadratic, L2, L1, NonNegative, OneSparse, UnitOneSparse, or Simplex.**gamma_x**宁夏微乐滑水麻将下载: Specify the regularization weight on the X matrix.**gamma_y**宁夏微乐滑水麻将下载: Specify the regularization weight on the Y matrix.max_iterations: Specify the maximum number of training iterations. The range is 0 to 1e6.

**max_updates**: Specify the maximum number of updates.**init_step_size**: Specify the initial step size.**min_step_size**宁夏微乐滑水麻将下载: Specify the minimum step size.seed: Specify the random number generator (RNG) seed for algorithm components dependent on randomization. The seed is consistent for each H2O instance so that you can create models with the same starting conditions in alternative configurations.

init: Specify the initialization mode: Random, SVD, PlusPlus, or User.

**svd_method**宁夏微乐滑水麻将下载: Specify the method for computing SVD during initialization: GramSVD, Power, Randomized.**Caution**宁夏微乐滑水麻将下载: Randomized is currently experimental.**user_y**: (Optional) Specify the initial Y value.**user_x**宁夏微乐滑水麻将下载: (Optional) Specify the initial X value.**expand_user_y**: Specify whether to expand categorical columns in the user-specified initial Y value.**impute_original**: Specify whether to reconstruct the original training data by reversing the data transform after projecting archetypes.**recover_svd**宁夏微乐滑水麻将下载: Specify whether to recover singular values and eigenvectors of XY.max_runtime_secs宁夏微乐滑水麻将下载: Specify the maximum allowed runtime in seconds for model training. Use 0 to disable.

export_checkpoints_dir: Specify a directory to which generated models will automatically be exported.

## FAQ¶

**What types of data can be used with GLRM?**glrm can handle mixed numeric, categorical, ordinal and boolean data with an arbitrary number of missing values. it allows the user to apply regularization to x and y, imposing restrictions like non-negativity appropriate to a particular data science context.

**What are the benefits to using low rank models?****Memory**: Saving only the X and Y matrices can significantly reduce the amount of memory required to store a large data set. A file that is 10 GB can be compressed down to 100 MB. When we need the original data again, we can reconstruct it on the fly from X and Y with minimal loss in accuracy.**Speed**: GLRM can be used to compress data with high-dimensional, heterogeneous features into a few numeric columns. This leads to a huge speed-up in model building and prediction, especially by machine learning algorithms that scale poorly with the size of the feature space.**Feature Engineering**: The Y matrix represents the most important combination of features from the training data. These condensed features (called archetypes) can be analyzed, visualized, and incorporated into various data science applications.**Missing Data Imputation**: Reconstructing a data set from X and Y will automatically impute missing values. This imputation is accomplished by intelligently leveraging the information contained in the known values of each feature, as well as user-provided parameters such as the loss function.