Closed hewitta closed 7 months ago
I think that your class label column is probably StringVector. You should call
df2 = df.factorize("class", ...)
to factorize string columns to categorical first. Replace class
to your column name.
That worked, thank you
Describe the bug Method toIntArray(int[]a) on line 109 in the BaseVector interface only has code to return an exception and can never return an int[]
Expected behavior The method should return an int[]
Actual behavior My stacktrace: Exception in thread "main" java.lang.UnsupportedOperationException at smile.data.vector.BaseVector.toIntArray(BaseVector.java:110) at smile.data.vector.BaseVector.toIntArray(BaseVector.java:101) at smile.classification.ClassLabels.fit(ClassLabels.java:120) at smile.feature.selection.SignalNoiseRatio.fit(SignalNoiseRatio.java:80) at MLPTest2.calculateS2R(MLPTest2.java:112) at MLPTest2.main(MLPTest2.java:46)
Code snippet The code to reproduce the behavior.
Input data The sample data
Additional context