---
schema_version: "1"
id: 007250ffaec405b9f75fdb832dbf12f05bec16969145a268b592531fa46e7d5a
title: Create a Model from Scratch
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_ai_ec_create_model_steps.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_ai_ec_create_model_steps.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2ded8fd648881f09d70a102c5170fdacdbc41b918ebe285a44a12ac492d4f790
description: Create a model that uses historical data to predict future outcomes. Select and structure your data source and define the desired outcome. Then train the model to reveal predictive inferences and insights by using AI, machine learning, and statistical analysis.
products:
  - Data 360
release: "264"
---
# Create a Model from Scratch

Create a model that uses historical data to predict future outcomes. Select and structure your data source and define the desired outcome. Then train the model to reveal predictive inferences and insights by using AI, machine learning, and statistical analysis.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;release=264.0.0&amp;type=5" title="Data 360 is available in several supported Salesforce editions. Some Data 360 features also require additional licenses.">Data 360 edition availability</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d63870e68">User Permissions Needed </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e68 ">Allow users to manage models in AI Models </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e68 ">Enables you to create, update, and delete models in AI Models.</td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d63870e98">Permission sets </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Permission sets" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e98 ">Data Cloud Architect</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e98 ">Admin-level access to all AI Models features, including the ability to create,
              update, delete, and activate models.</td>

          </tr>
          <tr class="">
            <td data-label="Permission sets" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e98 ">Data Cloud User</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e98 ">Restricted access to use a model, including getting predictions and
              improvements derived from a model.</td>

          </tr>
        </tbody>
      </table>

To train a model, here are some data requirements to consider.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:38.837920489296636%">
          <col style="width:30.58103975535168%">
          <col style="width:30.58103975535168%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d63870e142">Requirement</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d63870e145">Minimum</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d63870e148">Maximum</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Requirement" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e142 ">Number of rows</td>

            <td data-label="Minimum" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e145 ">400</td>

            <td data-label="Maximum" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e148 ">
              <p>20 million</p>
              <p style="margin-bottom:0;">5 million for the XGBoost algorithm</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Requirement" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e142 ">Number of variables (fields or columns)</td>

            <td data-label="Minimum" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e145 ">3 (1 outcome variable plus 2 other fields)</td>

            <td data-label="Maximum" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e148 ">
              <p>50 with manual selection</p>
              <p style="margin-bottom:0;">350 with automatic selection. From these
                fields, Autopilot considers only the 50 most relevant ones.</p>
            </td>

          </tr>
        </tbody>
      </table>

Using predictive models to generate inferences consumes Data 360 credits for billing. Learn more about how predictive AI impacts credit consumption in [Billing Considerations for Predictive AI](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_usage_inference.htm&release=264.0.0&type=5 "Predictive models in AI Models (formerly Einstein Studio) use Data 360 to ingest, query, and store data, and to create inferences. Using Data 360 services can impact the consumption of credits used for billing in these usage types.").

1. Choose Type
    
    Based on your use case, select a binary, regression, or multiclass model.
    
    ![Step 1 to choose a binary, regression and multiclass model type.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_create_a_model.png)
2. Select Data
    
    Select the source of data to train your model with. Einstein uses the data to train and test the model.
    
    When selecting a data source, consider some guiding questions.
    
     
    | Question | Guidance |
    | --- | --- |
    | What outcome (such as a KPI) do you want to predict? | Predictive modeling detects patterns related to three types of use cases: regression (continuous numbers), binary classification (two-value text outcomes), or multiclassification (from 3 through 10 possible outcomes). Ideal data candidates for predictive modeling often involve KPIs associated with large volumes of data and many business decisions. |
    | Which variables do you want to include? | Deciding which variables to include impacts the quality and interpretability of a predictive model. When variables are meaningful and relevant, it becomes simpler for stakeholders and business users to understand the relationships between factors and trust the predicted outcomes. |
    | Where can you find this information? | Understanding where the data comes from is valuable in assessing quality, identifying bias, and adhering to data governance and compliance. |
3. Select Training Data
    
    Use all records in the data source to train the model. Or, specify conditions to restrict the records used to train the model.
    
    1. To select a specific subset of data to train the model, click **Filtered Set of Records**.
    2. Define your filter condition.
        
        ![Step 3 to Filter records, showing option to use a filtered set of records selected](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_filter_set_of_records.png)
        
        ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_important.png)
        
        Important
        
        Filter your training set to use less than 20 million rows.
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                <colgroup>
                  <col style="width:33.670033670033675%">
                  <col style="width:66.32996632996634%">
                </colgroup>
                <thead class="slds-text-title_caps ">
                  <tr class="">
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d63870e333">Logic</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d63870e336">Description</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Logic" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e333 ">Condition Requirements</td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e336 ">
                      <p>All Conditions Are Met—if all conditions are true, the filter is applied.
                        If one of the conditions is false, the filter isn’t applied.</p>
                      <p style="margin-bottom:0;">Any Condition Is Met—if one condition is true, the filter is
                        applied.</p>
                    </td>

                  </tr>
                  <tr class="">
                    <td data-label="Logic" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e333 ">Field</td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e336 ">Based on the data source. The data attribute or variable to use when
                      applying the filter.</td>

                  </tr>
                  <tr class="">
                    <td data-label="Logic" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e333 ">Operator</td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e336 ">Defines the relationship between the field and condition. The available
                      operators depend on the field type.</td>

                  </tr>
                  <tr class="">
                    <td data-label="Logic" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e333 ">Value</td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d63870e336 ">Specific value to assess the field. For text fields, select one or
                      multiple values. For numeric fields, enter a value. For date fields, use the
                      calendar to select a date.</td>

                  </tr>
                </tbody>
              </table>
4. Set Goal
    
    Select a business problem that you want to solve. Examine the key performance indicators (KPIs) you want to improve. Explore which candidate KPIs can benefit the most from deploying an AI-powered solution.
    
    1. Select the field that you want to predict values for. Decide which outcome variable you want to explore, and at what granularity. The outcome variable can be a KPI value (such as revenue, discount, cost measure, or duration) or other quantifiable outcome. You can also use categories (text fields) with two values (binary) as an outcome variable.
    2. Choose whether to maximize or minimize your goal. Model Builder builds and trains a model to optimize the outcome variable accordingly. For example, you can maximize net margin or minimize customer churn.
    
    ![Step 4 set goal of the target or outcome for the model](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_set_goal.png)
5. Prepare Data
    
    Select what fields to include as the model's variables. Make sure that the variables are relevant to the prediction outcome you want. Refine data to provide better results by using variables that are accurate, complete, and representative of real-world business operations in terms of volume and diversity. Don’t use fields that contain sensitive data or personally identifiable information (PII).
    
    Some fields that are available when you select a data source might not be available as model variables during data preparation. Model Builder automatically reviews the fields in your data and can exclude fields that aren't suitable for model training.
    
    A field can be excluded for these reasons:
    
    - **Constant values:** Fields with the same value (no variation), or that are entirely empty, are excluded because they don't provide useful predictive information.
    - **Missing values:** Fields with a high proportion of missing values can be excluded.
    - **No data available:** This can occur if data hasn't finished populating, such as when a data transform is still running. Fields with no data are excluded.
    - **Identifier fields:** Fields whose values are mostly unique, such as customer IDs, record IDs, email addresses, URLs, or phone numbers. These fields are excluded because they don't provide useful predictive information.
    - **Free-text fields:** Text fields that can't be converted into model variables, such as unstructured notes, can be excluded.
    - **High-cardinality fields:** Text or categorical fields in which most values are distinct can be excluded because they can behave like identifiers.
    - **Low variance:** Numeric fields with little variation can be excluded.
    - **Redundant fields:** Duplicate or highly correlated fields can be excluded when they provide little additional information.
    - **Aggregate fields:** Aggregate fields aren't supported as model variables. As a result, they’re unavailable during data preparation.
    
    The number of fields and filtering depend on the training mode. Standard supports fewer fields, while Autopilot supports more candidate fields and performs automated variable selection.
    
    ![Step 5 prepare data to select which fields or variables to include](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_prepare_variables.png)
6. Select Algorithm
    
    The algorithm is the approach, or the computational procedure, the model uses to learn from the data and make predictions. You can also turn on **Automatic Selection**, so Model Builder can automatically select an algorithm with the highest impact on your prediction and use case.
    
    1. Choose the algorithm for your model.
        
        ![Step 6 to select algorithm from three options](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_select_a_algorithm.png)
        
         
        | Algorithm | Description |
        | --- | --- |
        | **GLM** | Default. Generalized Linear Model (GLM) is an equation-based algorithm that typically completes quickly. It works best when the relationship between the variables and the outcome is relatively simple. Only GLM can produce explanations based on the interaction between variables, such as the combined impact of region and month together. |
        | **GBM** | Gradient Boosting Machine (GBM), is a tree-based algorithm where the decision trees are built sequentially to better fit the data. It handles data complexity such as different relationships between variables and varied data distributions better, compared to GLM. |
        | **XGBoost** | Extreme Gradient Boosting (XGBoost), is an extension of GBM that’s optimized for efficiency. It's a tree-based algorithm where groups of decision trees are built sequentially to better fit the data, while avoiding overfitting. |
7. Review and Train
    
    Train your model after reviewing the details.
    
    ![Final step 7 to save and train showing a summary of selections made in the previous steps](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_review_and_train1.png)
    
    1. Review the details of the model. Optionally, click the pencil icon to edit a step.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_note.png)
        
        Note
        
        You can edit all steps when creating a model. After you create the model, you can't edit steps such as: Choose Type, Select Data, and Set Goal.
    2. Click **Save** to enter a name and an optional description for your model, and click **Save & Train** to create the model.
        
        ![Name and train model](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/c360_a_ai_ec_review_and_train2.png)

Model Builder analyzes your data and trains the model based on your settings. Model creation takes time, and you can track its progress as it builds.

After the model is created, you can find it in the Predict section in AI Models. See [AI Models Home](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_mm_manage_models.htm&type=5&language=en_US).

- **[Address Data Issues](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_ec_common_data_issues.htm&release=264.0.0&type=5)**  
    Handle common issues that you can encounter when you prepare data for model building and after you train a model.
- **[Apply Transformations to Your Data](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_ec_use_transformations.htm&release=264.0.0&type=5)**  
    Transform modeling data to improve the reliability, accuracy, and explainability of predictions. For models created from scratch, Model Builder automatically transforms unstructured text and replaces missing data. You can also manually transform variables in binary or regression models.