Data Sets

Data preparation scripts

79 Script(s)

Creating and Saving a Sample Action Set
Action : actionSetFromTable

First, we need to define a simple action set and then save it to a CAS table. This table will then be used as the source...

Code SAS Voir code
Defining a Custom Action Set
Action : actionSetToTable

Before converting an action set to a table, one must first be defined. This code snippet creates a simple, user-defined ...

Code SAS Voir code
Data Creation for Examples
Action : addCaslib

No specific data creation is needed for the addCaslib action itself, as it is used to define a data source location. The...

Code SAS Voir code
Setting Up a Path-Based Caslib
Action : addCaslibSubdir

Before creating a subdirectory, we first need a caslib. This code sets up a new caslib named 'myCaslib' pointing to a sp...

Code SAS Voir code
Creating a Control Data Set for a Format Library
Action : addFmtLib

Before adding a format library to CAS, you first need to create one. A common method is to use PROC FORMAT with the CNTL...

Code SAS Voir code
Data Creation
Action : addFormat

First, we create a format library named 'myFmtLib' to store our custom formats. Then, we load a simple dataset into a CA...

Code SAS Voir code
Data Creation
Action : addLayer

This action does not directly use training data. It operates on a model definition table. However, to build a complete, ...

Code SAS Voir code
Context: No Data Creation Required
Action : addNode

The `addNode` action is an administrative function used to manage the CAS server infrastructure. It does not operate on ...

Code SAS Voir code
Prerequisites
Action : addNodeStatus

This action does not require any specific data to be created beforehand. It is a server monitoring action....

Code SAS Voir code
No Data Creation
Action : addPrototypes

The `addPrototypes` action does not create a standard dataset. Instead, it populates a special CAS table with function p...

Code SAS Voir code
Data Creation
Action : addRoutines

This action does not directly use input data, but it creates a CAS table containing the compiled functions. The followin...

Code SAS Voir code
Data Creation (Client-Side)
Action : addTable

The `addTable` action is used by client-side utilities to upload data. For example, in Python, you would typically creat...

Code SAS Voir code
Data Creation for Examples
Action : addUserActionSetPath

The following code creates a local directory and a caslib named 'mycaslib' that points to this directory. This setup is ...

Code SAS Voir code
Creating the 'cars' dataset
Action : aggregate

The following code creates a sample CAS table named 'cars' which contains information about various car models, includin...

Code SAS Voir code
Data Creation for alJoin Examples
Action : alJoin

This code snippet creates two sample tables: 'raw_data' containing the main dataset with features, and 'annotations' con...

Code SAS Voir code
Data Creation
Action : alterTable

This code creates a sample table 'CARS_DATA' in the 'casuser' caslib, which will be used in the following examples. The ...

Code SAS Voir code
Creating a Sample Dataset with Missing Values
Action : analyzeMissingPatterns

This SAS code creates a sample dataset named 'sample_data_missing' in the 'casuser' caslib. The dataset includes several...

Code SAS Voir code
Create Sample Data for Training
Action : annCode

This example creates a sample dataset named 'sample_data' with several input variables and a target variable, suitable f...

Code SAS Voir code
Creating an Image Table with Annotations
Action : annotateImages

This example demonstrates how to load images from a specified path into a CAS table and prepare it for annotation. We ad...

Code SAS Voir code
Data Creation for Scoring
Action : annScore

This example first creates a sample dataset `mycas.iris_score` which has the same structure as the training data but wit...

Code SAS Voir code
Data Creation
Action : annTrain

This example uses the `HMEQ` dataset from the `SAMPSIO` library, which contains information about home equity loans. The...

Code SAS Voir code
Data Creation
Action : append

The following code creates two tables, `target_table` and `source_table`, in the active caslib. `target_table` contains ...

Code SAS Voir code
Data Creation for Categorization
Action : applyCategory

This SAS code creates two tables: 'reviews' which contains the text data to be categorized, and 'category_model_table' w...

Code SAS Voir code
Data Creation
Action : applyConcept

This example creates a sample CAS table named 'my_documents' with two columns: 'doc_id' for the document identifier and ...

Code SAS Voir code
Data Creation for ARIMA Analysis
Action : arima

This example creates a sample time series dataset named 'series' with a date and a value 'y'. This data will be used in ...

Code SAS Voir code
Data Creation
Action : assess

This example uses the `HMEQ` dataset, which contains information about home equity loans. We will first load this data i...

Code SAS Voir code
Data Creation for Bias Assessment
Action : assessBias

This example first loads the `HMEQ` dataset, which contains home equity loan data. Then, a gradient boosting model is tr...

Code SAS Voir code
No Data Creation Needed
Action : assumeRole

The `assumeRole` action does not directly interact with or create data tables. It is an administrative action used to ma...

Code SAS Voir code
Data Creation
Action : attribute

This code creates a simple in-memory table named 'CARS' in the 'CASUSER' caslib. This table will be used in the examples...

Code SAS Voir code
Loading Images into a CAS Table
Action : augmentImages

Before augmenting images, they must be loaded into a CAS table. The following code uses `proc casutil` to load image fil...

Code SAS Voir code
Data Creation
Action : bartGauss

This example creates a sample dataset named 'sample_data'. The target variable 'y' is generated from a combination of li...

Code SAS Voir code
Data Creation
Action : bartProbit

This example creates a sample dataset named 'purchase_data'. The dataset simulates customer purchasing behavior, where '...

Code SAS Voir code
Data Creation for Scoring
Action : bartScore

This example first creates a training dataset 'mycas.train_data' and a scoring dataset 'mycas.score_data'. A BART model ...

Code SAS Voir code
Data Creation
Action : bartScoreMargin

This example first creates a sample dataset 'getStarted' with a binary outcome 'y' and several predictor variables. Then...

Code SAS Voir code
Data Creation for Examples
Action : batchresults

This step is not directly required for the `batchresults` action itself, as it operates on sessions and actions rather t...

Code SAS Voir code
Data Creation
Action : biconnectedComponents

This example uses a simple undirected graph to illustrate the biconnected components algorithm. The graph contains sever...

Code SAS Voir code
Data Creation
Action : binning

This example creates a sample dataset `sample_data` in the active caslib. The table contains customer information, inclu...

Code SAS Voir code
Data Creation
Action : bnet

This example creates a simple dataset named 'golf' with weather conditions and a decision on whether to play golf. This ...

Code SAS Voir code
Data Creation
Action : boxChart

This example creates a CAS table named `mycas.PistonRings`. This table contains diameter measurements of piston rings. E...

Code SAS Voir code
Data Creation
Action : boxPlot

This example creates the 'wines' table in your default caslib. This table contains information about different types of ...

Code SAS Voir code
Data Creation
Action : brScore

This example first creates two CAS tables. The `rule_terms` table defines two Boolean rules. Rule 1 is 'term1 AND term2'...

Code SAS Voir code
Data Creation: Document-Term and Document-Category Data
Action : brTrain

First, we create two tables. 'doc_term_data' contains the sparse representation of documents, linking document IDs to te...

Code SAS Voir code
Data Creation: Loading DICOM Medical Images
Action : buildSurface

Before building a surface, we first need to load 3D medical image data. This example uses the `loadDicomData` action to ...

Code SAS Voir code
Data Creation: Table of Significant Terms
Action : buildTermIndex

This SAS code creates a sample CAS table named 'significant_terms' in the 'casuser' caslib. This table simulates the out...

Code SAS Voir code
Data Creation for Causal Analysis
Action : caEffect

This example creates a dataset named 'treatment_data'. It contains an outcome variable 'outcome', a treatment variable '...

Code SAS Voir code
Creating Reference and Hypothesis Data
Action : calculateErrorRate

First, we create two CAS tables. `reference_transcripts` holds the correct, or 'ground truth', text. `hypothesis_transcr...

Code SAS Voir code
Data Setup
Action : caslibInfo

This code sets up two caslibs, 'myCaslib' and 'salesCas', which can be used in the examples. 'myCaslib' points to a gene...

Code SAS Voir code
Data Creation
Action : catTrans

This example creates a sample dataset `customer_data` with a categorical variable `product_category` and a binary target...

Code SAS Voir code
Data Creation: Circuit Board Defects
Action : cChart

This SAS code creates a sample dataset named 'Circuits'. Each record represents a batch of circuit boards inspected on a...

Code SAS Voir code
Data Creation for Simulation
Action : cdm

The cdm action requires pre-existing CAS tables for severity and count model definitions or estimates. The following cod...

Code SAS Voir code
Creating the Input Data
Action : centrality

This example creates a simple social network graph to demonstrate how to calculate centrality metrics. The `mycas.Links`...

Code SAS Voir code
Loading an ONNX Model into a CAS Table
Action : check

To use the `check` action, the ONNX model must first be available in CAS as a binary large object. The following DATA st...

Code SAS Voir code
Data Creation: Checking Out an Object
Action : checkInAllObjects

To demonstrate `checkInAllObjects`, we first need an object to be in a 'checked-out' state. This code loads the `cars` t...

Code SAS Voir code
Data Setup for Examples
Action : checkOutObject

This code sets up a caslib and a table required for the examples. It also creates an access control to demonstrate the c...

Code SAS Voir code
Data Creation: Friendship Network
Action : clique

This dataset represents a friendship network where each link indicates a friendship between two people....

Code SAS Voir code
Data Creation
Action : community

This example uses the `mycas.LinkSetIn` data table to represent the links of a graph. The `from` and `to` columns define...

Code SAS Voir code
Data Creation
Action : compare

This example creates two tables, `sales_q1` and `sales_q2`, to represent sales data for two different quarters. These ta...

Code SAS Voir code
Data Creation: Loading Source and Reference Images
Action : compareImages

This example demonstrates how to load two sets of images (source and reference) from server paths into two distinct CAS ...

Code SAS Voir code
Creating the Input Rule Table
Action : compileCategory

This example creates a CAS table named 'category_rules_table'. This table contains the category rules that will be compi...

Code SAS Voir code
Creating the Input Concept Rules Table
Action : compileConcept

To use the `compileConcept` action, you first need a CAS table containing your concept rules. This table must have at le...

Code SAS Voir code
Data Creation: Loading Audio Files
Action : computeFeatures

First, we load audio files into a CAS table. The `loadAudio` action scans a directory for audio files and loads them int...

Code SAS Voir code
Data Creation
Action : condenseImages

This example first creates a synthetic dataset named 'pixel_data'. This table simulates a flattened image format where e...

Code SAS Voir code
Creating the Input Data
Action : connectedComponents

This example creates a simple undirected graph with two separate components. The first component includes nodes A, B, C,...

Code SAS Voir code
Creating the Input Data Table
Action : convertMps

This example creates a simple two-column CAS table named `mps_free`. The first column, `id`, is a row identifier. The se...

Code SAS Voir code
Data Creation
Action : copulaFit

This example requires a dataset with multiple continuous variables to model their dependence structure. We will create a...

Code SAS Voir code
Data Creation: Sample Correlation and Data Tables
Action : copulaSimulate

First, we create two CAS tables. 'mycorr' holds a Pearson correlation matrix for a 2-dimensional Normal copula. 'mycas.e...

Code SAS Voir code
Data Creation for Model Fitting
Action : copulaViewStore

Before using copulaViewStore, you first need to fit a copula model and save it to an item store using the 'copulaFit' ac...

Code SAS Voir code
Creating and Saving a Decision Tree Model
Action : copyModelExternal

To use `copyModelExternal`, a model must first exist in a CAS table. This code trains a simple decision tree model on th...

Code SAS Voir code
Data Creation: Sample Source Table
Action : copyTable

This code creates a simple in-memory table named 'source_data' in the 'casuser' caslib. This table will serve as the sou...

Code SAS Voir code
Data Creation
Action : core

This example creates a simple undirected graph to illustrate the core decomposition. The graph has 9 nodes and several l...

Code SAS Voir code
Create the 'cars' Data Set
Action : correlation

This example uses the 'cars' data set from the 'sashelp' library, which is commonly available in SAS environments. The d...

Code SAS Voir code
Creating Sample Data for Count Regression
Action : countregFitModel

This SAS code generates a sample dataset named 'd_counts' in the 'mycas' caslib. The dataset contains a count variable '...

Code SAS Voir code
Creating the `science_articles` Dataset
Action : countregViewStore

This dataset simulates data about scientists. The goal is to model the number of articles published (`articles`) based o...

Code SAS Voir code
Data Creation: Bone Marrow Transplant Data
Action : cox

This example uses data from a study on bone marrow transplants for leukemia patients. The data, stored in the `Bmt` tabl...

Code SAS Voir code
Setting Up Sample Data and Access Controls
Action : createBackup

Before backing up access controls, we first need some data and controls to exist. The following code sets up a new sessi...

Code SAS Voir code
Data Creation: Sample Text Data and Model Tables
Action : crfScore

This example first creates a sample input table 'score_data' with document IDs and text. Then, it simulates the creation...

Code SAS Voir code
Data Creation
Action : crfTrain

This example creates a sample dataset named 'my_cas_library.sequence_data'. This table contains sequences of tokens, wit...

Code SAS Voir code
Data Creation
Action : crossTab

The following code creates the 'cars' table in the 'casuser' caslib, which will be used in the examples. This table is a...

Code SAS Voir code
Data Creation
Action : cspade

This example creates a sample dataset of customer transactions over time. Each row represents an item purchased by a cus...

Code SAS Voir code