I have a dataset of house price predictions.
House id | society_id | building_type | households | yyyymmdd | floor | price | date |
---|---|---|---|---|---|---|---|
204 | a9cvzgJ | 170 | 185 | 01/02/2006 | 3 | 43000 | 01/02/2006 |
100 | a4Nkquj | 170 | 150 | 01/04/2006 | 13 | 46300 | 01/04/2006 |
the dataset has the shape of (2000,40) while 1880 rows have same house id. I have to make heterogenous graphs from dataset. the metapaths are as follows:
here BT stands for building type, where H1 and H2 represents house 1 and house 2. the meta graph example is:
I know of network X. it allows dataframe to graph function . but i don't know how can i use in my scenario. the price column is target node.
A glimpse of dataset
any guidance will mean a lot. thank you. The goal is to make adjancy matrix of dataset
To build a graph like M_1 using only one attribute (such as building type), you could do either of the following. You could use the
from_pandas_edgelist
as follows:or you could do the following:
If you have a list of graphs
glist : [M_1,M_2,...]
each of which connects house_id to one other attribute, you can combine them using the compose_all function. For instance,Alternatively, if you have an existing graph made using certain attributes, you can add another attribute with