forked from memoiry/LightML.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe.jl
More file actions
50 lines (25 loc) · 632 Bytes
/
frame.jl
File metadata and controls
50 lines (25 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
type ModelName
end
function ModelName()
end
function train!(model::ModelName, X::Matrix, y::Vector)
end
function predict(model::ModelName,
x::Matrix)
n = size(x,1)
res = zeros(n)
for i = 1:n
res[i] = predict(model, x[i,:])
end
return res
end
function predict(model::ModelName,
x::Vector)
end
function test_ModelName()
X_train, X_test, y_train, y_test = make_cla()
model = ModelName()
train!(model,X_train, y_train)
predictions = predict(model,X_test)
print("classification accuracy", accuracy(y_test, predictions))
end