Previously on /dpt/: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
You actually seem to have a problem with extrapolating implicits though.
fizzBuzz :: Int -> String
fizzBuzz i =
case (i `rem` 5, i `rem` 3) of
(0, 0) -> "FizzBuzz"
(_, 0) -> "Fizz"
(0, _) -> "Buzz"
_ -> show i
main :: IO ()
main = mapM_ (putStrLn . fizzBuzz) [1 .. 100]
Dennis died alone, sick, and poor though
I need to compare one 3D point to 1,000,000 other 3D points. 3D points refer to training data and can be classified as groups. Points p1..p283 might be classification 1, p284..p823 classification 2, etc. I want to find what classification the newest input falls in.
Is k-means clustering appropriate here? The data can be clustered into 50 contiguous regions. If the centroid is the mean of a cluster, can the distance calculation instead be done between input and centroids and still be accurate?
Can this be done to reduce the complexity from 1,000,000 comparisons to only 50 comparisons? Did I interpret k-means clustering right?
>f# ugly
>haskell beautiful
When adding a new data point I believe you just assign it based on the current centroids. Then update everything. The first go-around it will be assigned to the closest centroid anyway
test
whoops, not sure how your hand slipped all the way from the 8 key to the 3 key.
kill thou are selve