Write some Software

已关闭

描述

Your task is to develop a series of functions, some of which we will develop together in class as examples (in python). You must develop each of the requested functions (that is, you can't change the structure of the application -- each of the requested functions must exist in the program you turn in, and each must work as requested). Here are the requirements for each:

euclidean_dist: Takes two tuples of floating-point values as input (equal length) and determines the euclidean distance between them. Simple enough :)

assign_initial_centroids: This function will have 2 parameters, k and data, where k is the number of centroids and data is a list of input tuples (data points, all floating point values). You may implement this any way you wish, as long as it returns a list of tuples with the appropriate length (the same number of floating point attributes as in the data set). Experiment!

assign_tuples_to_clusters: This function will take a list of tuples representing the centroids and a list of tuples representing the original dataset. It will assign each data point in the data set to a cluster corresponding to one of the centroids (the closest centroid, according to the euclidean distance function). In the case of a tie, choose the first centroid in the list. It should return a list of lists of tuples, where each "sub list" represents a single cluster. Order is not important, but it may be helpful for you to maintain the same order as the clusters came in for debugging purposes.

derive_centroids_for_clusters: This function should simply take a list of lists of tuples representing the clustered input data, as returned by assign_tuples_to_clusters. There should be k lists (clusters) in this input so this function should find a centroid for each list (as a tuple) and return a list of the centroids. The centroids should have averaged values for each attribute of each tuple in a single cluster.

kmeans_cluster: This function should take an integer (k -- the number of clusters/centroids) and a list of tuples (the initial dataset). It should first call assign_initial_centroids to determine the initial set of k centroids to work with and print the results. It should then enter a loop in which it computes new clusters for these centroids (and prints the results) and then computers new centroids for the new clusters (and prints the results). It should terminate when the computed centroids do not change from the prior iteration.

Once each of these functions are written, you should develop a script that reads in a file named [url removed, login to view] from the local folder which holds the input tuples in csv format (no spaces will be included, for simplicity). You should hardcode k and process this file using the kmeans algorithm, printing the resulting clusters.

技能: Python, 软件构架

查看更多: you have beenin a vrsit to bijaya write a latter in fring your frind, write an article in which your sensitize people of the causes and effect of pollution, write aletter to your younger brother amit advising him to give up abad compony and toconcentrate on his academics in thelast ye, alcohol is advertised in media yes or no write essay about your opinion, software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, software write websites idea, software write book images, software write books, software write protection, free software write book, software write book, software write protect software, software write technical manual

Project ID: #12152094

已悬赏给:

iyersume

Hi, I am proficient in Python, Machine Learning and Data Science. I would like an opportunity to work with you on this project. Please feel free to ping me on chat. My bid is an estimate and may change based on scope o 更多

$35 USD 在3天内
(14条评论)
3.8

7 freelancers are bidding on average $72 for this job

kjgroup197318

-----------------------------Professional Python Developer! Best Result in Time!------------------------------ Dear sir. I read your project description very carefully. Your project is very interesting to me, becau 更多

$150 USD in 1 day
(32条评论)
5.9
$60 USD in 1 day
(34条评论)
5.0
$200 USD in 1 day
(18条评论)
4.7
zkutch

Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -------------------------------------------------------------------------------------------------------------- 更多

$25 USD in 1 day
(13条评论)
4.2
AdeelAslam4

Hi there! I have read what you exactly need, however I would like to ask you a few questions. I wouldn't call myself a master but I do work smart and do not rest until I get the job done. Please feel free to ping me an 更多

$111 USD 在3天内
(2条评论)
2.3
$25 USD in 1 day
(2条评论)
2.1
marcnabillabib

I am an embedded systems engineer , and I learned Python and creating functions is a fairly easy subject , so this project shouldn't be any problem. Feel free to contact me if you have any questions.

$30 USD 在2天内
(2条评论)
2.0
$45 USD in 1 day
(2条评论)
1.3
xarpa

Academic Project Skills ==================== I do High end academic projects, advanced research projects, software projects, web designing projects, all engineering projects. I Worked with the US, UK, UAE, AUS, ASIA 更多

$100 USD in 1 day
(0条评论)
0.0