SVR.jl
Module SVR provides Support Vector Regression (SVR) using libSVM library.
SVR.jl module functions:
#
SVR.apredict
— Method.
Predict based on a libSVM model
Methods
SVR.apredict(y::Array{T,1} where T, x::Array; kw...) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:269
Arguments
x::Array
: array of independent variablesy::Array{T,1} where T
: vector of dependent variables
Return:
- predicted dependent variables
#
SVR.freemodel
— Method.
Free a libSVM model
Methods
SVR.freemodel(pmodel::SVR.svmmodel) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:319
Arguments
pmodel::SVR.svmmodel
: svm model
#
SVR.liboutput
— Method.
catch lib output
Methods
SVR.liboutput(str::Ptr{UInt8}) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:97
Arguments
str::Ptr{UInt8}
: string
#
SVR.loadmodel
— Method.
Load a libSVM model
Methods
SVR.loadmodel(filename::String) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:285
Arguments
filename::String
: input file name
Returns:
- SVM model
#
SVR.mapnodes
— Method.
Methods
SVR.mapnodes(x::Array) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:184
Arguments
x::Array
:
#
SVR.mapparam
— Method.
Methods
SVR.mapparam(; svm_type, kernel_type, degree, gamma, coef0, C, nu, p, cache_size, eps, shrinking, probability, nr_weight, weight_label, weight) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:161
Keywords
C
: cost; penalty parameter of the error term [default=1.0
]cache_size
: size of the kernel cache [default=100.0
]coef0
: independent term in kernel function; important only in POLY and SIGMOND kernel types [default=0.0
]degree
: degree of the polynomial kernel [default=3
]eps
: epsilon in the EPSILON_SVR model; defines an epsilon-tube within which no penalty is associated in the training loss function with points predicted within a distance epsilon from the actual value [default=0.001
]gamma
: coefficient for RBF, POLY and SIGMOND kernel types [default=1.0
]kernel_type
: kernel type [default=RBF
]nr_weight
: [default=0
]nu
: upper bound on the fraction of training errors / lower bound of the fraction of support vectors; acceptable range (0, 1]; applied if NU_SVR model [default=0.5
]p
: epsilon for EPSILON_SVR [default=0.1
]probability
: train to estimate probabilities [default=false
]shrinking
: apply shrinking heuristic [default=true
]svm_type
: SVM type [default=EPSILON_SVR
]weight
: [default=Ptr{Cdouble}(0x0000000000000000)
]weight_label
: [default=Ptr{Cint}(0x0000000000000000)
]
Returns:
- parameter
#
SVR.predict
— Method.
Predict based on a libSVM model
Methods
SVR.predict(pmodel::SVR.svmmodel, x::Array) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:243
Arguments
pmodel::SVR.svmmodel
: the model that prediction is based onx::Array
: array of independent variables
Return:
- predicted dependent variables
#
SVR.r2
— Method.
Compute the coefficient of determination (r2)
Methods
SVR.r2(x, y) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:364
Arguments
x
: observed datay
: predicted data
Returns:
- coefficient of determination (r2)
#
SVR.readlibsvmfile
— Method.
Read a libSVM file
Methods
SVR.readlibsvmfile(file::String) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:338
Arguments
file::String
: file name
Returns:
- array of independent variables
- vector of dependent variables
#
SVR.savemodel
— Method.
Save a libSVM model
Methods
SVR.savemodel(pmodel::SVR.svmmodel, filename::String) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:306
Arguments
filename::String
: output file namepmodel::SVR.svmmodel
: svm model
Dumps:
- file with saved model
#
SVR.train
— Method.
Train based on a libSVM model
Methods
SVR.train(y::Array{T,1} where T, x::Array; svm_type, kernel_type, degree, gamma, coef0, C, nu, eps, cache_size, tol, shrinking, probability, verbose) in SVR
: /Users/monty/.julia/v0.6/SVR/src/SVR.jl:223
Arguments
x::Array
: array of independent variablesy::Array{T,1} where T
: vector of dependent variables
Keywords
C
: cost; penalty parameter of the error term [default=1.0
]cache_size
: size of the kernel cache [default=100.0
]coef0
: independent term in kernel function; important only in POLY and SIGMOND kernel types [default=0.0
]degree
: degree of the polynomial kernel [default=3
]eps
: epsilon in the EPSILON_SVR model; defines an epsilon-tube within which no penalty is associated in the training loss function with points predicted within a distance epsilon from the actual value [default=0.1
]gamma
: coefficient for RBF, POLY and SIGMOND kernel types [default=1/size(x, 1)
]kernel_type
: kernel type [default=RBF
]nu
: upper bound on the fraction of training errors / lower bound of the fraction of support vectors; acceptable range (0, 1]; applied if NU_SVR model [default=0.5
]probability
: train to estimate probabilities [default=false
]shrinking
: apply shrinking heuristic [default=true
]svm_type
: SVM type [default=EPSILON_SVR
]tol
: tolerance of termination criterion [default=0.001
]verbose
: verbose output [default=false
]
Returns:
- SVM model