|
-
October 11th, 2012, 12:19 PM
#4
Re: insert value to listview from calculations
this is a calculation to find item support from transactions
string output1 = "";
string output = "";
ListViewItem u = new ListViewItem();
string lines = File.ReadAllText(@"C:\Users\ACER\Desktop\Apriori Demo\UCI dataset\testt.txt"); file Transactions
string list = "";
list = lines.Replace("\r\n", " ");
output += list;
string[] c = output.Split(' ');
List<String> cc = new List<String>(c);
cc.Sort();
var fr = cc.GroupBy(n => n).Select(n => new { Value = n.Key });
foreach (var f in fr)
{
string text2 = (string.Format("{0} ", f.Value));
output1 += text2 + "\n";
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|