-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmodel.xml
More file actions
118 lines (114 loc) · 5.74 KB
/
model.xml
File metadata and controls
118 lines (114 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<project name='project_01' pubsub='auto' threads='1' use-tagged-token='true'>
<description>
This project is a basic demonstration of using a Model Reader window to facilitate the scoring
of an input data set using a pre-trained ASTORE model. A Model Reader window receives request
events that include the location and type of an offline analytics store (ASTORE) model, and
publishes a model event that contains the ASTORE model to a Score window. It should be noted
that the request the Model Reader window will receive can either come from a preceding Source
window, or can be specified in the schema of the Model Reader window itself. For this example,
the request is specified within the schema of the Model Reader window.
In this example, the ASTORE model RPCA.sasast is a Robust Principal Components Analysis (RPCA)
ASTORE that was created using CAS.
This project contains a single continuous query consisting of the following:
1. A Source window, called w_data, that receives the input data set to be analyzed
2. A Model Reader window, called w_reader, which receives request events that include the
location and type of an offline analytics store (ASTORE) model, and publishes a model
event that contains the ASTORE to a score window
3. A Score window, called w_score, which uses the model it receives from the Model Reader
window to perform scoring on the input data set
</description>
<contqueries>
<contquery name='cq_01' trace='w_score1'>
<windows>
<window-source name='w_data' insert-only='true' autogen-key='false' index='pi_EMPTY'>
<description>
This source window receives the included example input data file via a file socket connector.
The input data stream is placed into nine fields for each observation, as specified in the
schema-string for this window.
</description>
<schema-string>State:string,M:double,RA:double,RO:double,A:double,B:double,L:double,AT:double,index1*:int32</schema-string>
<connectors>
<connector class='fs' name='pub'>
<properties>
<property name='type'>pub</property>
<property name='fstype'>csv</property>
<property name='fsname'>input.csv</property>
<property name='transactional'>true</property>
<property name='blocksize'>1</property>
<property name='header'>1</property>
<property name="addcsvopcode">true</property>
<property name="addcsvflags">normal</property>
</properties>
</connector>
</connectors>
</window-source>
<window-model-reader name='w_reader' model-type='astore'>
<description>
This Model Reader window receives request events that include the location and type of an
offline analytic store (ASTORE) model. If publishes a model event that contains the ASTORE
model to a Score window.
</description>
<parameters>
<properties>
<property name='action'>load</property>
<property name='type'>astore</property>
<property name='reference'>RPCA.sasast</property>
<property name='RPCA_PROJECTION_TYPE'>0</property>
</properties>
</parameters>
</window-model-reader>
<window-score name='w_score1'>
<description>
This scoring window applies the Robust Principal Components Analysis (RPCA) model contained
in the ASTORE model RPCA.sasast to perform scoring on the input data set. The resulting output
is then written to the file result.out via a file socket connector.
</description>
<schema>
<fields>
<field name='State' type='string' key='true'/>
<field name='L' type='double' />
<field name='Prin1' type='double' />
<field name='Prin2' type='double' />
</fields>
</schema>
<models>
<offline model-type='astore'>
<input-map>
<properties>
<property name='M'>M</property>
<property name='RA'>RA</property>
<property name='RO'>RO</property>
<property name='L'>L</property>
<property name='State'>State</property>
</properties>
</input-map>
<output-map>
<properties>
<property name='L'>L</property>
<property name='State'>State</property>
<property name='Prin1'>Prin1</property>
<property name='Prin2'>Prin2</property>
</properties>
</output-map>
</offline>
</models>
<connectors>
<connector class='fs' name='sub'>
<properties>
<property name='type'>sub</property>
<property name='fstype'>csv</property>
<property name='fsname'>result.out</property>
<property name='snapshot'>true</property>
<property name='header'>true</property>
</properties>
</connector>
</connectors>
</window-score>
</windows>
<edges>
<edge source='w_data' target='w_score1' role='data'/>
<edge source='w_reader' target='w_score1' role='model'/>
</edges>
</contquery>
</contqueries>
</project>