edit

SVR.jl

Module SVR provides Support Vector Regression (SVR) using libSVM library.

SVR.jl module functions:

# SVR.freemodelMethod.

Free a libSVM model

Methods

  • SVR.freemodel(pmodel::SVR.svmmodel) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:303

Arguments

  • pmodel::SVR.svmmodel : svm model

source

# SVR.liboutputMethod.

catch lib output

Methods

  • SVR.liboutput(str::Ptr{UInt8}) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:97

Arguments

  • str::Ptr{UInt8} : string

source

# SVR.loadmodelMethod.

Load a libSVM model

Methods

  • SVR.loadmodel(filename::String) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:269

Arguments

  • filename::String : input file name

Returns:

  • SVM model

source

# SVR.mapnodesMethod.

Methods

  • SVR.mapnodes(x::Array) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:185

Arguments

  • x::Array :

source

# SVR.mapparamMethod.

Methods

  • SVR.mapparam(; svm_type, kernel_type, degree, gamma, coef0, C, nu, p, cache_size, eps, shrinking, probability, nr_weight, weight_label, weight) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:162

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

source

# SVR.predictMethod.

Predict based on a libSVM model

Methods

  • SVR.predict(pmodel::SVR.svmmodel, x::Array) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:244

Arguments

  • pmodel::SVR.svmmodel : the model that prediction is based on
  • x::Array : array of independent variables

Return:

  • predicted dependent variables

source

# SVR.readlibsvmfileMethod.

Read a libSVM file

Methods

  • SVR.readlibsvmfile(file::String) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:322

Arguments

  • file::String : file name

Returns:

  • array of independent variables
  • vector of dependent variables

source

# SVR.savemodelMethod.

Save a libSVM model

Methods

  • SVR.savemodel(pmodel::SVR.svmmodel, filename::String) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:290

Arguments

  • filename::String : output file name
  • pmodel::SVR.svmmodel : svm model

Dumps:

  • file with saved model

source

# SVR.trainMethod.

Train based on a libSVM model

Methods

  • SVR.train(y::Array{T<:Any,1}, x::Array; svm_type, kernel_type, degree, gamma, coef0, C, nu, eps, cache_size, tol, shrinking, probability, verbose) : /Users/monty/.julia/v0.5/SVR/src/SVR.jl:224

Arguments

  • x::Array : array of independent variables
  • y::Array{T<:Any,1} : 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

source