{"title":"Equal Size Sampling","nodeType":"Manipulator","id":"*nZoZFKRELGnk6y5i","factoryName":"org.knime.base.node.preproc.equalsizesampling.EqualSizeSamplingNodeFactory","factoryId":"org.knime.base.node.preproc.equalsizesampling.EqualSizeSamplingNodeFactory","path":["Manipulation","Row","Transform"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>Removes rows from the input data set such that the values in a categorical column are equally distributed. This can be useful, for instance if a learning algorithm is prone to unequal class distributions and you want to downsize the data set so that the class attributes occur equally often in the data set.</p>\n             \n            <p>The node will remove random rows belonging to the majority classes. The rows returned by this node will contain all records from the minority class(es) and a random sample from each of the majority classes, whereby each sample contains as many objects as the minority class contains.</p>\n            \n        \n        ","shortDescription":"Removes rows from the input data set such that the values in a categorical column are equally\n    distributed.","keywords":[],"deprecated":false,"streamable":false,"tags":["Manipulation","Row","Transform"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowYjM2YWM5Ny01ZWJhLTQwZTctOTE4OS1iYmU4ZDdkMGYyNGUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTdBNzg2NkI4N0U4MTFFNUIyNjBENUZBOEI3RjgwMEUiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTdBNzg2NkE4N0U4MTFFNUIyNjBENUZBOEI3RjgwMEUiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNzU0NzI4NjE2OEMxMUU1QkQ5NUExQjU5MUVDNkZCQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNzU0NzI4NzE2OEMxMUU1QkQ5NUExQjU5MUVDNkZCQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pi0ttKwAAACqSURBVHjaYmFAA////2dgZGT8LyUujSLOwsLy9dHThzzo6lkYcICnL56g8BXllJixqWNiIBL8+/ePGeQ6dMyIywsgGhkAxbAazMJAAkA3VFpChngv4AIUGwDywn9i/IrPAIbnvgEogpKbNzB8mmKDodhn0QEUPjs7O2VeACYuKgQiepKleywMvAGMwDD4jy747OVTBlUlNUQSBsI7926jiIHAt2/fGAACDAD99DukG2g4gwAAAABJRU5ErkJggg==","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Input","description":"Arbitrary input data."}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Downsampled input","description":"The input data with fewer rows."}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"sectionName":"Options","fields":[{"name":"Nominal column","description":"Select the class column here. The node will run over the data set once to count the occurrences in this selected column and then do the filtering in a second pass. Note that missing values in this column are treated as a separate category (can also build the minority class).","optional":false},{"name":"Sampling method","description":"Choose the sampling method for equal size sampling:\n<ul><li><b>Use exact sampling</b> : The final output will be determined up-front. Each class will have the same number of instances in the output table. This sampling is slightly more memory expensive as each class will need to be represented by a bit set containing instances of the corresponding rows. In most cases it is safe to select this option unless you have very large data with many different class labels.</li><li><b>Use approximate sampling</b> : The final output will be determined on the fly. The number of occurrences of each class may slightly differ as the final number can&#39;t be determined beforehand.</li></ul>","optional":false},{"name":"Enable static seed","description":"If selected, the removal of rows is driven by a static seed for reproducible results.","optional":false},{"name":"Random seed","description":"The seed value for the random number generator.","optional":false},{"name":"Draw seed","description":"Generate a random seed and set it in the Random seed input above for reproducible runs.","optional":false}]}],"links":[],"kudos":[],"kudosCount":0,"bundleInformation":{"bundleVersion":"5.12.0.v202606261225","bundleName":"KNIME Base Nodes","bundleSymbolicName":"org.knime.base","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.base","featureName":"KNIME Base nodes","featureVersion":"5.12.0.v202606261225","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*bjR3r1yWOznPIEXS"},"frequentSuccessors":[{"id":"*T0AhxSe0Yi42rQK8","factoryName":"org.knime.base.node.preproc.partition.PartitionNodeFactory","probability":0.10163934426229508},{"id":"*T2WZJU7jOfyFDtl6","factoryName":"org.knime.base.node.mine.decisiontree2.learner2.DecisionTreeLearnerNodeFactory3","probability":0.06885245901639345},{"id":"*DOkyMaii62U05xZ1","factoryName":"org.knime.base.node.preproc.filter.column.DataColumnSpecFilterNodeFactory","probability":0.047540983606557376},{"id":"*2hhbyPN8yXaMD1YU","factoryName":"org.knime.base.node.mine.treeensemble2.node.randomforest.learner.classification.RandomForestClassificationLearnerNodeFactory2","probability":0.03934426229508197},{"id":"*mTvdLptC3aqDqGrI","factoryName":"org.knime.base.node.mine.decisiontree2.predictor2.DecTreePredictorNodeFactory","probability":0.03278688524590164},{"id":"*czTL7CtWUSI10JzJ","factoryName":"org.knime.base.node.mine.regression.logistic.learner4.LogRegLearnerNodeFactory4","probability":0.029508196721311476},{"id":"*BKpS2Ow-rnvw2TSf","factoryName":"org.knime.base.node.meta.xvalidation.XValidatePartitionerFactory","probability":0.02459016393442623},{"id":"*cB9KE6SSG6RhNZNp","factoryName":"org.knime.base.node.preproc.valcount.ValueCounterNodeFactory","probability":0.022950819672131147},{"id":"*7N4LxTHoPJrHN5lT","factoryName":"org.knime.base.node.stats.viz.extended.ExtendedStatisticsNodeFactory","probability":0.022950819672131147},{"id":"*wa3Cexa-0Df6kyDj","factoryName":"org.knime.base.node.mine.knn.KnnNodeFactory","probability":0.021311475409836064}]}
