Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

How would I create a clustering constraint generator?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Master Rancher
Posts: 4891
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Onion rings are vegetable donuts. Taste this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic