Sha256: b9ddcc06732e28982373439b94016790271724c3ddb06305c3e9ffaeb495e756

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

class Matrix
	def add_ones
		matrix = self.to_a.map{ |i| i.insert(0,1) }
		matrix = Matrix.rows(matrix,copy = true)
		matrix
	end

	def normalize
		array = []
		self.column_count.times do |i|
			array << self.column(i).normalize
		end
		matrix_normal = Matrix.rows(array,copy = true).transpose
		matrix_normal
	end	
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aprendizaje_maquina-0.1.4 lib/aprendizaje_maquina/matrixx.rb
aprendizaje_maquina-0.1.4.beta1 lib/aprendizaje_maquina/matrixx.rb
aprendizaje_maquina-0.1.3a lib/aprendizaje_maquina/matrixx.rb