链路流预测 - 链路流算法中的活动预测
Activity prediction in link streams algorithm
Python3
Numpy
Scipy
Matplotlib
Prediction with and without classes
3 classes by pair activity:
C0: without classes
C1: pair without interaction during observation
C2: less than classthreshold=5 links during observation
C3: more than classthreshold=5 links during observation
AllClasses: Union of C1, C2 and C3
Undirected link stream, sequence of triplet:
t u v
...
\
\
cat <data_file> | python main.py <config_file>
Configuration file structure:
<float:tstartobsT> #start time of observation training period
<float:tendobsT> #end time of observation training period
<float:tstartpredT> #start time of prediction training period
<float:tendpredT> #end time of prediction training period
<float:tstartobs> #start time of observation
<float:tendobs> #end time of observation
<float:tendpred> #end time of pred
Metrics #Metrics used:
Metric1 [parameters]
Metric2 [parameters]
Metric3 [parameters]
EndMetrics
[Options]
Commentaries:
Bla bla
Metrics available:
PairActivityExtrapolation
commonNeighbors
weightedCommonNeighbors
resourceAlloc
weightedResourceAlloc
adamicAdar
weightedAdamicAdar
sorensenIndex
weightedSorensenIndex
PairActivityExtrapolationNbLinks<int:k>
PairActivityExtrapolationTimeInter<float:k>
parameters:
By default the algorithm output the prediction quality and the metric combination used by during the prediction by classes.
The list of predicted activities can be extracted via the “Extract” option (see below)