Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
save_weights [2011/07/31 20:21]
hermann created
save_weights [2026/08/28 03:32] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Save Weights ====== ​+====== Save Weights ======
  
 ===== Description ===== ===== Description =====
  
-This functor saves the coefficients or ranges of Weights of Evidence ​into a file.+Saves Weights of Evidence ​coefficients or ranges to a file. The file format is determined automatically from the filename'​s extension.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-weights ​ | [[Weights Type|Weights]]  | Coefficients or ranges of Weights of Evidence to be saved into a file.  | +Weights ​ | [[Weights Type]] ​ | Weights of Evidence ​coefficients or ranges ​to save.  | 
-| Filename ​ | [[Table Filename Type|Table Filename]]  | Name of the file where the coefficients or ranges of Weights of Evidence will be savedThe file name and its path must be specified. Dinamica automatically determines ​the file format from a selected file extension.  |+| Filename ​ | [[Weights ​Filename Type]] ​ | Name and path of the file to saveIf no path is given, ​the file is located relative to the model script.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Suffix Digits ​ | [[Non Negative ​Int Type|Non Negative Int]]  | Number of digits used in the file name suffix ​to represent ​model step. If the number of digits is not sufficient to represent the current step, the functor automatically adds more digits. If the number of digits is equal to zero, Dinamica does not include a suffix ​in the file name.  | 2  | +| Suffix Digits ​ | [[Non Negative ​Integer Value Type]] ​ | Number of digits used to render Step as filename suffix. If Step needs more digits ​than this, it is used unmodified. If zero, no suffix ​is added. This is an advanced port.  | 2  | 
-| Step  | [[Non Negative ​Int Type|Non Negative Int]]  | Model step that produced ​the file.  | None  | +| Step  | [[Non Negative ​Integer Value Type]] ​ | Current ​step or model iteration, appended to Filename as a numeric suffix; automatically bound to the innermost compatible container. This is an advanced port.  | .none  | 
-| Workdir ​ | [[Workdir Type|Workdir]]  | Workdir ​folder ​path.  | None  |+| Workdir ​ | [[Workdir Type]] ​ | Work directory Filename is relative to; may be a folder ​or a Zip archive. When not bound, the directory containing the script is used. This is an advanced port.  | .none  |
  
 ===== Outputs ===== ===== Outputs =====
 +
 +None.
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#​Input/​Output | Input/​Output]]+[[Functor List#Input / Output | Input / Output]] 
 + 
 +===== Notes ===== 
 + 
 +Two file formats are supported: the legacy DCF/TXT format, and CSV. In CSV format, the coefficients or ranges are represented as a table in the format "​From*:​real,​ To*:real, Variable*:​string,​ Range_Lower_Limit*:​real,​ Range_Upper_Limit*:​real,​ Weight:​real"​ (the Range_Upper_Limit column is optional). 
 + 
 +If Step is .none, the saved filename has no numeric suffix.
  
-===== Internal Name ===== +===== Internal Name =====
  
 SaveWeights SaveWeights