LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 06-14-2014 06:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: lae_errors

    This post has been created for discussion of error code lae.brainscript.parameterTypeMismatch.

    Please reply to this thread with any description of error conditions, diagnostic information, and recommended resolutions.


  • 2.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 03-31-2015 12:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    I got this error when evaluating isNan() on a double. The error says it expects a boolean.


  • 3.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-15-2017 16:00

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tris_717684

    Hello team,

    I'm new to Lavastorm and encountered this error when using the Agg Ex node, per attached screenshot. Any help to resolve will be greatly appreciated!

    Regards,

    tris


  • 4.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-15-2017 16:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    I don't see any screenshot attached. TypeMismatch would likely mean your logic is not being consistent with a variable or field as the same type. For example, treating a field as a string and then you later have some logic later on to treat it as a number.


  • 5.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-16-2017 13:05

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tris_717684

    Thanks for the inputs @gmullin. I have tried doing a groupCount of an integer and had the same error. I hope the attachment works this time. Thank you!Agg Ex Node Error.JPG


  • 6.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-16-2017 13:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    groupCount() will just count the number of items in whatever you are grouping by in the GroupBy parameter. Use it like this:

    Cust_Combo_Count = groupCount()

    If you want to add up all those values you could use groupSum('Cust_Transactions').


  • 7.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-16-2017 19:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tris_717684

    Unfortunately, I cannot use your suggested formulae. However, reading through your first statement revealed what I did incorrectly - I used multiple parameters in my GroupBy causing the node to fail. I have replaced the three parameters to one and was able to yield the output I was looking for! I will just to a lookup to be able to amalgamate the output into the other nodes. Thanks heaps @gmullin!


  • 8.  RE: LAE Error Code: lae.brainscript.parameterTypeMismatch

    Employee
    Posted 08-17-2017 02:26

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    Hi Tris,

    Just to clarify the original error condition: This error is not related to the fields in the GroupBy property, the error is being generated because the groupCount() function is expecting a Boolean data type attribute if there is a statement configured within the parentheses - i.e. in your scenario the first line in the Agg Ex node script is:

    Cust_Combo_Count = groupCount('Cust_Transactions')

    so the node expects 'Cust_Transactions' to be a Boolean field. Normally for a simple count of items within a sub-group of the data you do not need to specify an attribute so the statement would just be:

    Cust_Combo_Count = groupCount()

    This will count the number of records in the sub-group specified by a unique combination of the GroupBy fields. If you just wanted to count the total number of input records you could use

    total_Records = groupCount()

    and set the GroupBy property to true or 1 - which causes the Agg Ex node to treat all the records as belonging to a single group.

    The alternate format for the groupCount() function with an argument is used when you want to conditionally count the number of occurrences within a sub-group. For instance, if I had some order data comprising the fields:
    - SalesRegion # String: North/South/East/West
    - SalesPersonID # String: 101/102,103, 104, ...
    - OrderAmount # Double: 500.00, 2341.50, 4500.00, 9999.99, ...

    If I wanted to count the number of orders by SalesRegion where the value of the OrderAmount was greater than or equal to 3,000 then I could configure the Agg Ex node as follows:

    ##SortInput property:
    true

    ## Script property:
    CountOrdersOver3K = groupCount(OrderAmount >= 3000)
    emit referencedFields(1,{{^GroupBy^}}), CountOrdersOver3K
    where lastInGroup

    ## GroupBy Property:
    SalesRegion



    The groupCount() predicate statement (OrderAmount >= 3000) will result in a Boolean value that determines whether the aggregate value is incremented for that record.

    In your particular scenario you wanted the count of the occurrences of 'Customer Combo' so just using groupCount() as the aggregation method with a GroupBy of 'Customer Combo' should yield the required count values.

    Regards,
    Adrian