Make association rules of a certain template - associations

I got an exampleset with polinominal data and i want to create association rules with it. I do i by converting the polinominal atributes into binominal attributes using "Nominal to Binominal" then send it to "FP-Growth" and send the result to "Create Association Rules".
Lets say the attributes of the exampleSet are : attr1, attr2, attr3, attr4, attr5.
What i want to do is make sure that the association rules can only be:
premise: some value from attr1 and attr2 and attr3 and attr4
conclusion: some value from attr5
Any idea how to do that?

It's possible to write the association rules to an XML file using the Write operator. You could then perhaps transform the XML using the Process Xslt operator (contained in the text processing extension) to include only what you needed. It would be quite a complicated process.

Related

PeopleCode to load from CSV file and split 1 field into multiple columns

I am not familiar with Application Engine or PeopleCode but inherited this project when someone left. Seems simple but I'm not sure how to approach it.
I have to load a CSV file that has 5 fields. The last field has multiple values separated by a comma and it is qualified with quotes.
file example:
ID , YEAR, VALUE1 , VALUE2, CODE
87778, 2022, processed, none , 100,40
93332, 2022, processed, none , 60
76633, 2022, error , none , 55,35,9
I have created a File Layout definition and set the qualifier and I can load the file into a staging table but now I want to split the last column (CODE) into individual codes.
I have created 2 PeopleTools Record definitions with a parent/child relationship:
parent Record definition with ID,YEAR,VALUE1,VALUE2, and
child Record definition with ID,YEAR,CODE
I have found that I can use the PeopleCode split function to break the CODE column out into an array containing each value in an element. I'm not sure what the best way to structure the program is though.
Is the staging table necessary?
Or can I use the split function as I read the CSV file in and update the parent/child tables?
Or do I need to keep the staging table and then read out the fields for the parent record and move them to the permanent table and then do the same for the child after using the split function and then loop through the array?
Just looking for some guidance so my first AE project is not a mess.
IMO, there are always multiple ways to achieve the same thing(especially in AE). we choose one based on our requirements and efficiency.
for staging table: In your case, you can ignore the staging table unless you are expecting to load a huge set of data every time or want to do parallel processing. In other words, you can have staging table if you think loading takes a lot of time and you don't want to risk failing that due to other errors.
You can even achieve this whole thing in one peoplecode action without a staging table.
or,
Load the data into staging table and commit.
loop through the data from staging table in AE (having the data in state rec)
Do the transformation as required using peoplecode action
insert data in necessary tables
update status(have a field in staging table) field in staging table, this may come in handy for any analysis/issue in production

BizTalk routing messages in message box based on field value

I have an exercise I'm working to complete; previously it was de-batching multiple XML messages from one file into individual files. Then I had to route individual files based on a field value which had been promoted using filters on a port. Now the exercise has evolved into taking a multi record XML file, breaking it down to individual XML records, and routing their output to different folders based on a value in one of the fields. The hurdles are as follow:
I can't promote a repeating field such as the one I have to use to sort the outbound messages
The value of the field is a system.int32; I am sorting on a "equal to or more than 900" and "less than 900" so I need the int type.
Beyond simple "idNUm >= 900" I am in over my head with the necessary expression(s).
I have the basic orchestration design down, I am just lacking the expressions. The node I am looking to validate against is IDNum, and occurs in each record.
UPDATE: Still not working
I put in the following in my expression: IDNumDefined.Customer.IDNum >= 900
and I get "identifier Customer does not exist in "IDNumDefined"; are you missing an assembly reference?" and "unexpected token '>=' "
Ideas? (sorry about not updating question here)
The debatching has to occur using an Envelope and Body schema.
Once you have this figured out, the debatching can occur using a simple XML disassembler. In the body schema you can quick promote your idNum field by associating a PropertySchema with it.
Once this is taken care of, it is easy to use 2 send ports in order to set your filter subscription(s).

XML for Analysis (XML/A) format of member names?

I have two different XML/A providers, Mondrian and icCube. The tuples for a time dimension contain the unique name for the member, but the format of the member name is different:
Mondrian:
<UName>[Time].[2004].[QTR2].[Apr]</UName>
<Caption>Apr</Caption>
[Time] is the name of the hierarchy
[2004] is the name of the ancestor at the Year level
[QTR2] is the name of the ancestor at the Quarter level
[Apr] is the local name of the member at the Month level
icCube:
<UName>[Time].[Calendar].[Month].&[Jun 2010]</UName>
<Caption>Jun 2010</Caption>
[Time] is the name of the dimension
[Calendar] is the the name of the
hierarchy
[Month] is the name of the level
[Jun 2010] is the name of
the month member.
(I don't know why the ampersands are there)
My question is, is there any recommended, preferably standard way to figure out how the member names are formatted?
The reason I want to know this is when I render the result in a Pivot table, the captions for the members will usually end up as labels on the headers of the pivot table. But since the captions may not be unique, it is desirable to also produce labels of the "ancestor" members, because together they do identify the member uniquely.
In my example, I could use the parts of the member unique name to do this, but in ic cube not,since the member u name is structured differently.
I have 2 questions:
1) How can I tell beforehand what format the XML/A provider will use to identify the members?
2) What would be the recommended way in ic cube to produce the labels for the ancestor members?
UPDATE:
Luc Boudreau informed me that the ampersand indicates "key notation" - it designates the member key rather than its name. Thanks Luc!
The meaning of unique names in MDX is a string that guarantees that it defines a unique MDX entity when parsed. There is no possible collision with another MDX entity. The way to write it depends on the XMLA provider. Even though it's 'unique' there are multiple ways creating it, each server chooses its way.
Never mind, a query written in one server will work in another as both 'unique' names are correctly parsed.
& amp; stands for &
Our advise, the client code should not rely on the format of the unique names.
That being said, if you need parent "names", you should retrieve them explicitly using the "Parent" function and/or as a calculated measure retrieving the name/caption property.
Hope that helps.

What is appendNormTransformer in the Symfony FormBuilder?

What is appendNormTransformer in the Symfony FormBuilder? When should I use this instead of appendClientTransformer and prependClientTransformer
Taken from the class documentation block of Form.php:
To implement your own form fields, you need to have a thorough understanding
of the data flow within a form field. A form field stores its data in three
different representations:
(1) the format required by the form's object
(2) a normalized format for internal processing
(3) the format used for display
A date field, for example, may store a date as "Y-m-d" string (1) in the
object. To facilitate processing in the field, this value is normalized
to a DateTime object (2). In the HTML representation of your form, a
localized string (3) is presented to and modified by the user.
So (1) is the app data, (2) is the normalized data and (3) is the client data.
Now, for your question, it depends which data would like to transform. If is the client data you need to transform (from (2) to (3)), then you should use appendClientTransformer or prependClientTransformer.
On the opposite, if you would like to change the normalized data (from (1) to (2)), then you should use appendNormTransformer or prependNormTransformer.
So, normalization transformer sits between (1) and (2) ((1) normalizeTransformer -> (2)). And client transformer sits between (2) and (3) ((2) clientTransformer -> (3))
Also, note that append and prepend methods ([append|prepend][Norm|Client]Transformer) will potentially be replaced by a add methods (add[Norm|Client]Transformer) in Symfony 2.1, see this pull request on GitHub for more information.
Hope this helps,
Matt

how to getBy multi fields using LCDS

I am new to Flex. In my project, I use LCDS to define a holiday table which contain holidayId, countryCode and companyCode. LCDS generated all the getBy which are very handy. However, I need to get the records which are having countryCode = US AND companyCode = ABC. Surely I cannot use any of those generated getBy (each of them deals with a single field only). Can you suggest me how to modify the code in generated services (in my case, it is _Super_HolidayService.as) to handle multi-key data retrieval or point me to the right direction. Thanks.
Assuming that you're using LiveCycle's Model Driven Development, the solution is to add a filter to your Holiday entity. For example, you could add the following to the source of your Data Model (inside of your Holiday entity):
<filter name="getByCountryAndCompany" criteria="countryCode eq, companyCode eq"/>
This will create a getByCountryAndCompany method in your HolidayService that will query based on a match of both countryCode and companyCode.
Please see Adobe's Application Modeling Reference here http://tinyurl.com/7ras5yk for more information on the "filter" tag and its syntax.

Resources