ICode9

精准搜索请尝试: 精确搜索
  • 线性回归补充练习2022-05-30 05:00:07

    巩固了线性回归的内容,练习了多变量的线性回归,对程序添加了一些详细的注释 import numpy as np#线性代数包import pandas as pd#数据处理包import matplotlib.pyplot as plt#画图包path = 'ex1data2.txt'data2 = pd.read_csv(path, header=None, names=['Size', 'Bedrooms', 'Pric

  • 神经网络 Python TensorFlow 设置学习率(学习笔记)2020-01-20 12:41:12

    #学习率设为1 import tensorflow as tf training_steps=10 learning_rate=1 x=tf.Variable(tf.constant(5,dtype=tf.float32),name='x') y=tf.square(x) train_op=tf.train.GradientDescentOptimizer(learning_rate).minimize(y) with tf.Session() as sess: in

  • 线性回归 python 代码实现2019-10-30 13:53:27

    本代码参考自:https://github.com/lawlite19/MachineLearning_Python#%E4%B8%80%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92  首先,线性回归公式:y = X*W +b 其中X是m行n列的数据集,m代表样本的个数,n代表每个样本的数据维度。则W是n行1列的数据,b是m行1列的数据,y也是。 损失函数采用MSE,采用

  • 蒙特卡洛算法求圆周率2019-08-10 09:35:52

    #include "iostream" #include <time.h> #define MAX_ITERS 1000000 using namespace std; double Rand(double L, double R) { return L + (R - L) * rand() * 1.0 / RAND_MAX; } double GetPi() { srand(time(NULL)); int cnt = 0; for (

  • 吴恩达《机器学习》编程作业——machine-learning-ex1:线性回归2019-03-02 23:05:09

    ❄❄❄❄❄❄❄❄【回到目录】❄❄❄❄❄❄❄❄ 本次编程作业中,需要完成的代码有如下几部分: [⋆] warmUpExercise.m - Simple example function in Octave/MATLAB[⋆] plotData.m - Function to display the dataset[⋆] computeCost.m - Function to compute the cost of linear r

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

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

ICode9版权所有