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

StringIndexer.labels() result can't be jsonified #274

Open
doronrosenberg opened this issue Jun 15, 2016 · 0 comments
Open

StringIndexer.labels() result can't be jsonified #274

doronrosenberg opened this issue Jun 15, 2016 · 0 comments
Labels

Comments

@doronrosenberg
Copy link
Collaborator

var StringIndexer = require(EclairJS_Globals.NAMESPACE + '/ml/feature/StringIndexer');
var stringIndexer1 = new StringIndexer();

var SparkContext = require(EclairJS_Globals.NAMESPACE + '/SparkContext');
var jsc = new SparkContext("local[*]", "test");

var SQLContext = require(EclairJS_Globals.NAMESPACE + '/sql/SQLContext');
var sqlcontext1 = new SQLContext(jsc);

var data = sqlcontext1
  .read()
  .format("libsvm")
  .load("/Users/doronrosenberg/mystuff/ibm/eclairjs/git/eclairjs-nashorn/examples/data/mllib/sample_libsvm_data.txt");

var labelIndexer = new StringIndexer()
  .setInputCol("label")
  .setOutputCol("indexedLabel")
  .fit(data);

running JSON.stringify(labelIndexer.labels()) === undefined shows true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant