
数据挖掘算法
数据挖掘算法,迟到的更新
心脏dance
求关注!!!求关注!!!安卓、后端学习记录,面试算法题(博主ACM区域赛银牌~~~水银嘻嘻~~~,蓝桥杯国一~~~),面试技术题。如果觉得博主写的好,菜鸡博主求关注~~~。 /*
呜呜呜~~大学的时候,写的博文中有些是借鉴的,若有侵权,请告知,立马删除。。。。 */
展开
-
Kmeans算法
C++实现: #include <bits/stdc++.h> using namespace std; const int MAX = 1e6+10; struct hh{ double x,y; }a[MAX],b[MAX],c[MAX]; int k,n; vector<int> vv[MAX]; void init(){ ifstream in("texts.txt"); string s; int cnt=0; while(getline(in,s)){//着原创 2021-03-20 18:06:06 · 221 阅读 · 0 评论 -
朴素贝叶斯算法
#include <bits/stdc++.h> using namespace std; const int MAX = 1e6; map<string, map<string,double> > mp; map<string, map<double,double> > mmp; map<string,double> mmmp; struct hh{ string gender; string out; double high.原创 2021-03-20 18:00:39 · 133 阅读 · 0 评论 -
KNN算法
#include <bits/stdc++.h> using namespace std; struct Point{ double x,y,dis; int type; Point(){ } Point(double xx,double yy,int typee){ x=xx,y=yy,type=typee; } }; double diss(Point a,Point b){ return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y); .原创 2021-03-20 17:59:24 · 114 阅读 · 0 评论