-
原始数据划分为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
-
我写的一对小批量的翻译程序,使用的话。
我自己写的一个对单词进行批量翻译的小程序 还好用-I wrote the words for one pair of small quantities translation procedures used better
- 2022-07-15 00:15:46下载
- 积分:1
-
VC++ 6.0 written on the use of API function test procedure for emptying the recy...
VC++6.0写的关于用API函数清空回收站的测试程序,欢迎大家下载-VC++ 6.0 written on the use of API function test procedure for emptying the recycle bin, welcome everyone to download
- 2022-01-26 01:46:59下载
- 积分:1
-
源代码)免费软件,能够自动查找系统的垃圾文件 可手动添加垃圾文件格式。只需对磁盘做个快照,以后可以随时搜索磁盘新增文件,然后将其删除。可将这些搜索到的新增文件以...
源代码)免费软件,能够自动查找系统的垃圾文件 可手动添加垃圾文件格式。只需对磁盘做个快照,以后可以随时搜索磁盘新增文件,然后将其删除。可将这些搜索到的新增文件以文件的方式保存,便于以后清理。注册表Add/Remove清理,使得你清理注册表更方便、快捷。-source code) free software to automatically search the garbage documents can be manually add garbage files. Just to be a snapshot of the disk, then you can always search the new disk, and then to delete it. They can be searched in the new document to the document preservation, to facilitate later cleared. Registry Add/Remove clear that you clean up the registry more convenient and efficient.
- 2022-02-26 22:38:41下载
- 积分:1
-
netty-springmvc整合netty和springmvc
netty-springmvc整合netty和springmvc 框架,提高开发效率
- 2022-01-28 07:42:24下载
- 积分:1
-
我自己精心设计的一个源码,仿WINDOWS安装界面,可以学习很多代码.注意不要删除Setup.exe.manifest这个文件,否则会丢失XP界面(小技巧:把S...
我自己精心设计的一个源码,仿WINDOWS安装界面,可以学习很多代码.注意不要删除Setup.exe.manifest这个文件,否则会丢失XP界面(小技巧:把Setup.exe.manifest文件改名"VB6.exe.manifest"复制在VB6.EXE同一目录下可使VB6的界面变成XP样式.编译后也要把这个文件放在EXE目录下,"VB6.exe.manifest"改名"EXE文件名.exe.manifest").-I have designed a source, like WINDOWS installation interface, you can learn a lot of code. Setup.exe.manifest careful not to delete this file, or else they will lose XP interface (Tips: Setup.exe.manifest file renamed to
- 2022-03-20 19:43:05下载
- 积分:1
-
bat 批处理文件编辑绿色软件
仅供学习用,仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用仅供学习用
- 2022-02-14 18:16:14下载
- 积分:1
-
这是一个用二分法搜索数据的例子,希望对朋友们有帮助。
这是一个用二分法查找数据的例子,希望对朋友们有所帮助。-This is a search for data using dichotomy example, and I hope to help friends.
- 2022-02-02 23:11:55下载
- 积分:1
-
防EXCEL写的,内容很不错,希望有高手把他再完善.其中用到了一个FlexCell表格控件,需要注册,请用户支持正般....
防EXCEL写的,内容很不错,希望有高手把他再完善.其中用到了一个FlexCell表格控件,需要注册,请用户支持正般.
- 2023-01-11 14:15:04下载
- 积分:1
-
将网页上的文字提取下来保存在本地数据文件的工具.
将网页上的文字提取下来保存在本地数据文件的工具.-website will be extracted from the text stored in the local data files tool.
- 2023-07-30 18:35:03下载
- 积分:1