Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the Binary Classification With Array float values #2952

Closed
vrjesus opened this Issue Mar 14, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@vrjesus
Copy link

vrjesus commented Mar 14, 2019

Binary classification

I want create a Machine Learning, but I need use a vector (array) of floats values (through of a sensor). My question is this, each value must be a Column or I must create a single Column with all values separate with a the comma?

@rogancarr

This comment has been minimized.

Copy link
Contributor

rogancarr commented Mar 14, 2019

@vrjesus You can keep your data as an array of floats. You can define a class with a float array and read them into an IDataView.

Define a class like this:

public class MyClass
{
   public float[] MyVector {get; set;}
}

and read it from an Enumerable like this:

var mlContext = new MLContext(seed: 1);
var data = mlContext.Data.LoadFromEnumerable<MyClass>(myStream);

If you have data in a text file, you can look at this sample for how to specify the class such that you can read it in with mlContext.Data.LoadFromTextFile<MyClass>.

@singlis

This comment has been minimized.

Copy link
Member

singlis commented Mar 18, 2019

@vrjesus I am closing this issue. If this is not resolved, please re-open.

@singlis singlis closed this Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.