ICode9

精准搜索请尝试: 精确搜索
  • 机器学习——简单线性回归之向量法(代码实现)2019-08-28 13:52:44

    最小二乘法实现:   机器学习——简单线性回归(原理推导+算法描述+代码实现)   向量法代码实现:   简单的来说就是将最小二乘法计算分子分母的for改成使用向量法运算,使得性能大幅度的提升   与上一篇博客代码的区别在于第19、20行。 1 class SimpleLinearRegression2: 2 d

  • L445 This Wearable Device Can Predict Aggressive Outbursts in People with Autism a Minute in Advance2019-08-24 09:02:29

      What would you do if you could predict the future a minute in advance? That might not seem like a long time, but for caretakers of people with autism, knowing what will happen 60 seconds from now could be enough time to prevent an aggressive outburst. T

  • 风控模型中的KS-指标2019-08-23 14:06:10

    KS-指标 ks定义 ks是指通过衡量好坏样本累计分布之间的差值,来评估模型的风险区分能力。KS曲线又叫洛伦兹曲线。以TPR和FPR分别作为纵轴,以阈值作为横轴,画出两条曲线。KS曲线则是两条曲线的在每一个阈值下的差值 真阳性率(TPR) : 判定为正例也是真正例的比率 伪阳性率(FPR) :

  • Predict the Winner2019-08-05 17:06:57

    Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a number, that number will not be available for the next

  • 销售分析第二天:线性回归2019-07-27 23:02:06

    y = groupall.values[:, 2:] x = range(np.shape(y)[1]) plt.plot(x, y[0], "b.") x2 = np.array(x).reshape(-1,1) y2 = np.array(y[0]).reshape(-1,1) plt.plot(x2, y2, "r.") sgd_reg2 = SGDRegressor(n_iter_no_change=5000, penalty=None, eta0=0.1,

  • sklearn简单线性回归2019-06-30 10:04:02

      from sklearn import datasetsfrom sklearn.model_selection import train_test_splitfrom sklearn.linear_model import LinearRegressionfrom sklearn.metrics import mean_squared_errorboston = datasets.load_boston()x, y = boston.data, boston.targetx_train, x_te

  • 【直播】2019 年县域农业大脑AI挑战赛---保存结果2019-06-25 16:42:23

    在模型训练结束,结束后,通常是一个分割模型,输入 1024x1024 输出 4x1024x1024。 一种方法就是将整个图切块,然后每张预测,但是有个不好处就是可能在边界处断续。   由于这种切块再预测很ugly,所以直接遍历整个图预测,防止边界断续,还有一个问题就是防止图过大不能超过20M。 很有意思解决上

  • Keras猫狗大战二:加载模型预测单张图片2019-06-22 16:54:42

    版权声明:本文为博主原创文章,欢迎转载,并请注明出处。联系方式:460356155@qq.com  加载https://www.cnblogs.com/zhengbiqing/p/11068529.html训练得到的74%精度的模型,预测图片。 import osimport randomimport numpy as npfrom keras.preprocessing import imagefrom keras.models

  • 机器学习--KNN基本实现2019-06-09 16:52:16

    # _*_ coding _*_ import numpy as np import math import operator def get_data(dataset): x = dataset[:,:-1].astype(np.float) y = dataset[:,-1] return x,y # def cal_dis(a,b): # x1,y1 = a[:] # x2,y2 = b[:] # dist = math.sqrt(math.pow

  • 基于 lstm 的股票收盘价预测 -- python2019-05-30 11:04:30

    参考资料:基于keras 的lstm 股票收盘价预测 导入 MinMaxScaler 时会报错 “from . import _arpack ImportError: DLL load failed: 找不到指定的程序。” #import datetimeimport pandas as pdimport numpy as np#from numpy import row_stack,column_stackimport tushare as ts#im

  • 实现机器学习的循序渐进指南VII——Blending2019-05-25 21:55:23

    目录 介绍 混合(Blending)模型 混合(Blending)架构 混合(Blending)实现 混合(Blending)分类 结论与分析 介绍 混合(Blending)是一种模型融合方法,而不是传统的机器学习算法。Netflix中的顶级表演者使用混合(Blending),这被认为是一种堆叠形式。混合(Blending)更像是工程方法,因此,

  • 简单线性回归2019-04-18 14:39:55

    一:定义   简单理解:y=ax+b,x是特征值,y是标记,模型就是计算a和b的值。 二:最优模型   尽量使的y的预测值与真实值的差小,即对 y-y(i)进行求和使其值最小,即(y-y(i))^2小。   主要是最小二乘法和对a,b求偏导,得出   a = 对 (x(i)-x的平均值)*(y(i)-y的平均值) 求和/对 (x(i)-x的平均

  • 只需10分钟!就能用Flask,Docker和Jenkins部署机器学习模型!2019-03-25 15:53:57

    决这个问题,因为应用程序的所有依赖项都可以打包在容器中,并且可以通过必要时刻简单地部署更多容器来实现可伸缩性。这种部署架构本质上是可扩展的、成本有效的和便携的。     **完整代码加群:683380553 获取!**   Docker:Docker是一种开源的容器化技术,允许开发人员将应用程序与

  • leetcode_486. Predict the Winner2019-03-17 10:39:44

    https://leetcode.com/problems/predict-the-winner/ 题目描述:给定一个非负的积分数组,玩家1可以从数组两端任取一个积分,接着玩家2执行同样的操作,直至积分被取尽,总分大的获胜。两人都以最优决策进行游戏。对每个数组输出玩家1是否能获胜。 解法1: 使用递归,两者依次取数。   class S

  • model.evaluate 和 model.predict 的区别2019-03-14 14:54:33

    model.evaluate 输入数据和标签,输出损失和精确度. # 评估模型 loss,accuracy = model.evaluate(X_test,Y_test) print('\ntest loss',loss) print('accuracy',accuracy) model.predict 输入数据,输出预测结果 (通常用在需要将预测结果与真实标签相比较的时候) #模型

  • Python编程:方差、标准差、均方差、均方根值、均方误差、均方根误差2019-02-26 15:50:23

    python实现代码 # -*- coding: utf-8 -*- import math def get_average(records): """ 平均值 """ return sum(records) / len(records) def get_variance(records): """ 方差 反映一个数据集的离散程度 "&quo

  • keras_2_Sequential 模型 API2019-02-14 20:49:16

    1. 几个重要的API compile:配置或编译模型 fit:以指定的epoch自动训练模型 evaluate:根据输入的(x,y)来评估上一步得到的模型 predict:基于之前得到模型,对输入的x预测输出结果 一些小函数 train_on_batch test_on_batch predict_on_batch fit_generator 使用 Python 生成器或 Sequen

  • keras_3_Model 类 API2019-02-14 20:47:50

    1. 函数式Model的API 在函数式 API 中,给定一些输入张量和输出张量,可以通过以下方式实例化一个 Model: from keras.models import Model from keras.layers import Input, Dense a = Input(shape=(32,)) b = Dense(32)(a) model = Model(inputs=a, outputs=b) # 根据上面定义好的in

  • LC 486. Predict the Winner2019-02-07 08:50:57

    Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a number, that number will not be available for the next

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有