CAUSALDISCOVERY Procedure
LEARN Statement
LEARN <DATA=libref.data-table> <OUTDAG=libref.data-table> </ options>;
The LEARN statement specifies the options that are related to the DAG structure learning. You can specify the following options:
- DATA=libref.data-table
specifies the input data table. If you specify both the LEARN and SIMULATE statements, you should specify the OUTDATA= option table in the SIMULATE statement but not specify the DATA= option table in the LEARN statement. This is because the OUTDATA= output table is used as the DATA= input table in the LEARN statement.
- OUTDAG=libref.data-table
writes the estimated DAGs to the specified output data table. You must specify this option if you also specify the EVALUATE statement; this table is then used as the ESTDAG= input table in the EVALUATE statement. 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. .
You can also specify the following options after a slash (/):
-
ALGORITHM=MCV | TOP
ALG=MCV | TOP -
specifies the DAG structure learning algorithm. You can specify the following values:
- MCV
specifies the minimizing conditional variance (MCV) algorithm.
- TOP
specifies the topological order permutation (TOP) algorithm.
By default, ALGORITHM=TOP.
- ALPHA=number | (number-list)
specifies the significance level on whose basis the edges in the DAG are determined. If you specify a number-list, several DAGs are included in the OUTDAG= option table, one for each value in the number-list. The number and all numbers in the number-list must be between 0 and 1. By default, ALPHA=0.000001.
- GPU
specifies that the DAG structure learning algorithm perform calculations by using graphics processing unit (GPU) hardware. When ALGORITHM=MCV, this option is ignored.
- INITMETHOD=DATA | RANDOM | VARIANCE
-
specifies the method to use for determining the initial topological order. You can specify the following values:
- DATA
matches the order of the variables in the VAR statement.
- RANDOM
determines the order randomly.
- VARIANCE
determines the order by using the ascending order of variance of variables in the VAR statement.
By default, INITMETHOD=VARIANCE.
- MAXITER=number
specifies the maximum number of iterations. The number must be a nonnegative integer. By default, MAXITER=200.
- NONPARALLEL
specifies that all structure learnings are to be performed in a single thread on a single machine. If you omit this option, the structure learning algorithm uses as many threads or CPUs as possible.
- OUT=libref.data-table
writes the initial and final topological orders, as well as the matrices of parameter estimates, standard errors, t values, and p-values to the specified output data table. 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.
-
OUTITERHIST=libref.data-table
OUTITER=libref.data-table writes the iteration history to the specified output data table. 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.
-
OUTPATH=libref.data-table
OUTP=libref.data-table writes the parents and children of variables and paths of the estimated DAGs to the specified output data table. 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=number
specifies the random number seed value for the random number generator. If the seed value is 0, a random number stream is generated by using the time of day from the computer’s clock. Seed values greater than 0 generate reproducible random number sequences. By default, SEED=1.