Skip to content

Commit

Permalink
vector
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Aug 11, 2024
1 parent ef27ae8 commit f50fe65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SVRfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ Returns:
function loadmodel(filename::AbstractString)
param = mapparam()
nnodes, ssize = Int.(DelimitedFiles.readdlm(splitext(filename)[1] .* ".nodes"))
x = Array{Float64}(undef, nnodes - 1)
y = Array{Float64}(undef, ssize - 1)
x = Vector{Float64}(undef, nnodes - 1)
y = Vector{Float64}(undef, ssize - 1)
nodes, nodeptrs = mapnodes(x)
prob = svm_problem(length(y), pointer(y), pointer(nodeptrs))
plibsvmmodel = ccall((:svm_load_model, libsvm_jll.libsvm), Ptr{svm_model}, (Ptr{UInt8},), filename)
Expand Down Expand Up @@ -377,7 +377,7 @@ Returns:
function readlibsvmfile(file::AbstractString)
d = DelimitedFiles.readdlm(file)
(o, p) = size(d)
x = Array{Float64}(undef, o, p - 1)
x = Matrix{Float64}(undef, o, p - 1)
y = Vector{Float64}(undef, o)
try
y = Float64.(d[:,1])
Expand Down

0 comments on commit f50fe65

Please sign in to comment.