-
原始数据划分为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
-
linux下C++编程入门及MAKE文件
linux下C++编程入门代码,helloworld 文件 信号量 文件属性 账号属性
linux cpluscplus program for new learner porpose
- 2023-01-07 19:30:03下载
- 积分:1
-
我自己写的文件列表程序,可以将一个目录下的文件名列表输出到一个文本文件中。...
我自己写的文件列表程序,可以将一个目录下的文件名列表输出到一个文本文件中。-my own list of documents written procedures can be a directory under the file name to a list of the output text file.
- 2022-06-18 23:08:29下载
- 积分:1
-
Microsoft MSF process guidance can be used to guide the 1 ~ 500 more than the de...
微软MSF过程指南,可以用于指导1~500人以上的团队进行协作开发-Microsoft MSF process guidance can be used to guide the 1 ~ 500 more than the development team to collaborate
- 2023-03-13 17:35:04下载
- 积分:1
-
分析导入表,整理导入表。在导入表中加上自己的DLL的代码。是可以插EXE和DLL的。:)...
分析导入表,整理导入表。在导入表中加上自己的DLL的代码。是可以插EXE和DLL的。:)-Analysis of import table, import table collation. In the import table of the DLL to add their own code. Can be inserted EXE and DLL
- 2022-07-11 12:55:27下载
- 积分:1
-
use id = main.jsp can see the list of files used only in exchanges, used to make...
使用main.jsp?id=就可以看到文件列表 仅做交流使用,用做商业用途,请保留此说明。 文件管理可以更改,删除文件,修改文件内容,修改文件名。-use id = main.jsp can see the list of files used only in exchanges, used to make commercial use, please retain this note. Document management can change, and delete files, modify the contents of the documents, modify the file.
- 2023-05-24 14:25:03下载
- 积分:1
-
基于vc对visio文件进行二次开发
基于vc对visio文件进行二次开发。比如,用visio 2013存储的 vsd格式文件,需要对文件内容进行提取,这时候就用到了这个代码。可以方便提取每个模块的信息。下载下来方便学习
- 2022-01-25 16:28:56下载
- 积分:1
-
基于OpenDWG开发AutoCAD Proxy对象图元分解程序
基于OpenDWG开发AutoCAD Proxy对象图元分解程序-OpenDWG based on the development of AutoCAD Proxy Object map yuan decomposition process
- 2022-05-28 05:57:11下载
- 积分:1
-
随便写的玩
一个简单的设置开机启动项,并且创建一个矩形计算文件,包含.vbs 和c
- 2023-05-07 14:15:03下载
- 积分:1
-
Delete the cycle with a certain characteristics of folders and files. The main s...
循环删除具有某一个特征的文件夹和文件. 主要用清除受版本控制源码的痕迹. -Delete the cycle with a certain characteristics of folders and files. The main source version control clearance by the traces.
- 2022-03-21 13:50:58下载
- 积分:1