Sha256: e80ea91873204fb5afb6ca775fb63458a8b3eea200deb5c0bfa898b07a1b7a05

Contents?: true

Size: 355 Bytes

Versions: 3

Compression:

Stored size: 355 Bytes

Contents

require 'aprendizaje_maquina'

data = AprendizajeMaquina::Cargar.new("data_lg.csv")
x = data.to_matrix(0..1).add_ones
y = data.to_vector(2)
theta = Vector[0,0,0]
rl = AprendizajeMaquina::ClasificacionLogistica.new(x,y,theta)

rl.train(12,0.01,'SGD')
prediction = rl.predict(Matrix[[1,9,22]])

if prediction == 1
	puts "cansado"
else
	puts "descansado"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aprendizaje_maquina-0.1.4 examples/clasificacion_logistica_example.rb
aprendizaje_maquina-0.1.4.beta1 examples/clasificacion_logistica_example.rb
aprendizaje_maquina-0.1.3a examples/clasificacion_logistica_example.rb