Python Forum
Python clustering homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python clustering homework
#1
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
Reply
#2
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.
Reply
#3
Since im very new to pyhton i didn't know how to write the code for this assignment , i really need help
Reply
#4
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  HELP in python homework makashito 4 3,859 Oct-12-2021, 10:12 AM
Last Post: buran
  CyperSecurity Using Python HomeWork ward1995 1 1,930 Jul-08-2021, 03:55 PM
Last Post: buran
Exclamation urgent , Python homework alm 2 2,255 May-09-2021, 11:19 AM
Last Post: Yoriz
  Homework with python Johnsonmfw 1 1,655 Sep-20-2020, 04:03 AM
Last Post: ndc85430
  Python Homework Help *Urgent GS31 2 2,536 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Python Homework Question OrcDroid123 1 2,340 Sep-01-2019, 08:44 AM
Last Post: buran
  Python homework / functions sunhyunshine 1 2,415 May-11-2019, 05:37 PM
Last Post: MrTheOne
  python homework help ASAP gk34332 1 2,940 Mar-13-2019, 07:27 PM
Last Post: ichabod801
  Python homework assigment makisha 3 3,230 Feb-28-2019, 10:21 PM
Last Post: Yoriz
  Python Homework Help beepBoop123 2 3,001 Dec-12-2018, 06:25 PM
Last Post: beepBoop123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020