Wrapper-Feature-Selection-Toolbox-Python icon indicating copy to clipboard operation
Wrapper-Feature-Selection-Toolbox-Python copied to clipboard

ValueError

Open kismetllj opened this issue 3 years ago • 1 comments

Hiiiiiiii,I wonder why the following error appears after I copy your code and run it:
ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.

kismetllj avatar Nov 02 '22 13:11 kismetllj

Thank you for making this list as I don't understand the internals of Automa. I think it is fine to keep the Buffer type and .data, .markpos, .marginpos, and .bufferpos fields as they are very well documented in src/buffer.jl

Also, do you know if Automa is using the unread or unsafe_unread functions? I would like to better specify how those functions interact with position and mark.

Lastly, does Automa use any of the write functions?

nhz2 avatar Apr 01 '24 18:04 nhz2

Automa does not use unread or unsafe_unread. It does use Base.write, but not writing to a TranscodingStream, so it shouldn't be of concern for this package.

From what I can tell, what Automa uses is:

  • That you can get a Buffer containing the input data by doing stream.state.buffer1 - this could be changed to a getbuffer function if necessary
  • The fields .markpos, .marginpos and .bufferpos, and their precise meaning
  • That you can get a Vector{UInt8} by reading the .data field of a Buffer - this could perhaps be changed to a function also, since maybe in the future, this should be a Memory
  • That a TranscodingStream behaves like an ordinary IO object, e.g. that eof works and returns a Bool. This is perhaps too trivial to mention.

jakobnissen avatar Apr 02 '24 09:04 jakobnissen