FACTMAC Procedure
The PROC FACTMAC statement invokes the procedure. Table 1 summarizes the options available in this statement.
Table 1: PROC FACTMAC Statement Options
| Option | Description |
|---|
| Input Data Table Options |
|---|
|
DATA= | Specifies the input data table |
| Factorization Options |
|---|
|
APPLYROWORDER | Specifies that the procedure use a prespecified data distribution |
|
LEARNSTEP= | Specifies the learning step size for the SGD algorithm |
|
MAXITER= | Specifies the maximum number of iterations |
|
NFACTORS= | Specifies the number of factors to estimate for the model |
|
NONNEGATIVE | Requests nonnegative factorization |
|
NTHREADS= | Specifies the number of threads to use on each computation node |
|
OUTMODEL= | Specifies the output model data table to contain the computed factor parameters |
|
SEED= | Specifies the seed to be used for pseudorandom number generation |
| Output Options |
|---|
|
NOPRINT= | Suppresses ODS output |
You can specify the following options:
-
APPLYROWORDER
uses a data distribution and row order as determined by a previous partition action call. For more information, see the section The APPLYROWORDER Option in Chapter 2, Shared Concepts.
-
DATA=libref.data-table
-
names the input data table for PROC FACTMAC to use. The default is the most recently created data table. libref.data-table is a two-level name, where
- libref
refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about libref, see the section Using CAS Sessions and CAS Engine Librefs.
- data-table
specifies the name of the input data table.
-
LEARNSTEP=number
-
specifies the learning step size for the stochastic gradient descent (SGD) algorithm, where number is a positive real number. The learning step size controls the amount by which the factors are updated at each iteration.
By default, LEARNSTEP=0.001. This value can be tuned with the AUTOTUNE statement.
-
MAXITER=number
-
specifies the maximum number of iterations for the algorithm to perform, where number is an integer greater than or equal to 1. In each iteration of the SGD method, the factors are recomputed.
By default, MAXITER=1. This value can be tuned with the AUTOTUNE statement.
-
NFACTORS=number
-
specifies the number of factors to estimate for the model, where number is an integer greater than or equal to 1.
By default, NFACTORS=1. This value can be tuned with the AUTOTUNE statement.
-
NONNEGATIVE
-
performs nonnegative factorization, in which the estimated factors are greater than or equal to 0 and the estimated biases are 0.
By default, nonnegative factorization is not performed.
-
NOPRINT
suppresses ODS output.
-
NTHREADS=number-of-threads
specifies the number of threads to use for the computation, where number-of-threads is an integer from 1 to 64, inclusive. The default value is the maximum number of available threads per computer.
-
OUTMODEL=libref.data-table
specifies the output model data table to contain the computed factor parameters. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.
-
SEED=random-seed
-
specifies an integer that is used to start the pseudorandom number generator. This option enables you to reproduce the same sample output, but only when NTHREADS=1. If you do not specify a seed or you specify a value less than or equal to 0, the seed is generated from reading the time of day from the computer’s clock.
By default, SEED=0.
Last updated: September 04, 2026