/
MLModelInstance.xml
840 lines (742 loc) · 49.4 KB
/
MLModelInstance.xml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
<?xml version="1.0" encoding="utf-8"?>
<Pattern xmlns="http://schemas.genexus.com/Patterns/InstanceSpecification/v1.0"
Name="MLModel"
Version="0.4"
RootElement="model"
RootType="Model">
<ElementTypes>
<ElementType Name="Model"
Caption="Machine Learning Model Instance"
Icon=""
Multiple="false">
<ChildrenElements>
<ChildElement Name="inputs"
ElementType="Inputs"
Multiple="false" />
<ChildElement Name="layers"
ElementType="Layers"
Multiple="false" />
<ChildElement Name="output"
ElementType="Output"
Multiple="false" />
</ChildrenElements>
</ElementType>
<ElementType Name="Inputs"
Caption="Inputs"
Icon="Input"
IconResource="GeneXus.Patterns.MLModel.Resources.Images,GeneXus.Patterns.MLModel">
<ChildrenElements>
<ChildElement Name="input"
ElementType="Input"
Multiple="true" />
</ChildrenElements>
</ElementType>
<ElementType Name="Input"
Caption="{0} ({1})"
CaptionParameters="attribute;columnType"
Icon="ObjectAttribute"
IconResource="GeneXus.Patterns.MLModel.Resources.Images,GeneXus.Patterns.MLModel">
<Attributes>
<Attribute Name="attribute"
Type="reference(Attribute)"
Description="Attribute name" />
<Attribute Name="columnType"
Type="enum{Boolean;Numeric;Category;Text;Audio;Image;Video;Datetime;Geopoint;Region;Vector;Set}"
DefaultValue="Numeric"
PrettyName="Data Input Type"
Description="Attribute data input type." />
<!-- Pre-General properties -->
<Attribute Name="elementType"
Type="enum{Numerics;Characters}"
DefaultValue="Numerics"
Description="Element type."
ApplyIf="//input[@columnType = 'Category' or @columnType = 'Vector' or @columnType = 'Set']"
VisibleIf="self::*[@columnType = 'Category' or @columnType = 'Vector' or @columnType = 'Set']"/>
<Attribute Name="missingValueStrategyNumeric"
Type="enum{Fill with constant;Fill with mean;Fill with mode;Fill with max;Fill with min;Fill with last;Fill with random;Ignore}"
DefaultValue="Fill with constant"
PrettyName="Missing Value Strategy"
Description="Strategy to be applied when the value is missing."
ApplyIf="//input[@columnType = 'Numeric' or (@columnType = 'Category' and @elementType = 'Numerics')]"
VisibleIf="self::*[@columnType = 'Numeric' or (@columnType = 'Category' and @elementType = 'Numerics')]"/>
<Attribute Name="missingValueStrategy"
Type="enum{Fill with constant;Fill with mean;Fill with mode;Fill with last;Fill with random;Ignore}"
DefaultValue="Fill with constant"
PrettyName="Missing Value Strategy"
Description="Strategy to be applied when the value is missing."
ApplyIf="//input[@columnType = 'Boolean' or (@columnType = 'Category' and @elementType != 'Numerics') or @columnType = 'Text' or @columnType = 'Datetime' or @columnType = 'Geopoint']"
VisibleIf="self::*[@columnType = 'Boolean' or (@columnType = 'Category' and @elementType != 'Numerics') or @columnType = 'Text' or @columnType = 'Datetime' or @columnType = 'Geopoint']"/>
<!-- Boolean type -->
<Attribute Name="fillValueBoolean"
Type="bool"
DefaultValue="false"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and @columnType = 'Boolean']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and @columnType = 'Boolean']"/>
<!-- Numeric type -->
<Attribute Name="fillValueNumeric"
Type="decimal"
DefaultValue="0.0"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Numeric']"
ApplyIf="//input[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Numeric']"/>
<!-- Category type -->
<Attribute Name="fillValueCategoryNumerics"
Type="decimal"
DefaultValue="0.0"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Numerics']"
ApplyIf="//input[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Numerics']"/>
<Attribute Name="fillValueCategoryCharacters"
Type="string"
DefaultValue="<UNK>"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Characters']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Characters']"/>
<Attribute Name="mostCommonCategory"
Type="int"
DefaultValue="10000"
Description="Defines the maximum number of most common categories to be considered. If data contains more than this amount, the most infrequent categories are treated as unknown."
PrettyName="Most Common"
VisibleIf="self::*[@columnType = 'Category']"
ApplyIf="//input[@columnType = 'Category']"/>
<!-- Text type -->
<Attribute Name="fillValueText"
Type="string"
DefaultValue="<EOS>"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and @columnType = 'Text']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and @columnType = 'Text']"/>
<Attribute Name="removeDiacriticsText"
Type="bool"
DefaultValue="True"
PrettyName="Remove Diacritics"
Description="Indicates if the value has to remove diacritics (e.g. accented characters)."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="stopwordsFileText"
Type="reference(File)"
DefaultValue="False"
PrettyName="Stopwords File"
Description="References a File object containing a list of stopwords to be filtered."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="maxCharactersText"
Type="string"
DefaultValue="1024"
PrettyName="Max Characters"
Description="Defines the maximum lenght in terms of characters. Longer values will be truncated, while shorter values will be padded."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="characterPaddingDirectionText"
Type="enum{Left;Right}"
DefaultValue="Left"
PrettyName="Character Padding Direction"
Description="Indicates the direction of the padding in terms of characters."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="characterPaddingSymbolText"
Type="string"
DefaultValue="<CHR>"
PrettyName="Character Padding Symbol"
Description="Defines the character token used as padding symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="maxWordsText"
Type="int"
DefaultValue="256"
PrettyName="Max Words"
Description="Defines the maximum lenght in terms of words. Longer values will be truncated, while shorter values will be padded."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="wordPaddingDirectionText"
Type="enum{Left;Right}"
DefaultValue="Left"
PrettyName="Word Padding"
Description="Indicates the direction of the padding in terms of words."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="wordPaddingSymbolText"
Type="string"
DefaultValue="<WRD>"
PrettyName="Word Padding Symbol"
Description="Defines the word token used as a padding symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="mostCommonText"
Type="int"
DefaultValue="20000"
Description="Defines the maximum number of most common words to be considered (in terms of frequency). If data contains more than this amount, the most infrequent words are treated as unknown."
PrettyName="Most Common"
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="unknownSymbolText"
Type="string"
DefaultValue="<UNK>"
PrettyName="Unknown Symbol"
Description="Defines the token used as an unknown symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<Attribute Name="tokenizerText"
Type="enum{Space and Punctuation;Space;Punctuation;Underscore;Comma}"
DefaultValue="Space"
PrettyName="Tokenizer"
Description="Defines the criteria used for spliting the value into a sequence of tokens."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//input[@columnType = 'Text']"/>
<!-- Audio/Video data -->
<Attribute Name="formatAudio"
Type="enum{Default;MP3;OGG;WAV;PCM;MULAW;LINEAR16}"
DefaultValue="Default"
Description="Desired format."
PrettyName="Format"
VisibleIf="self::*[@columnType = 'Audio']"
ApplyIf="//input[@columnType = 'Audio']"/>
<Attribute Name="maxDurationMedia"
Type="int"
DefaultValue="0"
Description="Defines the maximum duration in milliseconds (ms). A value of '0' indicates to use the full length."
PrettyName="Max Duration"
VisibleIf="self::*[@columnType = 'Audio' or @columnType = 'Video']"
ApplyIf="//input[@columnType = 'Audio' or @columnType = 'Video']"/>
<Attribute Name="tracksAudio"
Type="enum{Default;1 (Mono);2 (Stereo)}"
DefaultValue="Default"
Description="Defines the maximum tracks channles to be considered."
PrettyName="Track Channels"
VisibleIf="self::*[@columnType = 'Audio']"
ApplyIf="//input[@columnType = 'Audio']"/>
<Attribute Name="sampleRateMedia"
Type="int"
DefaultValue="22050"
Description="Defines the sample rate in Hertz (Hz)."
PrettyName="Sample Rate"
VisibleIf="self::*[@columnType = 'Audio']"
ApplyIf="//input[@columnType = 'Audio']"/>
<!-- Image/Video data -->
<Attribute Name="formatImage"
Type="enum{Default;PNG;JPEG;BMP}"
DefaultValue="Default"
Description="Desired format."
PrettyName="Format"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"/>
<Attribute Name="scaleTypeMedia"
Type="enum{No scale;Fit;Fill;Fill keeping aspect ratio}"
DefaultValue="No scale"
Description="Defines the scaling strategy used to achieve the desired width and height."
PrettyName="Scale Type"
VisibleIf="self::*[@columnType = 'Image' or @columnType = 'Video']"
ApplyIf="//input[@columnType = 'Image' or @columnType = 'Video']"/>
<Attribute Name="widthMedia"
Type="int"
DefaultValue="0"
Description="Defines the width in pixels (px). A value of 0 means to preserve the width."
PrettyName="Width"
VisibleIf="self::*[@columnType = 'Image' or @columnType = 'Video']"
ApplyIf="//input[@columnType = 'Image' or @columnType = 'Video']"/>
<Attribute Name="heightMedia"
Type="int"
DefaultValue="0"
Description="Defines the height in pixels (px). A value of 0 means to preserve the height."
PrettyName="Height"
VisibleIf="self::*[@columnType = 'Image' or @columnType = 'Video']"
ApplyIf="//input[@columnType = 'Image' or @columnType = 'Video']"/>
<Attribute Name="channelsImage"
Type="enum{Default;1 (Grayscaled);3 (RGB, HSV w/transparency);4 (CMYK)}"
DefaultValue="Default"
Description="Defines the maximum color channels."
PrettyName="Color Channels"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"/>
<Attribute Name="addHFlipImage"
Type="bool"
DefaultValue="True"
Description="Adds a horizontally flipped copy of the image to the trainig data set."
PrettyName="Add Horizontally Flipped"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<Attribute Name="addRotated"
Type="string"
DefaultValue="30,-30"
Description="List of rotation angles to apply to the image (comman separated). For each specified rotation angle, a new image will be generated and added to the training set."
PrettyName="Add Vertically Flipped"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<Attribute Name="addVFlipImage"
Type="bool"
DefaultValue="True"
Description="Adds a vertically flipped copy of the image to the trainig data set"
PrettyName="Add Vertically Flipped"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<Attribute Name="addDecolored"
Type="bool"
DefaultValue="True"
Description="Adds a decolorated copy of the image to the trainig data set"
PrettyName="Add Decolored"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<Attribute Name="addDetextured"
Type="bool"
DefaultValue="True"
Description="Adds a detextured copy of the image to the trainig data set"
PrettyName="Add Detextured"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<Attribute Name="addEdgeSalient"
Type="bool"
DefaultValue="True"
Description="Adds an edge salient copy of the image to the trainig data set"
PrettyName="Add Edge Salient"
VisibleIf="self::*[@columnType = 'Image']"
ApplyIf="//input[@columnType = 'Image']"
/>
<!-- Video data -->
<Attribute Name="formatVideo"
Type="enum{Default;MP4;AVI}"
DefaultValue="Default"
Description="Desired format."
PrettyName="Format"
VisibleIf="self::*[@columnType = 'Video']"
ApplyIf="//input[@columnType = 'Video']"/>
<!-- Datetime data -->
<Attribute Name="fillValueDatetime"
Type="string"
DefaultValue="01/01/0001"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and @columnType = 'Datetime']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and @columnType = 'Datetime']"/>
<Attribute Name="datetimeFormatDatetime"
Type="enum{UNIX epoch;Date only;Time only;Date and Time}"
DefaultValue="Date and Time"
Description="Desired format."
PrettyName="Format"
VisibleIf="self::*[@columnType = 'Datetime']"
ApplyIf="//input[@columnType = 'Datetime']"/>
<Attribute Name="dateFormatDatetime"
Type="enum{Default;Year with two digits;Year with four digits}"
DefaultValue="Default"
Description="Desired date format."
PrettyName="Date Format"
VisibleIf="self::*[@columnType = 'Datetime' and @datetimeFormatDatetime != 'UNIX epoch' and @datetimeFormatDatetime != 'Time only']"
ApplyIf="//input[@columnType = 'Datetime' and @datetimeFormatDatetime != 'UNIX epoch' and @datetimeFormatDatetime != 'Time only']"/>
<Attribute Name="timeFormatDatetime"
Type="enum{Default;Hours and Minutes;Hours, Minutes and Seconds;Hours, Minutes, Seconds and Milliseconds}"
DefaultValue="Default"
Description="Desired time format."
PrettyName="Time Format"
VisibleIf="self::*[@columnType = 'Datetime' and @datetimeFormatDatetime != 'UNIX epoch' and @datetimeFormatDatetime != 'Date only']"
ApplyIf="//input[@columnType = 'Datetime' and @datetimeFormatDatetime != 'UNIX epoch' and @datetimeFormatDatetime != 'Date only']"/>
<!-- Geopoint data -->
<Attribute Name="fillValueGeopoint"
Type="string"
DefaultValue="0.00,0.00"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and @columnType = 'Geopoint']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and @columnType = 'Geopoint']"/>
<Attribute Name="formatGeopoint"
Type="enum{Longitude,Latitude;GeoHash;H3 (Hexagonal Hierarchical Spatial Index)}"
DefaultValue="Longitude,Latitude"
PrettyName="Format"
Description="Desired format."
VisibleIf="self::*[@columnType = 'Geopoint']"
ApplyIf="//input[@columnType = 'Geopoint']"/>
<!-- Region data -->
<Attribute Name="formatRegion"
Type="enum{(Top,Left,Width,Height);(Top,Left,Bottom,Right)}"
DefaultValue="(Top,Left,Width,Height)"
PrettyName="Format"
Description="Desired format."
VisibleIf="self::*[@columnType = 'Region']"
ApplyIf="//input[@columnType = 'Region']"
/>
<Attribute Name="separatorRegion"
Type="enum{Comma;Whitespace}"
DefaultValue="Comma"
PrettyName="Separator"
Description="Separator to use between values."
VisibleIf="self::*[@columnType = 'Region']"
ApplyIf="//input[@columnType = 'Region']"
/>
<Attribute Name="separatorVectorOrSet"
Type="enum{Comma;Semicolon;Whitespace}"
DefaultValue="Comma"
PrettyName="Separator"
Description="Defines the element separator in the collection."
VisibleIf="self::*[@columnType = 'Vector' or @columnType = 'Set']"
ApplyIf="//input[@columnType = 'Vector' or @columnType = 'Set']"/>
<Attribute Name="sizeVectorOrSet"
Type="int"
DefaultValue="10000"
PrettyName="Max Elements"
Description="Defines the number of elements in the collection. Longer values will be truncated, while shorter values will be right padded."
VisibleIf="self::*[@columnType = 'Vector' or @columnType = 'Set']"
ApplyIf="//input[@columnType = 'Vector' or @columnType = 'Set']"/>
<Attribute Name="paddingSymbolVectorOrSetCategories"
Type="string"
DefaultValue="<UNK>"
PrettyName="Right Padding Symbol"
Description="Defines a constant value to be padded with when collection has less elements than the size specified."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and (@columnType = 'Vector'or @columnType = 'Set') and @elementType = 'Characters']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and (@columnType = 'Vector'or @columnType = 'Set') and @elementType = 'Characters']"/>
<Attribute Name="paddingSymbolVectorOrSetNumerics"
Type="decimal"
DefaultValue="0.0"
PrettyName="Right Padding Symbol"
Description="Defines a constant value to be padded with when collection has less elements than the size specified."
VisibleIf="self::*[@missingValueStrategy = 'Fill with constant' and (@columnType = 'Vector'or @columnType = 'Set') and @elementType = 'Numerics']"
ApplyIf="//input[@missingValueStrategy = 'Fill with constant' and (@columnType = 'Vector'or @columnType = 'Set') and @elementType = 'Numerics']"/>
<!-- Post-General properties -->
<Attribute Name="lowercaseCharacters"
Type="bool"
DefaultValue="True"
PrettyName="Lowercase"
Description="Indicates if the value has to be lowercased before training."
VisibleIf="self::*[@columnType = 'Text' or ((@columnType = 'Category' or @columnType = 'Vector' or @columnType = 'Set') and @elementType = 'Characters')]"
ApplyIf="//input[@columnType = 'Text' or ((@columnType = 'Category' or @columnType = 'Vector' or @columnType = 'Set') and @elementType = 'Characters')]"/>
<Attribute Name="bucketizeNumerics"
Type="enum{Round;Round To Even;Truncate}"
DefaultValue="Round"
Description="Indicate if decimal values must be transformed into integers."
PrettyName="Bucketize"
VisibleIf="self::*[@columnType = 'Category' and @elementType = 'Numerics']"
ApplyIf="//input[@columnType = 'Category' and @elementType = 'Numerics']"/>
<Attribute Name="normalizationNumeric"
Type="enum{Default;Scale to Z;Scale to [0,1];Scale to [MIN,MAX]}"
DefaultValue="Default"
Description="Defines the normalization strategy to be applied when vthe alue is treated as numerical."
PrettyName="Normalization Strategy"
VisibleIf="self::*[@columnType = 'Numeric']"
ApplyIf="//input[@columnType = 'Numeric']"/>
</Attributes>
</ElementType>
<ElementType Name="Output"
Caption="{0} ({1})"
CaptionParameters="attribute;columnType"
Icon="Output"
IconResource="GeneXus.Patterns.MLModel.Resources.Images,GeneXus.Patterns.MLModel">
<Attributes>
<Attribute Name="attribute"
Type="reference(Attribute)"
Description="Attribute Name" />
<Attribute Name="columnType"
Type="enum{Numeric;Category;Region;Text}"
DefaultValue="Numeric"
Description="Attribute data output type"
PrettyName="Data Output Type" />
<!-- General properties -->
<Attribute Name="inspectOutput"
Type="bool"
DefaultValue="false"
Description="Generate debug information during training."
Category="Training"/>
<!-- Numeric properties (same as inputs) -->
<Attribute Name="missingValueStrategyNumeric"
Type="enum{Fill with constant;Fill with mean;Fill with mode;Fill with max;Fill with min;Fill with last;Fill with random;Ignore}"
DefaultValue="Fill with constant"
PrettyName="Missing Value Strategy"
Description="Strategy to be applied when the value is missing."
ApplyIf="//output[@columnType = 'Numeric']"
VisibleIf="self::*[@columnType = 'Numeric']"/>
<Attribute Name="fillValueNumeric"
Type="decimal"
DefaultValue="0.0"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Numeric']"
ApplyIf="//output[@missingValueStrategyNumeric = 'Fill with constant' and @columnType = 'Numeric']"/>
<Attribute Name="normalizationNumeric"
Type="enum{Default;Scale to Z;Scale to [0,1];Scale to [MIN,MAX]}"
DefaultValue="Default"
Description="Defines the normalization strategy to be applied when vthe alue is treated as numerical."
PrettyName="Normalization Strategy"
VisibleIf="self::*[@columnType = 'Numeric']"
ApplyIf="//output[@columnType = 'Numeric']"/>
<!-- Numeric properties (output specific) -->
<Attribute Name="lossNumeric"
Type="enum{Mean Square Error;Mean Absolute Error}"
DefaultValue="Mean Square Error"
PrettyName="Loss"
Description="Defines the loss metric to be used by the optimizer during training."
Category="Training"
ApplyIf="//output[@columnType = 'Numeric']"
VisibleIf="self::*[@columnType = 'Numeric']"
/>
<!-- Category properties (same as inputs) -->
<Attribute Name="elementType"
Type="enum{Numerics;Characters}"
DefaultValue="Numerics"
Description="Attribute value type."
VisibleIf="self::*[@columnType = 'Category']"
ApplyIf="//output[@columnType = 'Category']"/>
<Attribute Name="missingValueStrategyCategoryNumerics"
Type="enum{Fill with constant;Fill with mean;Fill with mode;Fill with max;Fill with min;Fill with last;Fill with random;Ignore}"
DefaultValue="Fill with constant"
PrettyName="Missing Value Strategy"
Description="Strategy to be applied when the value is missing."
ApplyIf="//output[@columnType = 'Category' and @elementType = 'Numerics']"
VisibleIf="self::*[@columnType = 'Category' and @elementType = 'Numerics']"/>
<Attribute Name="fillValueCategoryNumerics"
Type="decimal"
DefaultValue="0.0"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategyCategoryNumerics = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Numerics']"
ApplyIf="//output[@missingValueStrategyCategoryNumerics = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Numerics']"/>
<Attribute Name="missingValueStrategyCategoryCharacters"
Type="enum{Fill with constant;Fill with mean;Fill with mode;Fill with last;Fill with random;Ignore}"
DefaultValue="Fill with constant"
PrettyName="Missing Value Strategy"
Description="Strategy to be applied when the value is missing."
ApplyIf="//output[@columnType = 'Category' and @elementType = 'Characters']"
VisibleIf="self::*[@columnType = 'Category' and @elementType = 'Characters']"/>
<Attribute Name="fillValueCategoryCharacters"
Type="string"
DefaultValue="<UNK>"
PrettyName="Fill Value"
Description="Defines a constant value to be filled with when the value is missing."
VisibleIf="self::*[@missingValueStrategyCategoryCharacters = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Characters']"
ApplyIf="//output[@missingValueStrategyCategoryCharacters = 'Fill with constant' and @columnType = 'Category' and @elementType = 'Characters']"/>
<Attribute Name="mostCommonCategory"
Type="int"
DefaultValue="10000"
Description="Defines the maximum number of most common words to be considered (in terms of frequency). If data contains more than this amount, the most infrequent words are treated as unknown."
PrettyName="Most Common"
VisibleIf="self::*[@columnType = 'Category']"
ApplyIf="//output[@columnType = 'Category']"/>
<Attribute Name="bucketizeCategoryNumerics"
Type="bool"
DefaultValue="false"
Description="Indicate if decimal values must be transformed into integers."
PrettyName="Bucketize"
VisibleIf="self::*[@columnType = 'Category' and @elementType = 'Numerics']"
ApplyIf="//output[@columnType = 'Category' and @elementType = 'Numerics']"/>
<!-- Category properties (output specific) -->
<Attribute Name="lossCategory"
Type="enum{Softmax Cross Entroy;Sampled Softmax Cross Entropy}"
DefaultValue="Softmax Cross Entroy"
PrettyName="Loss"
Description="Defines the loss metric to be used by the optimizer during training."
Category="Training"
ApplyIf="//output[@columnType = 'Category']"
VisibleIf="self::*[@columnType = 'Category']"
/>
<!-- Region properties (same as inputs) -->
<Attribute Name="formatRegion"
Type="enum{(Top,Left,Width,Height);(Top,Left,Bottom,Right)}"
DefaultValue="(Top,Left,Width,Height)"
PrettyName="Format"
Description="Desired format."
VisibleIf="self::*[@columnType = 'Region']"
ApplyIf="//output[@columnType = 'Region']"
/>
<Attribute Name="separatorRegion"
Type="enum{Comma;Whitespace}"
DefaultValue="Comma"
PrettyName="Separator"
Description="Separator to use between values."
VisibleIf="self::*[@columnType = 'Region']"
ApplyIf="//output[@columnType = 'Region']"
/>
<!-- Region properties (output specific) -->
<Attribute Name="lossRegion"
Type="enum{Softmax Cross Entroy;Sampled Softmax Cross Entropy}"
DefaultValue="Softmax Cross Entroy"
PrettyName="Loss"
Description="Defines the loss metric to be used by the optimizer during training."
Category="Training"
ApplyIf="//output[@columnType = 'Region']"
VisibleIf="self::*[@columnType = 'Region']"
/>
<!-- Text properties (same as inputs) -->
<Attribute Name="removeDiacriticsText"
Type="bool"
DefaultValue="True"
PrettyName="Remove Diacritics"
Description="Indicates if the value has to remove diacritics (e.g. accented characters)."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="stopwordsFileText"
Type="reference(File)"
DefaultValue="False"
PrettyName="Stopwords File"
Description="References a File object containing a list of stopwords to be filtered."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="maxCharactersText"
Type="int"
DefaultValue="1024"
PrettyName="Max Characters"
Description="Defines the maximum lenght in terms of characters. Longer values will be truncated, while shorter values will be padded."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="characterPaddingDirectionText"
Type="enum{Left;Right}"
DefaultValue="Left"
PrettyName="Character Padding Direction"
Description="Indicates the direction of the padding in terms of characters."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="characterPaddingSymbolText"
Type="string"
DefaultValue="<CHR>"
PrettyName="Character Padding Symbol"
Description="Defines the character token used as padding symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="maxWordsText"
Type="string"
DefaultValue="256"
PrettyName="Max Words"
Description="Defines the maximum lenght in terms of words. Longer values will be truncated, while shorter values will be padded."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="wordPaddingDirectionText"
Type="enum{Left;Right}"
DefaultValue="Left"
PrettyName="Word Padding"
Description="Indicates the direction of the padding in terms of words."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="wordPaddingSymbolText"
Type="string"
DefaultValue="<WRD>"
PrettyName="Word Padding Symbol"
Description="Defines the word token used as a padding symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="mostCommonText"
Type="int"
DefaultValue="20000"
Description="Defines the maximum number of most common words to be considered (in terms of frequency). If data contains more than this amount, the most infrequent words are treated as unknown."
PrettyName="Most Common"
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="unknownSymbolText"
Type="string"
DefaultValue="<UNK>"
PrettyName="Unknown Symbol"
Description="Defines the token used as an unknown symbol."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<Attribute Name="tokenizerText"
Type="enum{Space and Punctuation;Space;Punctuation;Underscore;Comma}"
DefaultValue="Space"
PrettyName="Tokenizer"
Description="Defines the criteria used for spliting the value into a sequence of tokens."
VisibleIf="self::*[@columnType = 'Text']"
ApplyIf="//output[@columnType = 'Text']"/>
<!-- Text properties (output specific) -->
<Attribute Name="lossText"
Type="enum{Softmax Cross Entroy;Sampled Softmax Cross Entropy}"
DefaultValue="Softmax Cross Entroy"
PrettyName="Loss"
Description="Defines the loss metric to be used by the optimizer during training."
Category="Training"
ApplyIf="//output[@columnType = 'Text']"
VisibleIf="self::*[@columnType = 'Text']"
/>
<Attribute Name="levelText"
Type="enum{Word;Character}"
DefaultValue="Word"
PrettyName="Level"
Description="Defines the text level."
Category="Training"
ApplyIf="//output[@columnType = 'Text']"
VisibleIf="self::*[@columnType = 'Text']"
/>
<!-- Post-General properties -->
<Attribute Name="lowercaseCharacters"
Type="bool"
DefaultValue="True"
PrettyName="Lowercase"
Description="Indicates if the value has to be lowercased before training."
VisibleIf="self::*[(@columnType = 'Category' and @elementType = 'Characters') or @columnType = 'Text']"
ApplyIf="//output[(@columnType = 'Category' and @elementType = 'Characters') or @columnType = 'Text']"/>
</Attributes>
</ElementType>
<ElementType Name="Layers"
Caption="Layers"
Icon="Model"
IconResource="GeneXus.Patterns.MLModel.Resources.Images,GeneXus.Patterns.MLModel">
<ChildrenElements>
<ChildElement Name="Layer"
ElementType="Layer"
Multiple="true" />
</ChildrenElements>
</ElementType>
<ElementType Name="Layer"
Caption="{0} ({1})"
CaptionParameters="name;layerType"
Icon="Layer"
IconResource="GeneXus.Patterns.MLModel.Resources.Images,GeneXus.Patterns.MLModel">
<Attributes>
<Attribute Name="layerType"
Type="enum{Convolutional;Fully Connected}"
DefaultValue="Fully Connected"
Description="Layer type">
</Attribute>
<Attribute Name="name"
Type="string"
DefaultValue=""
PrettyName="Name"
Description="The name for the layer">
</Attribute>
<Attribute Name="num_filters"
Type="int"
DefaultValue="32"
PrettyName="Number of filters"
Description="Number of filters for the Convolutional Layer"
ApplyIf="self::*[@layerType = 'Convolutional']">
</Attribute>
<Attribute Name="filter_size"
Type="int"
DefaultValue="3"
PrettyName="Filter size"
Description="Filter size for the Convolutional Layer"
ApplyIf="self::*[@layerType = 'Convolutional']">
</Attribute>
<Attribute Name="pool_size"
Type="int"
DefaultValue="2"
PrettyName="Pool size"
Description="Pool size for the Convolutional Layer"
ApplyIf="self::*[@layerType = 'Convolutional']">
</Attribute>
<Attribute Name="pool_stride"
Type="int"
DefaultValue="2"
PrettyName="Pool stride"
Description="Pool stride for the Convolutional Layer"
ApplyIf="self::*[@layerType = 'Convolutional']">
</Attribute>
<Attribute Name="num_units"
Type="int"
DefaultValue="128"
PrettyName="Number of units"
Description="Number of units in the Layer"
ApplyIf="self::*[@layerType = 'Fully Connected']">
</Attribute>
<Attribute Name="dropout"
Type="decimal"
DefaultValue="0.0"
PrettyName="Dropout"
Description="Dropout. Value must be between 0.0 and 1.0">
</Attribute>
</Attributes>
</ElementType>
</ElementTypes>
</Pattern>