Skip to content

Commit

Permalink
change default max walk length to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Feb 5, 2021
1 parent 74c84c5 commit 1aecb30
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/iScore.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parser.add_argument('--test',action='store_true',help='Only test the functions o

# parameter of the calculations
parser.add_argument('--lamb',type=float,default=1,help='Lambda parameter in the Kernel calculations. Default: 1')
parser.add_argument('--walk',type=int,default=4,help='Max walk length in the Kernel calculations. Default: 4')
parser.add_argument('--walk',type=int,default=3,help='Max walk length in the Kernel calculations. Default: 3')
parser.add_argument('--method',type=str,default='vect',help="Method used in the calculation: 'vect'(default), 'combvec', 'iter'")

# cuda parameters
Expand Down
2 changes: 1 addition & 1 deletion bin/iScore.kernel.mpi
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parser.add_argument('--test',action='store_true',help='Only test the functions o

# parameter of the calculations
parser.add_argument('--lamb',type=float,default=1,help='Lambda parameter in the Kernel calculations. Default: 1')
parser.add_argument('--walk',type=int,default=4,help='Max walk length in the Kernel calculations. Default: 4')
parser.add_argument('--walk',type=int,default=3,help='Max walk length in the Kernel calculations. Default: 3')
parser.add_argument('--method',type=str,default='vect',help="Method used in the calculation: 'vect'(default), 'combvec', 'iter'")


Expand Down
2 changes: 1 addition & 1 deletion bin/iScore.train
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parser.add_argument('--graph',default='./graph/',type=str,help='Graph pickle fil
parser.add_argument('--arc',default='training_set.tar.gz', type = str, help='name of the achive')

# maximum walk length
parser.add_argument('--walk',default=4, type=int, help='maximum walk length')
parser.add_argument('--walk',default=3, type=int, help='maximum walk length')

# get the args
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion bin/iScore.train.mpi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parser.add_argument('--graph',default='./graph/',type=str,help='Graph pickle fil
parser.add_argument('--archive',default='training_set.tar.gz', type = str, help='name of the achive')

# maximum walk length
parser.add_argument('--walk',default=4, type=int, help='maximum walk length')
parser.add_argument('--walk',default=3, type=int, help='maximum walk length')

# get the args
args = parser.parse_args()
Expand Down
8 changes: 4 additions & 4 deletions iScore/graphrank/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self,testIDs='testID.lst',trainIDs='trainID.lst',
>>># get the path of the check file
>>>checkfile = ker.get_check_file()
>>># run the calculations
>>>ker.run(lamb=1.0,walk=4,check=checkfile)
>>>ker.run(lamb=1.0,walk=3,check=checkfile)
Args:
Expand Down Expand Up @@ -351,7 +351,7 @@ def run(self,lamb,walk,outfile='kernel.pkl',cuda=False,gpu_block=(8,8,1),check=N
#
##############################################################

def compute_K(self,lamb=1,walk=4):
def compute_K(self,lamb=1,walk=3):
"""Compute random walk graph kernel
Notes:
Expand Down Expand Up @@ -966,7 +966,7 @@ def iscore_kernel(testID=None,trainID=None,
test_graph='./graph', train_graph='./graph',\
train_archive=None,
check=None, outfile='kernel.pkl',test=False,
lamb=1, walk=4, method='vect',
lamb=1, walk=3, method='vect',
tune_kernel=False,func='all',cuda=False, gpu_block=[8,8,1]):

# init and load the data
Expand Down Expand Up @@ -997,7 +997,7 @@ def iscore_kernel_mpi(testID=None,trainID=None,
test_graph='./graph', train_graph='./graph',
train_archive=None,
check=None, outfile='kernel.pkl',test=False,
lamb=1, walk=4, method='vect',rank=0,size=1):
lamb=1, walk=3, method='vect',rank=0,size=1):

# init and load the data
ker = Kernel(testIDs=testID,test_graph = test_graph,
Expand Down

0 comments on commit 1aecb30

Please sign in to comment.