I don't personally think Phind is ready for offering refinements for code, for instance I offered an example of why I might use independant methods of Naive Bayes:
require "naive_bayes"
# Create independant perimeters.
colors = NaiveBayes.new(:black,
:white,
:grey,
:red,
:green,
:blue
)
shapes = NaiveBayes.new(:line,
:square,
)
# Train on specific data.
## Colors
colors.train(:black, 'black', 'black')
colors.train(:white, 'white', 'white')
colors.train(:grey, 'grey', 'grey')
colors.train(:red, 'red', 'red')
colors.train(:green, 'green', 'green')
colors.train(:blue, 'blue', 'blue')
## Shapes
shapes.train(:line, '+----------+', 'line')
shapes.train(:square, '+----------+
| |
| |
| |
| |
| |
', 'square')
my_color = "red"
my_shape = "+-------------+"
this_color = colors.classify(*my_color)
this_shape = shapes.classify(*my_shape)
puts this_color
puts this_shape
However when it suggested refinements, it was using a ruby gem that I wasn't even using. More often than not it suggests Python when I'm using Ruby. This is really frusterating.