Sha256: ca4ebb974b820572682eb0347a1a423c21199d28400d17b9dc09e0c7253f02ae

Contents?: true

Size: 289 Bytes

Versions: 3

Compression:

Stored size: 289 Bytes

Contents

require 'aprendizaje_maquina'

data = AprendizajeMaquina::Cargar.new("train.csv")
x = data.to_matrix(0)
y = data.to_vector(1)
x = x.add_ones

regression = AprendizajeMaquina::RegresionLineal.new(x,y)
regression.find_ecuation
prediction = regression.predict(Matrix[[1,95]])
puts prediction 

Version data entries

3 entries across 3 versions & 1 rubygems

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