Options

[Solved]Append different datasets

aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
edited November 2018 in Help
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

Answers

  • Options
    [Deleted User][Deleted User] Posts: 0 Learner II
    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
  • Options
    aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
    Thanks a lot ,

    Arian
Sign In or Register to comment.