决策树——ID3

摘要: 参考网址:https://www.cnblogs.com/further further further/p/9429257.html ID3算法 最优决策树生成 coding: utf 8 """ Created on Thu Aug 2 17:09:34 2018 决策树ID3的实现 @auth 阅读全文
posted @ 2019-11-03 22:55 华1 阅读(199) 评论(0) 推荐(0)

聚类------KNN

摘要: import numpy as np from math import sqrt import operator as opt def normData(dataSet): maxVals = dataSet.max(axis=0) minVals = dataSet.min(axis=0) ran 阅读全文
posted @ 2019-11-02 21:12 华1 阅读(169) 评论(0) 推荐(0)

AdaBoost

摘要: coding=utf 8 python 3.5 ''' Created on 2017年11月27日 @author: Scorpio.Lu ''' import numpy as np import matplotlib.pyplot as plt from sklearn.ensemble im 阅读全文
posted @ 2019-11-01 12:35 华1 阅读(149) 评论(0) 推荐(0)

线性回归和Ridge回归

摘要: 网址:https://www.cnblogs.com/pinard/p/6023000.html 线性回归和交叉验证 import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn import 阅读全文
posted @ 2019-10-25 22:58 华1 阅读(648) 评论(0) 推荐(0)

插入排序

摘要: include using namespace std; //Function prototype int selectSort(int ,int); void showArray(const int [],int); int main() { int array[] = {7,2,11,5,9,1 阅读全文
posted @ 2019-10-22 21:31 华1 阅读(81) 评论(0) 推荐(0)

选择排序

摘要: include using namespace std; //Function prototype int selectSort(int ,int); void showArray(const int [],int); int main() { int array[] = {7,2,4,5,9,10 阅读全文
posted @ 2019-10-22 20:16 华1 阅读(103) 评论(0) 推荐(0)

冒泡算法

摘要: include using namespace std; //Function prototype int selectSort(int ,int); void showArray(const int [],int); int main() { int array[] = {7,2,4,5,9,10 阅读全文
posted @ 2019-10-22 19:49 华1 阅读(419) 评论(0) 推荐(0)

输出两个非负整数的最大公约数

摘要: 博客园采用数学公式的方式如下:https://www.cnblogs.com/zhuxiaoxi/p/8320683.html 对于两个非负整数的最大公约数可以使用欧几里得算法求出,其公式如下 gcd(x,y)=$$f(x)= \begin{cases} 0& \text{y=0}\\ gcd(y, 阅读全文
posted @ 2019-10-21 18:38 华1 阅读(378) 评论(0) 推荐(0)

输出所有可能的排列组合

摘要: #include <iostream> using namespace std;//Function prototypevoid swap(int &,int &);void cal(int *, int, int length);int main(){ int a[] = {1,2,3,4,5,6 阅读全文
posted @ 2019-10-20 20:20 华1 阅读(665) 评论(0) 推荐(0)