コード例 #1
0
ファイル: SaveSvmParams.py プロジェクト: charanpald/wallhack
import logging
import sys
import numpy
import random 
from apgl.egograph.SvmInfoExperiment import SvmInfoExperiment

logging.basicConfig(stream=sys.stdout, level=logging.INFO)
numpy.random.seed(21)
random.seed(21)

SvmInfoExperiment.saveSvmParams(SvmInfoExperiment.getSvmParamsFileName())
コード例 #2
0
    print("\hline")
    print(("All & " + Latex.array1DToRow(distTable[1, :]) +  "\\\\"))
    print(("Egos & " + Latex.array1DToRow(distTable[2, :]) +  "\\\\"))

    for i in range(distTable.shape[0]-3):
        print(("Alters " + str(i+1) + " & " + Latex.array1DToRow(distTable[3+i, :])  + "\\\\"))

    print("\n")

logging.basicConfig(stream=sys.stdout, level=logging.INFO)

random.seed(21)
numpy.random.seed(21)
startTime = time.time()

examplesFileName = SvmInfoExperiment.getExamplesFileName()
egoFileName = "../../data/EgoData.csv"
alterFileName = "../../data/AlterData.csv"
#This is double what we use for the diffusion results
numVertices = 20000
#numVertices = 5000

infoProb = 0.1
"""
p = 0.1
k = 15
generator = SmallWorldGenerator(p, k)
"""

#A second set of parameters 
p = float(30)/numVertices