合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代做DATA7703、代写Python程序语言

时间:2024-08-16  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



S2 - 2024 DATA7703 – Machine Learning for Data Scientists
Assignment 1
Decision Trees
Due date: Friday Aug 16 3pm
1. Training a Decision Tree
- First complete Q1 using the scikit-learn (sklearn) library (40%)
- Next complete Q1 without using any ML libraries, (ie. implement a decision tree
algorithm from scratch) (30%)
Write a program in Python to implement the ID3 decision tree algorithm. You should read in
a tab delimited dataset, and output to the screen the relevant results in some readable format.
 Name your program decisiontreeassignment.py
 Basic math and file reading functions from libraries such as numpy or pandas etc. are
allowed.
There are two sample datasets available from the course blackboard page you can use
 tennis.txt - Predict whether or not your tennis partner will join you to play tennis
based on weather.
 titanic2.txt - Predict the survival status of individual passengers on the Titanic based
on their passenger class, age and gender.
For the dataset files
 The first line of the file will contain the name of the fields.
 The last column is the classification attribute, and will always contain the
values yes or no.
 All files are tab delimited.
When you run your program, it should take a command-line parameter that contains the name
of the file containing the training data. For example:
python decisiontreeassignment.py tennis.txt
And it should output the training set accuracy in some readable form. You do not need to
print or display the resulting tree (unless you want to).
2. Max Tree Depth (15%)
- First complete Q2 using scikit-learn (sklearn) library (10%)
- Next complete Q2 without using any ML libraries (5%)
Add to your implementation so that you can limit the maximin tree depth. It should now take
an additional command-line parameter that sets the maximum tree depth. For example:
python decisiontreeassignment.py tennis.txt 5
3. Test Set (15%)
- First complete Q3 using scikit-learn (sklearn) library (10%)
- Next complete Q3 without using any ML libraries (5%)
Add to your implementation so that you can also pass a file containing data not in the training
data. It should now output the training set accuracy as well as the testing set accuracy in some
readable form.
The command-line call should now have a third parameter containing the name of the file
containing the testing data. For example:
python decisiontreeassignment.py tennis_trainingset.txt 5 tennis_testset.txt
You can create training and testing sets by (randomly) splitting the available data
appropriately.
Submission
Assignments to be completed individually and submitted through blackboard.
Due date
Friday Aug 16 3pm.

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp




 

扫一扫在手机打开当前页
  • 上一篇:代写代做INF10025 Data Management and Analytic
  • 下一篇:代做BSAN3212、代写c/c++,Python程序语言
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    新能源捕鱼一体电鱼竿好用吗
    新能源捕鱼一体电鱼竿好用吗
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
  • 币安app官网下载 短信验证码

    关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045