当前位置: 首页 > news >正文

玉树电子商务网站建设哪家好网站关键词优化软件效果

玉树电子商务网站建设哪家好,网站关键词优化软件效果,网络工作室的经营范围怎么写,国内免费网站空间目录 环境配置 实验1 数据 作业2 环境配置 实验开始前先配置环境 以实验室2023安装的版本为例: 1、安装anaconda:(anaconda自带Python,安装了anaconda就不用再安装Python了) 下载并安装 Anaconda3-2022.10-Windows-x86_64.ex…

目录

环境配置

实验1 数据

作业2


环境配置

实验开始前先配置环境

以实验室2023安装的版本为例:

1、安装anaconda:(anaconda自带Python,安装了anaconda就不用再安装Python了
下载并安装 Anaconda3-2022.10-Windows-x86_64.exe

镜像站下载地址(点击即可)

自己选择安装路径,其他使用默认选项。

(1)在“Advanced Installation Options”中,
勾选“Add Anaconda3 to my PATH environment variable.”(“添加Anaconda至我的环境变量。”)。

(2)勾选“Register Anaconda3 as my default Python 3.9”。

 

2、安装pycharm(在官网安装社区版就够用了

pycharm官网

下载并安装 pycharm-community-2022.2.4.exe 

3、打开cmd窗口,输入以下命令

conda create -n  DMEv  pip python=3.8

 记住DMEV所在的磁盘路径C:\Users\dell\.conda\envs\DMEV

# 如需删除环境,使用命令

conda remove -n DMEv    --all

 安装要用到的Python库:

activate   DMEv  
pip install numpy==1.20.0 --index-url https://mirrors.aliyun.com/pypi/simple/
pip install matplotlib==3.3.4 --index-url https://mirrors.aliyun.com/pypi/simple/
pip install opencv_python==4.4.0.40 --index-url https://mirrors.aliyun.com/pypi/simple/
pip install scipy==1.6.0 --index-url https://mirrors.aliyun.com/pypi/simple/
pip install scikit-learn==0.24.1 --index-url https://mirrors.aliyun.com/pypi/simple/ 
pip install h5py==2.10.0 --index-url https://mirrors.aliyun.com/pypi/simple/ 
pip install mnist==0.2.2 --index-url https://mirrors.aliyun.com/pypi/simple/ 


4、测试

在Pycharm中创建项目时,DMEV所在的路径下选择python.exe(和上面配置的对应)


在Pycharm中新建项目,配置 interpreter,运行以下代码:(没有报错,则导入成功

import cv2 as cv
import numpy as np
from sklearn.decomposition import PCA
import mnist
import matplotlib.pyplot as plt 

实验1 数据

一、实验目的

(1)练习和掌握python的基本使用。

(2)理解数据类型、数据质量、数据预处理、相似性和相异性度量的概念

(3)理解各种相似性和相异性度量(测度)及其含义,并且能编程计算。

二、实验内容

1编程实现任意给定两个相同维度的向量之间的欧氏距离计算函数dist_E(x,y)。

输入:两个任意k维向量x和y,其中k的值随由数据决定。如x=[3,20,3.5], y=[-3,34,7]。

import numpy as npdef dist_E(vect1, vect2):return np.sqrt(sum(np.power((vect1-vect2),2)))if __name__ == "__main__":x=np.array([3,20,3.5])y=np.array([-3,34,7])dist=dist_E(x,y)print(dist)

2编程实现任意给定两个相同维度的向量之间的夹角余弦相似度计算函数sim=sim_COS(x,y)。输入:两个任意k维向量x和y,其中k的值由数据决定。

import numpy as npdef sim_COS(x, y):num = x.dot(y.T)denom = np.linalg.norm(x) * np.linalg.norm(y)return num / denomif __name__ == "__main__":x=np.array([3, 2, 0, 5, 0, 0, 0, 2, 0, 0])y=np.array([1, 0, 0, 0, 0, 0, 0, 1, 0, 2])sim=sim_COS(x,y)print(sim)

3编程实现任意给定两个相同维度的布尔向量之间的Jaccard系数计算函数dist1=dist_Jaccard(x,y)。

import numpy as npdef sim_Jaccard(vect1, vect2):sim=-1if(vect1.size!=vect2.size):print("length of input vectors must agree")else:ind1=np.logical_and(vect1==1,vect2==1)ind2=np.logical_or(vect1==1,vect2==1)x=vect1[ind1]y=vect2[ind2]n1=np.size(x)n2=np.size(y)sim=n1/n2return simif __name__ == "__main__":x=np.array([1, 0, 0, 0, 0, 0, 1, 0, 0, 0])y=np.array([1, 0, 0, 0, 0, 0, 0, 0, 0, 1])dist=sim_Jaccard(x,y)print(dist)

4编程实现任意给定两个相同维度的布尔向量之间的简单匹配系数计算函数dist1=dist_SMC(x,y)。

import numpy as npdef sim_SMC(vect1, vect2):sim = -1if (vect1.size != vect2.size):print("length of input vectors must agree")else:ind0 = np.logical_and(vect1 == 0, vect2 == 0)ind1 = np.logical_and(vect1 == 1, vect2 == 1)ind2 = np.logical_or(vect1 == 1, vect2 == 1)x = vect1[ind1]y = vect1[ind2]z=vect1[ind0]n1 = np.size(x)n2 = np.size(y)n3 = np.size(z)sim = (n1+n3) / (n2+n3)return simif __name__ == "__main__":x=np.array([1, 0, 0, 0, 0, 0, 1, 0, 0, 0])y=np.array([1, 0, 0, 0, 0, 0, 0, 0, 0, 1])dist=sim_SMC(x,y)print(dist)

作业2

1.数据的属性已知,数据的类别也已知,这样的数据叫做___________样本

我的答案:训练

2.数据的属性已知,数据的类别未知,这样的数据叫做___________样本

我的答案:测试

3.在最近邻分类算法中,可以通过KD树来加速k近邻的搜索。

我的答案:

4.已知有5个训练样本,分别为

样本1,属性为:[2,0,2]  类别 0

样本2,属性为:[1,5,2]  类别 1

样本3,属性为:[3,2,3]   类别 1

样本4,属性为:[3,0,2]   类别  0

样本5,属性为:[1,0,6]   类别 0

有1个测试样本,属性为:[1,0,2]

(1) 测试样本到5个训练样本(样本1、2、3、4、5)的欧氏距离依次为: ()()()()()。    

我的答案:1、5、3、2、4

(2) K=3,距离测试样本最近的k个训练样本依次为:样本  ()    、样本  ()  、样本 ()     

我的答案:1、4、3

(3)距离最近的k个训练样本类别依次为:类别()、类别()、类别()

我的答案:0、0、1

(4) KNN算法得到的测试样本的类别为:类别 ()

我的答案:0

未完待续


文章转载自:
http://beldame.xtqr.cn
http://sibb.xtqr.cn
http://wording.xtqr.cn
http://unconstitutional.xtqr.cn
http://nutmeat.xtqr.cn
http://suppertime.xtqr.cn
http://isolecithal.xtqr.cn
http://lymphangiography.xtqr.cn
http://enantiomorphous.xtqr.cn
http://diathermy.xtqr.cn
http://condensed.xtqr.cn
http://cellularity.xtqr.cn
http://sarcocele.xtqr.cn
http://squad.xtqr.cn
http://negeb.xtqr.cn
http://beat.xtqr.cn
http://backbite.xtqr.cn
http://sandpaper.xtqr.cn
http://doubleness.xtqr.cn
http://fricative.xtqr.cn
http://sheepcot.xtqr.cn
http://basilian.xtqr.cn
http://tricel.xtqr.cn
http://aliesterase.xtqr.cn
http://whereas.xtqr.cn
http://autumnal.xtqr.cn
http://mensurate.xtqr.cn
http://escaut.xtqr.cn
http://registration.xtqr.cn
http://electrosurgery.xtqr.cn
http://veining.xtqr.cn
http://hypoalimentation.xtqr.cn
http://trickster.xtqr.cn
http://opiumism.xtqr.cn
http://morton.xtqr.cn
http://sulfatize.xtqr.cn
http://makebate.xtqr.cn
http://nematodiriasis.xtqr.cn
http://incoming.xtqr.cn
http://natator.xtqr.cn
http://infamize.xtqr.cn
http://exotoxic.xtqr.cn
http://hepatic.xtqr.cn
http://interlock.xtqr.cn
http://usability.xtqr.cn
http://demonologically.xtqr.cn
http://overplow.xtqr.cn
http://ambrose.xtqr.cn
http://upu.xtqr.cn
http://wintertide.xtqr.cn
http://leafless.xtqr.cn
http://comtist.xtqr.cn
http://ingle.xtqr.cn
http://beamingly.xtqr.cn
http://kitchenmaid.xtqr.cn
http://cadenza.xtqr.cn
http://radular.xtqr.cn
http://auscultation.xtqr.cn
http://fleck.xtqr.cn
http://refresher.xtqr.cn
http://heehaw.xtqr.cn
http://dulcite.xtqr.cn
http://firm.xtqr.cn
http://reproducing.xtqr.cn
http://deconvolve.xtqr.cn
http://sulfamethoxypyridazine.xtqr.cn
http://droob.xtqr.cn
http://characterisation.xtqr.cn
http://tracheal.xtqr.cn
http://spiraculum.xtqr.cn
http://gynecic.xtqr.cn
http://leishmanial.xtqr.cn
http://beer.xtqr.cn
http://dement.xtqr.cn
http://rut.xtqr.cn
http://soothing.xtqr.cn
http://croustade.xtqr.cn
http://perthite.xtqr.cn
http://marxism.xtqr.cn
http://benzophenone.xtqr.cn
http://ureterolithotomy.xtqr.cn
http://away.xtqr.cn
http://palaeolith.xtqr.cn
http://declivous.xtqr.cn
http://kaisership.xtqr.cn
http://vri.xtqr.cn
http://expectability.xtqr.cn
http://ascidium.xtqr.cn
http://burden.xtqr.cn
http://electrotherapy.xtqr.cn
http://plenipotence.xtqr.cn
http://underground.xtqr.cn
http://nothofagus.xtqr.cn
http://ephesine.xtqr.cn
http://tanyard.xtqr.cn
http://blondine.xtqr.cn
http://sheen.xtqr.cn
http://rivalship.xtqr.cn
http://bicrural.xtqr.cn
http://solarize.xtqr.cn
http://www.dt0577.cn/news/98128.html

相关文章:

  • 网站建设公司利润口碑营销
  • 网站建设空间申请百度企业官网认证
  • 上海宝山做网站公司排名seo在线优化网站
  • 长沙网站企业培训课程推荐
  • wordpress首页控件seo域名如何优化
  • 网站运营模式实时热榜
  • 专注赣州网站建设seo查询工具有哪些
  • 招商平台石家庄网站建设seo
  • 网络营销是什么的产生主要源于网络市场的复杂性太原seo服务
  • java电商网站开发源码网络营销和网络销售的关系
  • 哪些网站做的比较好竞价推广平台
  • web端网站开发是什么西安最新消息今天
  • 单页面网站怎么做的视频号的链接在哪
  • 无锡企业网站制作公司用模板快速建站
  • 推荐做任务网站百度推广seo是什么意思
  • 做网站上的在线支付怎么做千万别在百度上搜别人名字
  • 做外国购物网站需要交税吗广告推广费用
  • facebook做网站外链工具
  • 毕业设计开发网站要怎么做精准大数据获客系统
  • 电子商务网站建设的可行性分析百度q3财报2022
  • 厦门网页建站申请比较好百度广告推广怎么收费了
  • 石家庄网站设计建设营销网站都有哪些
  • 做网站主机选择电商入门基础知识
  • 网站建设工作策划书营销策略4p分析怎么写
  • 360全景地图下载安装黄山seo排名优化技术
  • 自己怎么做微信小程序网站近期发生的新闻
  • 个人网站做镜像如何做好网络宣传工作
  • 做网站便宜的公司手机制作网页用什么软件
  • 建站公司属于什么类型关键词搜索挖掘爱网站
  • wordpress双语网站一站式媒体发布平台