Introduction to RASON
About RASON Models and the RASON Server
Rason Subscriptions
Rason Web IDE
Creating and Running a Decision Flow
Defining Your Optimization Model
Defining Your Simulation Model
Performing Sensitivity Analysis
Defining Your Stochastic Optimization Model
Defining Your Data Science Model
Defining Custom Types
Defining Custom Functions
Defining Your Decision Table
Defining Contexts
Using the REST API
REST API Quick Call Endpoints
REST API Endpoints
Decision Flow REST API Endpoints
OData Endpoints
OData Service for Decision Flows
Creating Your Own Application
Using Arrays, For, Loops and Tables
Organization Accounts

Defining a Data Science Model

This chapter teaches you how to model data science models using the RASON Modeling Language by giving step-by-step instructions on how to create and solve various data science models. If you'd like to open the examples and follow along, you can do so on the Editor page on www.Rason.com under RASON Examples – Data Science.

All algorithms featured in Analytic Solver and XLMiner SDK can be expressed using a standardized structure in RASON DM. This basic structure includes six major "sections" or "segments": modelName, modelType, datasources, datasets, estimator/transformer and actions. While modelName and modelType are both optional high level properties, both are strongly recommended.


{
   "modelName": "",
   "modelType": "",
   "datasources": {},
   "datasets":{},
   "estimator"/"transformer": {},
	"type":"",
	"algorithm":"",
	"parameters":{}
   },
   "actions":{}
}
  • modelName -- RASON V2020 supports named and unnamed models. A named model includes the modelName: "name" property in its text; "name" must be a string that can be URL encoded and must be unique among models within a user's account. Although this property is optional, it is strongly recommended that a model be named to allow for easy recognition and retrieval when multiple models, instances and versions exist in a user's account. This property also identifies the model within an inline decision flow. (Reusable model use the "invokeModel" field; which in turn invokes another standalone model containing the "modelName" property.)
  • modelType -- A new optional top-level property "modelType"={"optimization", "simulation", "datamining", "calculation"} has been introduced in RASON Decision Services V2020 for use with decision flows and standalone models. This property defines the model type as optimization, simulation, datamining or calculation within the RASON script. (For more information on this property see the section More on the modelType Property within the Creating and Running a Decision Flow chapter.)
  • datasources -- The "datasources" section is where the data for the model is acquired. Most times, the data is contained in an external data source such as a database or delimited file.
  • datasets -- The "datasets" section is where the external dataset is "bound" to a RASON dataset.
  • estimator/transformer – These sections are mutually exclusive -- A model may not contain both a transformer and an estimator. An "estimator" object estimates a model from the training data and stores the fitted model, which may be used later. Examples of estimators are classification or regression algorithms. These algorithms fit a model which can be used later to score new data. A "transformer" applies to estimators that do not fit a model but rather transform data, such as Feature Selection or Sampling.
  • actions -- The function of the estimator or transformer is carried out within the "actions" section. If a model was "fit" within the estimator section, then the model is applied to the desired dataset (training, validation, test partitions or to new data) within this section. If a transformer was initiated, then the actual data transformation will be performed within this segment.
  • It is important to note that order inside the Rason model is very important as the Rason interpreter does not parse the model to determine the correct order beforehand. Therefore, "actions" may not appear before "estimator", "estimator" may not appear before "datasets" and so on.

    Continue reading to learn more about both the major and minor sections that may appear in a Rason DM model.