-
原始数据划分为train.dat和test.dat
应用背景开始是做movielense的数据,可以把原始数据任意划分为train.dat和test.dat,主要是为了做验证实验。非常简单明了,适合初学者看看,如果不喜欢,请轻喷。关键技术# -*- coding: cp936 -*-
from sklearn import cross_validation
c = []
filename = r"Raw.data" #原始数据
out_train = open(r"train.txt","w") #训练集
out_test = open(r"test.txt","w") #测试集
for line in open(filename):
items = line.strip().split(",")
c.append(items)
c_train,c_test = cross_validation.train_test_split(c,test_size=0.1)#size =你需要的比例
for i in c_train:
out_train.write(",".join(i)+"
")
for i in c_test:
out_test.write(",".join(i)+"
")
- 2022-01-25 21:21:56下载
- 积分:1
-
数据格式转换,实现了将dat格式文件,转换成nas格式文件,方便地导入到CAD/CAE系统中...
数据格式转换,实现了将dat格式文件,转换成nas格式文件,方便地导入到CAD/CAE系统中-data format conversion, the realization of dat format, converted into nas format and easily imported into CAD/CAE system
- 2022-01-26 04:25:46下载
- 积分:1
-
FTP client for file and folder enumeration and populate the list box and then up...
用于FTP客户端文件和文件夹的列举并填入列表框中然后上传,和下载-FTP client for file and folder enumeration and populate the list box and then upload, and download
- 2022-08-16 14:21:14下载
- 积分:1
-
chm 帮助很多人问起现在的CHM帮助文档如何作为软件的热点敏感帮助,网上搜索的资料也不多,可能是太简单了吧,...
chm 帮助很多人问起现在的CHM帮助文档如何作为软件的热点敏感帮助,网上搜索的资料也不多,可能是太简单了吧,-chm helpful to a lot of people asked now how CHM help documentation software as a hot-sensitive help. Search online information is not large, may be too simplistic a bar, Oh
- 2022-02-03 09:15:52下载
- 积分:1
-
可以直接将数据库资料,写成excel文件。
可以直接将数据库资料,写成excel文件。-directly to the database, document written excel.
- 2022-02-04 07:07:04下载
- 积分:1
-
Times the software can encrypt documents, to ensure that information security do...
次软件可以给文件进行加密,确保文件信息的安全.-Times the software can encrypt documents, to ensure that information security documents.
- 2022-07-07 12:25:40下载
- 积分:1
-
用Java实现的文件输入输出源代码,适合于初学Java者
用Java实现的文件输入输出源代码,适合于初学Java者-using Java in the paper input and output source code for Java were toddlers
- 2022-04-17 02:40:31下载
- 积分:1
-
wave test program that debug succesfuled i n the visual c 6.0. please try it you...
test wave program that debug succesfuled in the visual c++ 6.0 . please try it yourself .-wave test program that debug succesfuled i n the visual c 6.0. please try it yourself.
- 2023-05-08 18:00:02下载
- 积分:1
-
VC7.1项目文件将被转换为VC6.0
将 vc7.1 的工程文件转换为vc6.0的-Vc7.1 the project file will be converted to the vc6.0
- 2022-04-20 10:26:06下载
- 积分:1
-
问答管理系统
资源描述就是一个用户管理系统啊,然后里面需要登陆,登录了之后可以加关注,还可以点赞,还可以乱七八糟回答问题提出问题啥的,还可以查看自己的关注列表。
- 2022-03-14 07:05:31下载
- 积分:1