摘要:
一、canal安装路径 二、canal配置文件canal.properties ########################################################## common argument ############# ##################### 阅读全文
摘要:
环境介绍: 10.60.81.160 10.60.81.161 10.60.81.162 搭建过程 前提是安装java环境,ELK6.2版本需要jdk为1.8,官方推荐安装OracleJDK 最好不要安装OpenJDK.安装jdk参考:linux安装jdk 只需要将安装包换成1.8的就行。 Elas 阅读全文
摘要:
import numpy as npimport matplotlib as mplimport matplotlib.pyplot as pltfrom sklearn import datasetsraw_data_X = [[3.393533211, 2.331273381], [3.1100 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltdef sigmoid(t): return 1 / (1 + np.exp(-t))x = np.linspace(-10,10,500)print(x)y = sigmoid(x)plt.plot( 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsiris = datasets.load_iris()X = iris.datay = iris.targetX = X[y<2,:2]#prin 阅读全文
摘要:
import numpy as npimport matplotlib as mplimport matplotlib.pyplot as pltfrom sklearn import datasetsclass train_test_split1: def __init__(self): prin 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltnp.random.seed(666)x = 2 * np.random.random(size=100)y = x*3. + 4. + np.random.normal(size=100)X = x. 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltplot_x = np.linspace(-1,6,141)plot_y = (plot_x - 2.5)**2 -1#plt.plot(plot_x,plot_y)#plt.show()#损失函数求导 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltx = np.random.uniform(-3,3, size=100)X = x.reshape(-1,1)y =0.5 * x**2 + x + np.random.normal(0,1,size 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltX = np.empty((100,2))X[:,0] = np.random.uniform(0,100,size=100)X[:,1] = 0.75 * X[:,0] + 3. + np.rando 阅读全文
摘要:
import numpy as npfrom dev.metrics import accuracy_scoreclass LogisticRegression: def __init__(self): """初始化Linear Regression模型""" self.coef_ = None s 阅读全文
摘要:
import numpy as npfrom .metrics import r2_scoreclass SimpleLinearRegression: def __init__(self): """初始化Simple Linear Regression模型""" self.a_ = None se 阅读全文
摘要:
import numpy as npclass StandardScaler: def __init__(self): self.mean_ = None self.scale_ = None def fit(self, X): """根据训练数据集X获得数据的均值和方差""" assert X.n 阅读全文
摘要:
import numpy as npdef train_test_split(X, y, test_ratio=0.2, seed=None): """将数据 X 和 y 按照test_ratio分割成X_train, X_test, y_train, y_test""" assert X.shap 阅读全文
摘要:
import numpy as npclass PCA: def __init__(self, n_components): """初始化PCA""" assert n_components >= 1, "n_components must be valid" self.n_components = 阅读全文
摘要:
import numpy as npfrom math import sqrtdef accuracy_score(y_true, y_predict): """计算y_true和y_predict之间的准确率""" assert len(y_true) == len(y_predict), \ " 阅读全文
摘要:
import numpy as npfrom .metrics import r2_scoreclass LinearRegression: def __init__(self): """初始化Linear Regression模型""" self.coef_ = None self.interce 阅读全文
摘要:
import numpy as npfrom math import sqrtfrom collections import Counterfrom .metrics import accuracy_scoreclass KNNClassifier: def __init__(self, k): " 阅读全文
摘要:
一、CDH环境搭建目录 --CDH相关包的下载地址:http://archive.cloudera.com/cm5/cm/5/http://archive.cloudera.com/cdh5/parcels/latest/ 创建用户用户:userdel -r cloudera-scmgroupadd 阅读全文
摘要:
一、sparkstreaming + kafka + zookeeper + hbase整体发布说明 阅读全文