lzddzh / dataminingcompetitionfirstprize Goto Github PK
View Code? Open in Web Editor NEWDatacastle National Big Data Online Competition First Place Source Code助学金精准预测冠军代码
License: MIT License
Datacastle National Big Data Online Competition First Place Source Code助学金精准预测冠军代码
License: MIT License
你好啊,我在运行你们demo的时候发现,在process new feature 运行refresh_train.sh的时候,找不到tool.py这个脚本,想问一下,这个脚本是做什么样的处理的?可以提供一下这个脚本吗?
lines = open(root_loc).readlines()
for line in lines[:500]:
temps = line.strip("\n").split("$")
temps 读取出来的格式是 ['1006,"POS消费","地点551","淋浴","2013/09/01 00:00:32","0.5","124.9"']
'stuId':int(temps[0]) 不太对!
for i in range(1, len(temps)):
records = temps[i].split(",")
len(temps) 就为1 感觉不太对
如果第一步line 换成逗号分隔符(原始数据的分隔符是逗号)
for line in lines[:500]:
temps = line.strip("\n").split(",")
temps 读取出来的格式是 ['1006', '"POS消费"', '"地点551"', '"淋浴"', '"2013/09/01 00:00:32"', '"0.5"', '"124.9"']
for i in range(1, len(temps)):
records = temps[i].split(",")
cate = records[0].strip(""")
location = records[1].strip(""")[2:]
.....
一条记录遍历 6次 感觉也不太对。
看代码的意思是想把一条用户对应的多条消费记录取出来,然后在多条记录里面进行循环汇总,
不知道我有没有理解错?还是code有点小问题,中间少了步骤吗?Python菜鸟,求大神解释,先谢啦!
In readme, you say that after running processDorm, processLibrary ..., the new file will occur in trainProcessed or in testProcessed. The next step is running the refresh_train.sh. However, in the sh file,
it need
python tool.py add Card2Processed.txt normalization=$1 train
python tool.py add Card3Processed.txt normalization=$1 train
python tool.py add FacultyProcessed.txt normalization=$1 train
python tool.py add RankProcessed.txt normalization=$1 train
I think that must miss some file.
在python consume_rank_feature.py这个程序中
extract_rank_feature("../original_data/raw_data/test/subsidy_final_test.txt", final_rank,
score_dict, False)
extract_rank_feature("../original_data/raw_data/train/subsidy_train.txt", final_rank,
score_dict, True)
我跑程序时发生错误:IOError: [Errno 2] No such file or directory: '../original_data/raw_data/test/subsidy_final_test.txt'
数据中不是没有这个文件吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.