Python clustering homework - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Python clustering homework (/thread-10080.html) |
Python clustering homework - wjpython - May-11-2018 Dear all, I really need your help with this assignment: generate random data with dimension 5 and 4 clusters, then calculate the validity index for various values of k and show that k=4 has the highest validity im really new to pyhton and i'm managed to do this so far import numpy as np import pandas as pd from numpy.random import random from numpy.random import randn np.random.seed(20) y=pd.DataFrame(randn(4,5)) print(y)can anyone tell me how to write the full alogrithm , it would be muuuuuch appreciateeed RE: Python clustering homework - j.crater - May-11-2018 You must need to know the algorithm in order to implement it. But this is a Python forum, so we can only help you with the code you have produced. If you are stuck I suggest writing pseudo code first. Then attempt to translate it to Python. If there is a particular portion of the code that is causing you issues, post the code you have and explain exactly what the problem is. RE: Python clustering homework - wjpython - May-11-2018 Since im very new to pyhton i didn't know how to write the code for this assignment , i really need help RE: Python clustering homework - j.crater - May-11-2018 In that case you need to start with studying Python basics. Since it is an assignment, I assume you have access to learning materials. Otherwise internet is full of great free resources. As I explained in previous post, we can help you with your code, but not write the code for you. |