SVR.jl
SVR.jl performs Support Vector Regression (SVR) using libSVM library.
SVR.jl functions:
SVR.apredict — Method
Predict based on a libSVM model
Methods:
SVR.apredict(y::AbstractVector{Float64}, x::AbstractArray{Float64}; kw...):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:290
Arguments:
y::AbstractVector{Float64}: Vector of dependent variablesx::AbstractArray{Float64}: Array of independent variables
Return:
- predicted dependent variables
SVR.freemodel — Method
Free a libSVM model
Methods:
SVR.freemodel(pmodel::SVR.svmmodel):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:358
Arguments:
pmodel::SVR.svmmodel: Svm model
SVR.get_prediction_mask — Method
Get prediction mask
Methods:
SVR.get_prediction_mask(ns::Number, ratio_prediction::Number; keepcases, debug):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:247
Arguments:
ns::Number: Number of samplesratio_prediction::Number: Prediction ratio prediction
Keywords:
keepcases: Keepcasesdebug: Debug
Return:
- prediction mask
SVR.loadmodel — Method
Load a libSVM model
Methods:
SVR.loadmodel(filename::AbstractString):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:321
Arguments:
filename::AbstractString: Input file name
Returns:
- SVM model
SVR.mapnodes — Method
Methods:
SVR.mapnodes(x::AbstractArray):~/.julia/packages/SVR/r4194/src/SVRlib.jl:63
Arguments:
x::AbstractArray:
SVR.mapparam — Method
Methods:
SVR.mapparam(; svm_type, kernel_type, degree, gamma, coef0, C, nu, epsilon, cache_size, tolerance, shrinking, probability, nr_weight, weight_label, weight):~/.julia/packages/SVR/r4194/src/SVRlib.jl:23
Keywords:
svm_type: SVM type [default=EPSILON SVR]kernel_type: Kernel type [default=RBF]degree: Degree of the polynomial kernel [default=3]gamma: Coefficient for RBF, POLY and SIGMOND kernel types [default=1.0]coef0: Independent term in kernel function; important only in POLY and SIGMOND kernel types [default=0.0]C: Cost; penalty parameter of the error term [default=1.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]epsilon: Epsilon for 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=1e-9]cache_size: Size of the kernel cache [default=100.0]tolerance: Tolerance; stopping criteria[default=0.001]shrinking: Apply shrinking heuristic [default=true]probability: Train to estimate probabilities [default=false]nr_weight: [default=0]weight_label: [default=Ptr{Cint}(0x0000000000000000)]weight: [default=Ptr{Cdouble}(0x0000000000000000)]
Returns:
- parameter
SVR.predict — Method
Predict based on a libSVM model
Methods:
SVR.predict(pmodel::SVR.svmmodel, x::AbstractArray{Float64}):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:69
Arguments:
pmodel::SVR.svmmodel: The model that prediction is based onx::AbstractArray{Float64}: Array of independent variables
Return:
- predicted dependent variables
SVR.readlibsvmfile — Method
Read a libSVM file
Methods:
SVR.readlibsvmfile(file::AbstractString):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:377
Arguments:
file::AbstractString: 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::AbstractString):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:343
Arguments:
pmodel::SVR.svmmodel: Svm modelfilename::AbstractString: Output file name
Dumps:
- file with saved model
SVR.train — Method
Train based on a libSVM model
Methods:
SVR.train(y::AbstractVector{Float64}, x::AbstractArray{Float64}; svm_type, kernel_type, degree, gamma, coef0, C, nu, epsilon, cache_size, tol, shrinking, probability, verbose):~/.julia/packages/SVR/r4194/src/SVRfunctions.jl:32
Arguments:
y::AbstractVector{Float64}: Vector of dependent variablesx::AbstractArray{Float64}: Array of independent variables
Keywords:
svm_type: SVM type [default=EPSILON SVR]kernel_type: Kernel type [default=RBF]degree: Degree of the polynomial kernel [default=3]gamma: Coefficient for RBF, POLY and SIGMOND kernel types [default=1/size(x, 1)]coef0: Independent term in kernel function; important only in POLY and SIGMOND kernel types [default=0.0]C: Cost; penalty parameter of the error term [default=1.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]epsilon: 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=1e-9]cache_size: Size of the kernel cache [default=100.0]tol: Tolerance of termination criterion [default=0.001]shrinking: Apply shrinking heuristic [default=true]probability: Train to estimate probabilities [default=false]verbose: Verbose output [default=false]
Returns:
- SVM model