[Solved]Append different datasets

Unknown
edited November 5 in Community Q&A
Hi everybody ,

Let's assume that I have two datasets , S1 (which the features are a_1,a_2,a_3) and S2 which the features are (a_1,a_2,a_3,a_4)

a_1 , a_2 , a_3 are of similar types and roles , but the only difference is that S2 has one more attribute a_4 ,

how can I append these two datasets into 1 dataset (with a_1,a_2,a_3,a_4) having missing values of a_4 attribute for instances of S1  ?

(is there a way to ADD an attribute to a dataset with missing values ?)

Thanks ,
Arian
Tagged:

Answers

  • [Deleted User]
    [Deleted User] New Altair Community Member
    Hi Arian,

    the simplest way is to use the "Union" operator instead of "Append".
    The resulting ExampleSet contains all attributes of both original ExampleSets and not existing values are set to missing.

    Adding an attribute witih missing values to an ExampleSet can be achieved with the operator "Generate Empty Attribute" where you specify the name and the value type of the new attribute. All values will be missing.

    Best,
    Edin
  • Thanks a lot ,

    Arian