clustering means grouping i.e we can put the same items on one floder then briefly i will explain with realtime example. Actually you have number of color balls in one container(one box) then take the same color balls in another box that is called as grouping or clustering.pickup same items and store on one location is called as clustering or groupings.
Actually i have number of text files(.txt) in one folder then i had taken that folder and applied clustering concepts using fuzzy c means clustering alogrithm.
successfully clustering works on that folder(set of text files)i.e grouping the same items successfully done but i have problem at after grouping task is complete then how can be store the grouping the same items in one folder.my problem is how to store the same items in one folder after grouping is complete
my code like as:
float fvalue = resultSet.Count;
string foldername = @"E:\ClusterGroups";
if (!System.IO.Directory.Exists(foldername))
{
Directory.CreateDirectory(foldername);
MessageBox.Show(" Created Successfully..........");
}
else
{
MessageBox.Show("Directory Already Exist ..........");
}
foreach (Centroid c in resultSet)
{
foreach (DocumentVector dv in c.GroupedDocument)
{
int docs = c.GroupedDocument.Count;
for (int j = 1; j <= fvalue; j++)
{
DirectoryInfo dr= Directory.CreateDirectory(foldername + "\\" + (j).ToString());
}
MessageBox.Show("folders created successfully..........");
}
}
i had traced the grouping the files at resultset collection
foreach (Centroid c in resultSet)
also i had create directory and sub directory in code centroid proprty class:
using System;
using System.Collections.Generic;
using System.Linq;
namespace cluster_form.Lib
{
public class Centroid
{
public List<DocumentVector> GroupedDocument { get; set; }
}
}
Document vectory property class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace cluster_form.Lib
{
public class DocumentVector
{
public string content { get; set; }
public float[] VectorSpace { get; set; }
}
}
one thing remember that whenever i had took the folder(set of files) for clustering at the time only reading the content of files only (but not for filenames) then apply clustering concept using fuzzy k means clustering alogrithem then grouping successfully done but i want to store the grouping files or clustering files in sub folder(E:\clustering groups).
IMPORTANT:
resultset collection store the grouping files(grouping documents)(foreach loop).
pls help me for coding.