• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

How would I create a clustering constraint generator?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My goal is to create a data clustering constraint generator java class that randomly picks x and randomly picks y from a given file. Then, appends a constraint between the x and y elements (either a must-link of 1 (must be in the same cluster), cannot-link of -1 (cannot be in the same cluster) or unknown of 0 (no constraint)) so I can then save them as a constraint file. In a similar format to



An example is this...



This is what I have so far...



Above outputs:


I am really struggling after looking at this for hours. How could I get this working with a data file etc. as well as appending 1, 0 or -1 at the end of each group of 2. Could anyone please help me?
 
Rancher
Posts: 3623
34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

randomly picks x and randomly picks y from a given file. Then, appends a constraint between the x and y elements


Can you explain the steps the program would take to do that? What decisions will it have to make?  What will be the results of those decisions?

Also post a simple example of a file with value that would be randomly chosen and then the constraint value the program would assign.
Explain why the program chose that constraint value.
 
Let's go to the waterfront with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!