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
2
votes
0 answers

Why does matplotlib.ticker.MaxNLocator(prune='both') not prune my tick labels?

I am trying to make a plot including a number of subplots, and I want them to share their axes. I have been trying to use matplotlib.ticker.MaxNLocator to do prune the labels on my ticks, so the figure has readable axes. However, regardless of…
nataliaeire
  • 121
  • 3
2
votes
1 answer

How to prune data set by frequency to conform to paper's description

The MovieLens data set provides a table with columns: userid | movieid | tag | timestamp I have trouble reproducing the way they pruned the MovieLens data set used in: Tag Informed Collaborative Filtering, by Zhen, Li and Young In 4.1 Data Set of…
2
votes
2 answers

Pruning: When to Stop?

When does pruning stop being efficient in a depth-first search? I've been working on an efficient method to solve the N-Queens problem and I'm looking at pruning for the first time. I've implemented it for the first two rows, but when does it stop…
cam
  • 8,725
  • 18
  • 57
  • 81
2
votes
1 answer

Python - empty dirs & subdirs after a shutil.copytree function

This is part of a program I'm writing. The goal is to extract all the GPX files, say at G:\ (specified with -e G:\ at the command line). It would create an 'Exports' folder and dump all files with matching extensions there, recursively that is.…
Interrupt
  • 965
  • 3
  • 9
  • 16
2
votes
1 answer

Having difficulty in Prune and Search Algorithm

I do understand Input until step 4 (If my understanding is correct) but step 5 is a bit confusing because I don't know what should I put in |S1| + |S2| ≥ k -- I'm not even sure if it's an absolute value or what. I don't get the iterations too. Uhmm
KC-Chan
  • 65
  • 7
2
votes
3 answers

MySQL Partition Pruning PARTITION BY LIST

I have created a MySQL table which is partitioned by the months of a date column like this: CREATE TABLE `my_big_table` ( `some_id` varchar(60) COLLATE utf8_unicode_ci NOT NULL, `some_value` varchar(256) COLLATE utf8_unicode_ci NOT NULL, …
alexander.biskop
  • 1,822
  • 19
  • 30
1
vote
1 answer

Access weights, biases in model - PyTorch pruning

To implement L1-norm, unstructured, layer-wise pruning with torch.nn.utils.prune l1_unstructured, radom_unstructured methods, I have a toy LeNet-300-100 dense neural network as- class LeNet300(nn.Module): def __init__(self): …
Arun
  • 2,222
  • 7
  • 43
  • 78
1
vote
0 answers

keras get_weights/set_weights take too long

I am running some code which repeatedly (every training iteration) calls layer.get_weights() and layer.set_weights(). The callback operation containing these calls takes 0.01ms compared to the 0.004ms taken to run the batch and as such more than…
Machoo
  • 21
  • 2
1
vote
0 answers

Decision Tree Depth?

I am trying to implement a Decision Tree model with depth equal 10. I am using the comand "max_depth=10" on the list of arguments (SciKitLearn), but when I print the max_depth of my model, the result is 34. My code follows: AD5 =…
1
vote
0 answers

How does pessimistic error pruning in C4.5 algorithm working?

I'm studing C4.5 algorithm and trying to make it in java by myself, but in the part of pruning, I don't understand what it compute in book of C4.5. In this book,it said:"When N training cases are covered by a leaf, E of them incorrectly....For a…
hua
  • 169
  • 9
1
vote
1 answer

How to get the original cp values from rpart object

My aim is to prune a deep tree according to a certain value of the cost-complexity parameter, say 3. I like growing trees with rpart(), in particular for the possibility of customizing plots. However, the cost-complexity parameter cp is rescaled to…
riccardo-df
  • 512
  • 4
  • 9
1
vote
1 answer

Tensorflow: show model FLOPs after prune_low_magnitude

is there a way to show the reduced number of FLOPs of a model after pruning (prune_low_magnitude with tensorflow_model_optimization). I tried to compare the default an the pruned model, but I didn't found a way where the pruned model has less FLOPs,…
Thrangel
  • 11
  • 2
1
vote
1 answer

How does pytorch L1-norm pruning works?

Lets see the result that I got first. This is one of a convolution layer of my model, and im only showing 11 filter's weight of it (11 3x3 filter with channel=1) Left side is original weight Right side is Pruned weight So I was wondering how does…
SnowNiNo
  • 13
  • 3
1
vote
1 answer

How to prune the k% lowest weight by pytorch?

Here I learn from the paper called Deep compression [Han et. al.] using resnet18 I also work the following code, the weight times the mask so that it is the after_weight pruned by the k% lowest weight to zero. But that code doesn't work for me. Any…
1
vote
2 answers

How to use partition pruning in google big query without hardcoding the filter condition?

I have a big table in GBQ which is partitioned by date. and I want to use partition pruning to optimize my query. the problem is that filter condition is a value that is read from another table and I can't hardcode the value. I wonder if there is…
sia
  • 537
  • 1
  • 6
  • 22