Skip to content

Commit b0e9f71

Browse files
authored
Update RKHS.py
1 parent a1f2df9 commit b0e9f71

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

RKHS.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
def RKHS(Input,Y,Xtest=None,yTest=None,
2-
opType='Classification',classifier='SVM',kernel='linear',
3-
degree=3,gamm=1,C=1,learning_rate=None,tol=1e-2,epochs=400,
4-
traceObj=False,gradCheck=False,optMode='Newton'):
1+
#gateway function for the solver
2+
#output model parameters + prediction
3+
4+
def RKHS(Input,Y,Xtest=None,yTest=None, #input data
5+
opType='Classification', #classification or regression
6+
classifier='SVM', #classifier name 'SVM', 'LS', 'Softmax'
7+
kernel='linear', #kernel type: 'linear', 'gaussian', 'polynomial'
8+
degree=3, #polynom degree
9+
gamm=1, #RBF parameter
10+
C=1, #cost parameter: lambda=1/(2*C)
11+
learning_rate=None,
12+
tol=1e-2,
13+
epochs=400, #number of iterations
14+
traceObj=False,
15+
gradCheck=False,
16+
optMode='NGD' #optimization method 'NGD', 'CGD'
17+
):
518
import numpy as np
619
rsp=transformResponse(Y,classifier,opType)
720
resp=rsp['respMat']

0 commit comments

Comments
 (0)