Changeset - 59e3e241c8ea
[Not reviewed]
0 2 0
Tom Bannink - 8 years ago 2017-05-08 12:10:46
tombannink@gmail.com
Update TODO list in Mathematica notebook
2 files changed with 13 insertions and 7 deletions:
0 comments (0 inline, 0 general)
cpp/switchchain.cpp
Show inline comments
 
@@ -258,7 +258,7 @@ int main() {
 
                          << "%)." << std::endl;
 

	
 
                if (outputComma)
 
                    outfile << ',';
 
                    outfile << ',' << '\n';
 
                outputComma = true;
 

	
 
                std::sort(ds.begin(), ds.end());
showgraphs.m
Show inline comments
 
@@ -8,6 +8,14 @@ Needs["ErrorBarPlots`"]
 

	
 

	
 
(* ::Text:: *)
 
(*- Triangle law exponent: gather more data*)
 
(**)
 
(*- Why does GCM-2 start with very low #triangles*)
 
(*  Do not only consider number of standard deviations but also relative number of triangles.*)
 
(*  Look at the following: for all triangles (v1, v2, v3) consider the degrees d1<d2<d3) and make a scatter plot of di vs dj. Make such a scatter plot for the initial GCM-2 graph and for a mixed graph and see how it changes.*)
 
(**)
 
(*- GCM success rates: for the degree sequences where it "always fails", look at the degree sequence. Does it have a low/high number of degree 1 nodes? Is the maximum degree very low/high?*)
 
(**)
 
(*- Use different starting point for switch chain that is closer to uniform:*)
 
(*   Do configuration model, starting with the vertex with highest degree and keeping track of a "forbidden list" meaning dont pair something that is not allowed*)
 
(*   (a) How close is this to uniform ? At least w.r.t. the measure of #triangles*)
 
@@ -20,8 +28,6 @@ Needs["ErrorBarPlots`"]
 
(*- For a graph snapshot: for all V shapes, compute the number of ways to make it into a triangle:*)
 
(*  Let u1,u2 be the endpoints of the V. For all neighbors v1 of u1 and v2 of u2, see of v1,v2 has an edge. Meaning, if we were to select randomly an u1 edge and an u2 edge, then whats the probability that it can be used to switch the V into a triangle.*)
 
(**)
 
(*- Why does GCM-2 start with very low #triangles*)
 
(**)
 
(*- Improve runtime*)
 
(*   (a) Better direct triangle counting? (I doubt it)*)
 
(*   (b) Better triangle counting by only keeping track of CHANGES in #triangles*)
 
@@ -72,7 +78,7 @@ Grid[Partition[gs,10],Frame->All]
 
(*Data import and data merge*)
 

	
 

	
 
gsraw=Import[NotebookDirectory[]<>"data/graphdata_partial.m"];
 
gsraw=Import[NotebookDirectory[]<>"data/graphdata.m"];
 
gsraw=SortBy[gsraw,#[[1,1]]&]; (* Sort by n *)
 

	
 

	
 
@@ -130,7 +136,7 @@ Show[ListPlot[avgAndProp,AxesOrigin->{0,0},AxesLabel->{"degree-sequence-property
 

	
 

	
 
numPlots=20;
 
selectedData=gdata[[5,-1]][[-numPlots;;-1]];
 
selectedData=gdata[[1,-1]][[-numPlots;;-1]];
 
measureSkip=1;
 
minCount=Min[Map[Min[#[[2]]]&,selectedData]];
 
maxCount=Max[Map[Max[#[[2]]]&,selectedData]];
 
@@ -236,12 +242,12 @@ timeWindow=Round[Length[gdata[[1,1,1,2]]]/10];
 
getStats[run_]:=Module[{avg,stddev},
 
    avg=N[Mean[run[[2,-timeWindow;;-1]]]];
 
    stddev=N[StandardDeviation[run[[2,timeWindow;;-1]]]];
 
    {run[[1]],(run[[2,1]]-avg)/stddev,Map[N[(#-avg)/stddev]&,run[[4]]]}
 
    {run[[1]],stddev/avg,(run[[2,1]])/avg,Map[N[#/avg]&,run[[4]]]}
 
]
 
stats=Map[getStats,gdata,{3}];
 

	
 

	
 
histograms=Map[Histogram[#[[1,3]],PlotRange->{{-8,8},Automatic},PlotLabel->"ErdosGallai deviation: "<>ToString[#[[1,2]]]]&,stats,{2}];
 
histograms=Map[Histogram[{#[[1,4]]},PlotRange->{{0,2},Automatic},PlotLabel->"ErdosGallai="<>ToString[NumberForm[#[[1,3]],3]]<>"\[Cross]average. stddev="<>ToString[NumberForm[#[[1,2]],3]]<>"\[Cross]average"]&,stats,{2}];
 

	
 

	
 
TableForm[histograms,TableHeadings->{taulabels,nlabels}]
0 comments (0 inline, 0 general)