Answers.Body: <p>There are <strong>many</strong> things affecting accuracy. I'm gonna assume a lot here because you don't say anything about the model, what you're trying to achieve or how many classes you have. You're not even saying whether you're classifying or not. Also, you're not saying which accuracy you're using (classification, AUC, F1 etc.).</p>
  
  <p>I'm gonna assume here that you have some classification problem.</p>
  
  <p><strong>Accuracy</strong> is the measure of how many classifications you got correct. In my experience 99% is a warning sign because it's too good to be true, and a result like that is often due to <a href="https://en.wikipedia.org/wiki/Overfitting" rel="nofollow noreferrer">overfitting</a>. Since this, in my experience, is the main reason you'd actually want the accuracy down, this is what I'm going to assume is your problem.</p>
  
  <p>Overfitting occurs when you train "too much" and the model only learns things that are within your training set, and fails on everything else. That is: it generalized bad.</p>
  
  <p>To prevent this there are a number of things you could do;</p>
  
  <p><strong>1) Data segmentation</strong></p>
  
  <p>The most common is to split your data into three bulks: training (~70% of the data), validation(~20%) test (~10%). These percentages are indications and would vary depending on how much data you have, and the balancing. </p>
  
  <p>The idea is that you train on the training data, you run the validation through the network, and calculate the accuracy. When this accuracy, call it validation accuracy, is satisfactory, then you stop the training and run the test data through it. The latter accuracy (test accuracy) is the one that most papers publish (combined with <a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve" rel="nofollow noreferrer">AUC</a> and <a href="https://en.wikipedia.org/wiki/F1_score" rel="nofollow noreferrer">F1 score</a>.</p>
  
  <p><em>Important</em>: When you have split the data into these bulks you should put away the test, and <strong>not use it during training</strong> at all. You only use this at the very end to do an extra check that you haven't overfitted.</p>
  
  <p><strong>2) Regularization</strong>
  There are many types of <a href="http://www.deeplearningbook.org/contents/regularization.html" rel="nofollow noreferrer">regularization</a>. Two very popular regularization methods for preventing overfitting are the L2-regularization (see previous link) and the <a href="https://arxiv.org/pdf/1102.4807.pdf" rel="nofollow noreferrer">dropout</a> methods.</p>
  
  <p>Without going into detail, these methods prevent the model weights from becoming too large. This is a good thing since the model won't rely too much on one feature, which in turn attenuates overfitting.</p>
  
  <hr>
  
  <p>I hope you learned something, and the most important lesson is that you should know what you're doing. If not, you could end up with a model that is not behaving like you thought. In the case of overfitting, you'd end up with a model that only works on your training data, which doesn't really do much good.</p>
  
  <p>I really recommend the book by Goodfellow: <a href="http://www.deeplearningbook.org/" rel="nofollow noreferrer">deeplearningbook.org</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-24T18:22:37.393Z
Answers.LastActivityDate: 2018-05-31T22:08:03.310Z
Answers.LastEditDate: 2018-05-31T22:08:03.310Z
Answers.UserDisplayName: Andreas Storvik Strauman
Answers.Body: <p>If you want to decrease the accuracy given the same optimizer/epochs/batch, you could add more layers and increase the number of parameters, it should now take a bit longer to converge. Hence for the same epochs you would get lower accuracy. You could also initialise your parameters in a non sensical way. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-16T17:40:27.673Z
Answers.LastActivityDate: 2020-02-16T17:40:27.673Z
Answers.UserDisplayName: Dirk N
Body: <p>How do I decrease the accuracy value when training a model using <a href="https://keras.io/" rel="nofollow noreferrer">Keras</a>; which parameters can I change to decrease the value?</p>
  
  <p>My objective is not to actually decrease it, but just to know which parameters influence the accuracy</p>
  
  <pre><code>sgd = optimizers.SGD(lr=1e-2)
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-24T16:16:18.307Z
Comments.Text: You give like no information here! It's like you're saying "Hey I have a code. Where is my bug?" without giving the code. First of all: What model? There are so many models with so many types of parameters that this is **impossible** to answer specific to your problem. Second: What data do you have? Thirdly: Why would you want to _decrease_ accuracy? Is this about overfitting?
Comments.UserDisplayName: Andreas Storvik Strauman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-24T16:18:11.410Z
Comments.Text: Well not impossible per se. You COULD just take the `accuracy=accuracy-13` which would, technically, give the correct response.
Comments.UserDisplayName: Andreas Storvik Strauman
Tags: <neural-networks><python><keras>
Title: How to decrease accuracy from 99% to 80%~85% using keras for training a model
UserDisplayName: epssy_sy
ThreadText: # How to decrease accuracy from 99% to 80%~85% using keras for training a model
  
  (Asked by: username_0 on 2018-05-24)
  
  How do I decrease the accuracy value when training a model using [Keras](https://keras.io/); which parameters can I change to decrease the value?
  
  My objective is not to actually decrease it, but just to know which parameters influence the accuracy
  
  ```
  sgd = optimizers.SGD(lr=1e-2)
  
  ```
  
  **Tags:** neural-networks, python, keras
  
  > **Comments:**
  > **username_1**: You give like no information here! It's like you're saying "Hey I have a code. Where is my bug?" without giving the code. First of all: What model? There are so many models with so many types of parameters that this is **impossible** to answer specific to your problem. Second: What data do you have? Thirdly: Why would you want to _decrease_ accuracy? Is this about overfitting?  
  > **username_1**: Well not impossible per se. You COULD just take the `accuracy=accuracy-13` which would, technically, give the correct response.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-05-24. Score: 1 | Accepted answer
  
  There are **many** things affecting accuracy. I'm gonna assume a lot here because you don't say anything about the model, what you're trying to achieve or how many classes you have. You're not even saying whether you're classifying or not. Also, you're not saying which accuracy you're using (classification, AUC, F1 etc.).
  
  I'm gonna assume here that you have some classification problem.
  
  **Accuracy** is the measure of how many classifications you got correct. In my experience 99% is a warning sign because it's too good to be true, and a result like that is often due to [overfitting](https://en.wikipedia.org/wiki/Overfitting). Since this, in my experience, is the main reason you'd actually want the accuracy down, this is what I'm going to assume is your problem.
  
  Overfitting occurs when you train "too much" and the model only learns things that are within your training set, and fails on everything else. That is: it generalized bad.
  
  To prevent this there are a number of things you could do;
  
  **1) Data segmentation**
  
  The most common is to split your data into three bulks: training (~70% of the data), validation(~20%) test (~10%). These percentages are indications and would vary depending on how much data you have, and the balancing.
  
  The idea is that you train on the training data, you run the validation through the network, and calculate the accuracy. When this accuracy, call it validation accuracy, is satisfactory, then you stop the training and run the test data through it. The latter accuracy (test accuracy) is the one that most papers publish (combined with [AUC](https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve) and [F1 score](https://en.wikipedia.org/wiki/F1_score).
  
  *Important*: When you have split the data into these bulks you should put away the test, and **not use it during training** at all. You only use this at the very end to do an extra check that you haven't overfitted.
  
  **2) Regularization**
  There are many types of [regularization](http://www.deeplearningbook.org/contents/regularization.html). Two very popular regularization methods for preventing overfitting are the L2-regularization (see previous link) and the [dropout](https://arxiv.org/pdf/1102.4807.pdf) methods.
  
  Without going into detail, these methods prevent the model weights from becoming too large. This is a good thing since the model won't rely too much on one feature, which in turn attenuates overfitting.
  
  ---
  
  I hope you learned something, and the most important lesson is that you should know what you're doing. If not, you could end up with a model that is not behaving like you thought. In the case of overfitting, you'd end up with a model that only works on your training data, which doesn't really do much good.
  
  I really recommend the book by Goodfellow: [deeplearningbook.org](http://www.deeplearningbook.org/).
  
  
  ---
  
  ### Answer by username_2 on 2020-02-16. Score: 0
  
  If you want to decrease the accuracy given the same optimizer/epochs/batch, you could add more layers and increase the number of parameters, it should now take a bit longer to converge. Hence for the same epochs you would get lower accuracy. You could also initialise your parameters in a non sensical way.
  
  
  ---
  
  