... coz those always go well.
0,0,0,0,0,0... 113,125,125,164,254,254,224,99... 0,0,0,0,0,0,three
i = Magick::Image.read(filename).first
out_filename = File.join(cropped_dir, File.split(filename).last)
i.quantize(2, Magick::GRAYColorspace) \
.contrast(sharpen=true) \
.negate(grayscale=true) \
.enhance \
.adaptive_blur(radius=0.0, sigma=1.0) \
.despeckle \
.resize_to_fill(28, 28) \
.write(out_filename)
"Field of study that gives computers the ability to learn without being explicitly programmed."
- Arthur Samuel
using statistics-driven algorithms
to find patterns in data.
- Arnab Deka
Σ(hθ(xi) - yi)^2
problem = Libsvm::Problem.new parameter = Libsvm::SvmParameter.new features = examples.map do |ary|
Libsvm::Node.features(ary)
end problem.set_examples(labels, features) model = Libsvm::Model.train(problem, parameter)
model.predict(Libsvm::Node.features(*test_example)).to_i
... since the other one went so well!
java -jar -Xmx8192m lib/weka.jar
model = Java::WekaClassifiersFunctions::LibSVM.new
model.set_options(options) model.build_classifier(data) model.classify_instance(d)