Questions tagged [pruning]

Use pruning for questions related to algorithms used on data structures to facilitate generalization and performance optimization.

Pruning is a general technique to guard against the creation of an algorithm too specific to the training data so that it can be applied to other data sets.

References

193 questions
0
votes
1 answer

Tensorflow pruned model is the same size as original baseline model

I have a baseline TF functional model that I want to prune. I have tried following the code in the documentation, but the size the compressed pruned model is the same size as the compressed baseline…
0
votes
2 answers

Optuna catboost pruning

is there a way to have pruning with CatBoost and Optuna (in LightGBM it's easy but in Catboost I can't find any hint). My code is like this def objective(trial): param = { 'iterations':trial.suggest_int('iterations', 100,1500,…
Andrea Dalseno
  • 158
  • 1
  • 8
0
votes
1 answer

Tensorflow Prune Layer Not Supported

I am trying to prune a model in tensorflow but coming across an error I don't know how to tackle. The error is ValueError: Please initialize "Prune" with a supported layer. Layers should either be a "PrunableLayer" instance, or should be supported…
Fbkk
  • 89
  • 1
  • 4
  • 7
0
votes
1 answer

MySQL: How avoid all partitions scan (year-based) when doing ID lookup?

In case I have a table partitioned by year; how do I avoid the scanning of all partitions when I have to lookup a row by its ID and can't use partition pruning in the lookup query? CREATE TABLE part_table ( id bigint NOT NULL auto_increment, …
whale70
  • 333
  • 2
  • 9
0
votes
1 answer

Remove the weight_orig in Pytorch after Pruning a model

After a model is pruned in Pytorch, the saved model contains both the pruned weights and weight_orig. This causes the pruned model size to be greater than the unpruned model. Is there a way to remove the weight_orig and reduce the pruned model size?
AcidBurn
  • 199
  • 1
  • 11
0
votes
1 answer

rpart -- number of splits

Using printcp I got output resembling the following (this is only a portion): CP nsplit rel error xerror xstd 1 3.254666e-01 0 1.0000000 1.0000000 0.003976889 2 5.395058e-02 1 0.6745334 0.6745334 0.003567289 3 …
jsd191
  • 43
  • 6
0
votes
1 answer

What is the proper way to perform pruning in Random Forest Regressor?

Context of my problem: I'm performing hyperparameter tuning using GridSearchCV from scikit-learn in mt random forest regressor. To alleviate overfitting, I found that maybe I should use the pruning technique. I checked in the docs and I found…
0
votes
0 answers

Plot only paths up to a certain length in Graphviz

For a graph created in a specialized library like JGraphT, subpath calculations can be made and subgraphs with paths of length up to a maximum value N can be derived prior to visualizing. Is there any simple way of doing the same thing, without such…
PNS
  • 19,295
  • 32
  • 96
  • 143
0
votes
1 answer

Prune JSON tree with JavaScript

I am working with JavaScript the JSON structure shown below. I have a requirement to create a pruned version of the tree such that the user can select a particular attribute value and the new tree would consist of all nodes with that value and any…
0
votes
1 answer

Freeze specific filters of a layer for pruning in Keras

During the pruning step, I zero out some filters of a Depthwise convolution. After doing this, I need to retrain the network but those weights that have been zeroed out (I have the list of indexes) should not be updated during the training, their…
0
votes
0 answers

Different Decision tree pruning methods

I am trying to learn different pruning methods for decision tree. I got list of methods,below is the list. 1.Reduced Error Pruning 2.Cost Complexity pruning 3.Minimum error pruning 4.Pessimistic Error Pruning 5.Critical Value Pruning 6.Error Based…
0
votes
1 answer

leetcode coin change problem doesn't give correct result

I'm writing codes to solve this problem, below are my codes, somehow I see the result is correct till the end of the for loop, but after the function returns it doesn't carry out the correct result value, see below the log print, anybody could help…
0
votes
2 answers

Calculate the number of paths in a grid from top left to bottom right

I need to calculate the number of paths from top left to right bottom where a valid path is path that crosses all the squares in the grid (and exactly once for every square) I'm using the backtracking technique. Unfortunately, count is 0 in the end…
IsaacLevon
  • 2,260
  • 4
  • 41
  • 83
0
votes
0 answers

Method for avoiding re-visiting of nodes in a large DFS?

I'm exploring a tree of moves for a match-3 type game (with horizontal piece swapping), using a DFS to a depth of 4 moves ahead (because working towards bigger clear combos is much higher scoring). I'm evaluating each possible move of each board to…
Edge
  • 2,456
  • 6
  • 32
  • 57
0
votes
1 answer

What is difference between keras.Model and keras.engine.training.Model?

I have been trying to prune a keras model post-training. while doing that, I get model type as NoneType returned. While going into the source code of Pruning API, it says the model has to be type keras.Model, but what I am passing has the type…