Encoding the label column of a file #1043
george-vendras
started this conversation in
Ideas
Replies: 1 comment
-
For example, in var uniqueItemsList = readAllLines.Distinct().ToList();
how could I had avoided "uniqueItemsList"? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there. I am new to github. Today, I would try to encode the label column (of type string) into digits. Since I am not strong in c# prog, I could not quite handle IEnumerators and all these info I would find here and there, thus I was somewhat forced to write my own code, a process that took me around 5 hours 'cause C# debugger would ask me this or that all the time. I do not intend in hot encoding.
The idea here is that the label column is at the end of the matrix, perhaps, I could had added an if-statement to check whether the label column is number type or string type, okay, of course I have sense that my code is not efficient. that is because I am here to ask you:
A few times I see codes that create an object in order, for example, to calculate the determinant and I wonder why should this be the case and not be hosted into Program class as a internal or private static function.
Thanx in advance!
P.S. I have not done research for similar discussion because I searched a lot in google but returns were somewhat poor.
using System;
using System.Text;
using static System.Console;
using System.Globalization;
namespace SupportVectormachinePerceptron
{
class Program
{
public static void Main(string[] args)
{
Console.Title = "Support Vector Machine Perceptron Calculation";
}
Beta Was this translation helpful? Give feedback.
All reactions