机器学习(1.11)

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/Dove_forehead/article/details/79449072

机器学习——简介(一)

  • 简介Introduction
  • 模型和损失函数Model and Cost Function
  • 参数学习Parameter Learning

简介

定义

机器学习是一门人工智能的科学,该领域的主要研究对象是人工智能,特别是如何在经验学习中改善具体算法的性能;
机器学习是对能通过经验自动改进的计算机算法的研究;
机器学习是用数据或者以往的经验,以此优化计算机程序的性能标准。
[维基百科]

Field of study that gives computers the ability to learn without being explicitly programmed —Arthur Samuel(1959) 第一个定义机器学习的人

分类

监督学习(Supervised Learning)
非监督学习(Unsupervised Learning)
其他:增强学习(Reinforcement Learning),推荐系统(Recommender Systems)

算法

常用的机器学习算法有:

  • 构造间隔理论分布:聚类分析和模式识别

    • 人工神经网络
    • 决策树
    • 感知机
    • 支持向量机
    • 集成学习AdaBoost
    • 降维与度量学习
    • 聚类
    • 贝叶斯分类器
  • 构造条件概率:回归分析和统计分类

    • 高斯回归
    • 线性判断分析
    • 最近邻
    • 径向基函数核
  • 通过再生模型构造概率密度函数:

    • 最大期望算法
    • 概率图模型:包括贝叶斯网和Markov随机场
  • 近似推断技术:

    • 马尔科夫链
    • 蒙特卡罗方法
    • 变分法

展开阅读全文

Python2.7 + Django 1.11

09-29

运行网上一个例子,怎么也同步不了。请高人指点一下。rnrn工程名mysite, app name 是blogrnrnmysite/urls.pyrnrnfrom django.conf.urls import include, urlrnfrom django.contrib import adminrnrnurlpatterns = [rn url(r'^blog/', include('blog.urls')),rn url(r'^admin/', include(admin.site.urls)),rn]rnrnmysite 目录与blog目录同级rnblog/urls.pyrnfrom django.conf.urls import urlrnfrom blog import viewsrnurlpatterns = [ rn url(r'^$', views.archive),rn url(r'^create/', views.create),rn]rnrnrnblog/templates/archive.htmlrnrnrnrn rnTitle:rn rnBody:rn rnrnrn rnrnrn% for post in posts %rn post.title rn post.timestamp rn post.body rn rn% endfor %rnrnrnblog/models.pyrnrn# -*- coding: utf-8 -*-rnfrom __future__ import unicode_literalsrnrnfrom django.db import modelsrnrnclass BlogPost(models.Model):rn title = models.CharField(max_length=150)rn body = models.TextField()rn timestamp = models.DateTimeField()rn rn class Meta:rn ordering = ('-timestamp',)rnrn# Create your models here.rnrnblog/views.pyrnrnrn# -*- coding: utf-8 -*-rn# code for django 1.11rnfrom __future__ import unicode_literalsrnrnfrom django.shortcuts import renderrnrnfrom django.http import HttpResponse, HttpResponseRedirectrnfrom django.template import loader, Contextrnfrom blog.models import BlogPostrnrn# Create your views here.rnfrom datetime import datetimernfrom django.shortcuts import render_to_responsernfrom blog.models import BlogPostrnrnrndef archive(request):rn rn posts = BlogPost.objects.all()[:10]rnrn return render_to_response('archive.html', 'posts': posts)rnrnrnrndef create(request):rn if request.method == 'POST':rn BlogPost(rn title=request.POST.get('title'),rn body=request.POST.get('body'),rn timestamp=datetime.now(),rn ).save()rn return HttpResponseRedirect('/blog/')rnrnrnrn运行总是报错:rnrnrn[color=#FF0000]Page not found (404)rnRequest Method: POSTrnRequest URL: http://localhost:8080/blog/views/create/rnUsing the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:rn^blog/ ^$rn^blog/ ^create/rn^admin/rnThe current path, blog/views/create/, didn't match any of these.rnYou're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.[/color][color=#FF0000][/color]rnrnrnrn 论坛

没有更多推荐了,返回首页