Skip to content

Instantly share code, notes, and snippets.

@cppchedy
cppchedy / kmeans.cpp
Created September 22, 2018 23:22
simple Kmeans algo
#include <numeric>
#include <algorithm>
#include <vector>
#include <array>
#include <optional>
#include <cmath>
#include <iostream>
namespace KMeans {
//precond: v is not empty
@cppchedy
cppchedy / naive_bayes.hpp
Last active March 26, 2018 19:48
naive bayes implementation from scratch
#ifndef NAIVEBAYES_H
#define NAIVEBAYES_H
#include <cmath>
#include <vector>
#include <numeric>
#include <utility>
#include <map>
#include <algorithm>