Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    They want to take a random sample with 80% versicolor and 20% virginica. Your approach implies that the group sizes must be equal since you just sample X% of all group entries. While it is true for the iris data set, this is often not true in real world data sets. Commented Apr 25, 2017 at 11:18
  • @docendodiscimus I posted a new function. Does it meet your conditions? Thanks. I was trying to replace the Map with map2 or map, but it was not working correctly. DO you have advice? Thanks Commented Apr 25, 2017 at 12:47