Open cmpprg opened 1 year ago
Hey ya'll. Trying to create a matrix of all my data including categorical. Why does Daru::DataFrame#to_matrix only include numerical data?
could we potentially create an opt out for this functionality? Current:
def to_matrix Matrix.columns each_vector.select(&:numeric?).map(&:to_a) end
Suggestion(untested):
def to_matrix(only_numeric: true) if only_numeric Matrix.columns each_vector.select(&:numeric?).map(&:to_a) else Matrix.columns each_vector.map(&:to_a) end
I can put in a PR if you want? Just wanted get feedback and see if I am missing something first.
Hey ya'll. Trying to create a matrix of all my data including categorical. Why does Daru::DataFrame#to_matrix only include numerical data?
could we potentially create an opt out for this functionality? Current:
Suggestion(untested):