Skip to content

Conversation

@AvanishSalunke
Copy link
Contributor

@AvanishSalunke AvanishSalunke commented Dec 5, 2025

Closes #310

@pr0m1th3as
Copy link
Member

A few remarks about your implementation.

datatypes provides a string class, which you can use.
When creating cellstring arrays, use single quotes. Sooner or later, core Octave will get a string array class and it is best to start preparing towards this goal. So use single quotes for cell arrays of character vectors.
It would be nice to include some demos in a file named cvpartition.summary placed in the /inst/demos/ folder. Please avoid using exact copies of the examples in MATLAB documentation. Unless it is a public dataset included in statistics, use your own values to demonstrate the usage of the summary method.

@pr0m1th3as
Copy link
Member

FYI, the table implementation supports both string arrays and categorical arrays.

@pr0m1th3as
Copy link
Member

Your changes to single quotes won't work. Leave or error messages with double quotes as they were. Only use single quotes for character vectors in cell arrays. You should also adapt your actual code to use string arrays in the table for the sets (as it is in MATLAB).

Always test your code before committing a PR. It saves us both a lot of time. Can you also add a few demo examples (see my previous comment). Thanks

@AvanishSalunke
Copy link
Contributor Author

Yes, @pr0m1th3as i am working on it !!
Thankyou!!

@AvanishSalunke AvanishSalunke marked this pull request as draft December 6, 2025 16:37
@AvanishSalunke AvanishSalunke marked this pull request as ready for review December 7, 2025 17:19
@AvanishSalunke
Copy link
Contributor Author

@pr0m1th3as, tried to do all the changes as said, apologies for the last commit because I forgot to put the PR on draft mode.
Thankyou!! Awaiting for your review !

coding style fix in demo file
@pr0m1th3as
Copy link
Member

The demos in cvpartition.summary don't look right to me. Some of then are just comments. Have you tested them locally?

@pr0m1th3as
Copy link
Member

You can reuse some of the BISTs as demo as well.

@AvanishSalunke
Copy link
Contributor Author

AvanishSalunke commented Dec 8, 2025

@pr0m1th3as yes i have tested them locally. If specific type of demos are needed like allowing the user to test each feature or something do tell me.
Thankyou!!

@AvanishSalunke
Copy link
Contributor Author

You can reuse some of the BISTs as demo as well.

Sure that would be nice
Will get into it!!

@pr0m1th3as
Copy link
Member

Abut demos, one issue is that you should use seeding just before randperm to ensure that the demo is always reproducible, otherwise, each time a slightly different version will be generated causing new HTML in online docs.
The other issue is that you should not share variables between demos. Each demo should be standalone, otherwise you are risking leaking variables into the user's workspace.

@AvanishSalunke
Copy link
Contributor Author

AvanishSalunke commented Dec 8, 2025

Abut demos, one issue is that you should use seeding just before randperm to ensure that the demo is always reproducible, otherwise, each time a slightly different version will be generated causing new HTML in online docs. The other issue is that you should not share variables between demos. Each demo should be standalone, otherwise you are risking leaking variables into the user's workspace.

I have tried to fix those things in the file. The new demo file is working corresponding to all the changes in the datatypes package. Awaiting for your review.
Thankyou!!

@pr0m1th3as
Copy link
Member

Have you tested against the latest dev of the datatypes package? I am currently adding test suite for the ismissing method for table class and once done, I will make a new release, so that we can update the dependency of statistics, before pushing your summary method to a new release.

It might take some time, but I will do my best to push everything to production today. Many thanks for your work on this.

@AvanishSalunke
Copy link
Contributor Author

AvanishSalunke commented Dec 8, 2025

Have you tested against the latest dev of the datatypes package?

Yes I have tested it considering ur last commit

Add support for categorical and calendarDuration datatypes in mixed indicator argument, update docstring
main

We can still do it again after all your work is done
Thankyou!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The summary method in cvpartition is unimplemented.

2 participants