Sklearn 'Seed' Not Working Properly In a Section of Code [closed] The 2019 Stack Overflow Developer Survey Results Are InPosterior covariance of Normal-Inverse-Wishart not converging properlyLogistic Regression not quite workingWhy is Python's scikit-learn LDA not working correctly and how does it compute LDA via SVD?K-Means Clustering Not Working As ExpcectedEmploying cross_validation to to develop a reasonable linear regression model using scikit learnWhy does sklearn Ridge not accept warm start?Working between sklearn and scipy for convex optimizationPCA principal components in sklearn not matching eigen-vectors of covariance calculated by numpySklearn BaggingRegressor does not work with LightGBMRegressor & MAE objective

What is the meaning of the verb "bear" in this context?

How to type this arrow in math mode?

slides for 30min~1hr skype tenure track application interview

Can we generate random numbers using irrational numbers like π and e?

Reference request: Oldest number theory books with (unsolved) exercises?

Have you ever entered Singapore using a different passport or name?

Deal with toxic manager when you can't quit

Origin of "cooter" meaning "vagina"

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

"as much details as you can remember"

Are there any other methods to apply to solving simultaneous equations?

Loose spokes after only a few rides

When should I buy a clipper card after flying to OAK?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

What is the accessibility of a package's `Private` context variables?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

Interpreting the 2019 New York Reproductive Health Act?

Aging parents with no investments

If a Druid sees an animal’s corpse, can they Wild Shape into that animal?

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?

Is this app Icon Browser Safe/Legit?

Who coined the term "madman theory"?

Identify boardgame from Big movie

Why didn't the Event Horizon Telescope team mention Sagittarius A*?



Sklearn 'Seed' Not Working Properly In a Section of Code [closed]



The 2019 Stack Overflow Developer Survey Results Are InPosterior covariance of Normal-Inverse-Wishart not converging properlyLogistic Regression not quite workingWhy is Python's scikit-learn LDA not working correctly and how does it compute LDA via SVD?K-Means Clustering Not Working As ExpcectedEmploying cross_validation to to develop a reasonable linear regression model using scikit learnWhy does sklearn Ridge not accept warm start?Working between sklearn and scipy for convex optimizationPCA principal components in sklearn not matching eigen-vectors of covariance calculated by numpySklearn BaggingRegressor does not work with LightGBMRegressor & MAE objective



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0












$begingroup$


I have written an ensemble using Scikit Learn VotingClassifier.



I have set a seed in the cross validation section. However, it does not appear to 'hold'. Meaning, If I re-run the code block I get different results. (I can only assume each run of the code block is dividing the dataset into folds with different constituents instead of 'freezing' the random state.



Here is the code:



#Voting Ensemble of Classification
#Create Submodels
num_folds = 10
seed =7
kfold = KFold(n_splits=num_folds, random_state=seed)
estimators = []
model1 =LogisticRegression()
estimators.append(('LR',model1))
model2 = KNeighborsClassifier()
estimators.append(('KNN',model2))
model3 = GradientBoostingClassifier()
estimators.append(('GBM',model3))
#Create the ensemble
ensemble = VotingClassifier(estimators,voting='soft')
results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
print(results)


The results printed are the results of the 10 CV fold training. If I run this code block several times I get the following results:



1:



[0.70588235 0.94117647 1. 0.82352941 0.94117647 0.88235294
0.8125 0.875 0.8125 0.9375 ]


2:



[0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
0.8125 0.875 0.8125 0.875 ]


3:



[0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
0.8125 0.875 0.8125 0.875 ]


4:



[0.76470588 0.94117647 1. 0.82352941 1. 0.88235294
0.8125 0.875 0.625 0.875 ]


So it appears my random_state=seed isn't holding.



What is incorrect?



Thanks in advance.










share|cite|improve this question









$endgroup$



closed as off-topic by jbowman, Sycorax, Robert Long, Michael Chernick, mdewey Mar 24 at 11:30


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Sycorax, Robert Long, Michael Chernick, mdewey
If this question can be reworded to fit the rules in the help center, please edit the question.






















    0












    $begingroup$


    I have written an ensemble using Scikit Learn VotingClassifier.



    I have set a seed in the cross validation section. However, it does not appear to 'hold'. Meaning, If I re-run the code block I get different results. (I can only assume each run of the code block is dividing the dataset into folds with different constituents instead of 'freezing' the random state.



    Here is the code:



    #Voting Ensemble of Classification
    #Create Submodels
    num_folds = 10
    seed =7
    kfold = KFold(n_splits=num_folds, random_state=seed)
    estimators = []
    model1 =LogisticRegression()
    estimators.append(('LR',model1))
    model2 = KNeighborsClassifier()
    estimators.append(('KNN',model2))
    model3 = GradientBoostingClassifier()
    estimators.append(('GBM',model3))
    #Create the ensemble
    ensemble = VotingClassifier(estimators,voting='soft')
    results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
    print(results)


    The results printed are the results of the 10 CV fold training. If I run this code block several times I get the following results:



    1:



    [0.70588235 0.94117647 1. 0.82352941 0.94117647 0.88235294
    0.8125 0.875 0.8125 0.9375 ]


    2:



    [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
    0.8125 0.875 0.8125 0.875 ]


    3:



    [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
    0.8125 0.875 0.8125 0.875 ]


    4:



    [0.76470588 0.94117647 1. 0.82352941 1. 0.88235294
    0.8125 0.875 0.625 0.875 ]


    So it appears my random_state=seed isn't holding.



    What is incorrect?



    Thanks in advance.










    share|cite|improve this question









    $endgroup$



    closed as off-topic by jbowman, Sycorax, Robert Long, Michael Chernick, mdewey Mar 24 at 11:30


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Sycorax, Robert Long, Michael Chernick, mdewey
    If this question can be reworded to fit the rules in the help center, please edit the question.


















      0












      0








      0





      $begingroup$


      I have written an ensemble using Scikit Learn VotingClassifier.



      I have set a seed in the cross validation section. However, it does not appear to 'hold'. Meaning, If I re-run the code block I get different results. (I can only assume each run of the code block is dividing the dataset into folds with different constituents instead of 'freezing' the random state.



      Here is the code:



      #Voting Ensemble of Classification
      #Create Submodels
      num_folds = 10
      seed =7
      kfold = KFold(n_splits=num_folds, random_state=seed)
      estimators = []
      model1 =LogisticRegression()
      estimators.append(('LR',model1))
      model2 = KNeighborsClassifier()
      estimators.append(('KNN',model2))
      model3 = GradientBoostingClassifier()
      estimators.append(('GBM',model3))
      #Create the ensemble
      ensemble = VotingClassifier(estimators,voting='soft')
      results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
      print(results)


      The results printed are the results of the 10 CV fold training. If I run this code block several times I get the following results:



      1:



      [0.70588235 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.9375 ]


      2:



      [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.875 ]


      3:



      [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.875 ]


      4:



      [0.76470588 0.94117647 1. 0.82352941 1. 0.88235294
      0.8125 0.875 0.625 0.875 ]


      So it appears my random_state=seed isn't holding.



      What is incorrect?



      Thanks in advance.










      share|cite|improve this question









      $endgroup$




      I have written an ensemble using Scikit Learn VotingClassifier.



      I have set a seed in the cross validation section. However, it does not appear to 'hold'. Meaning, If I re-run the code block I get different results. (I can only assume each run of the code block is dividing the dataset into folds with different constituents instead of 'freezing' the random state.



      Here is the code:



      #Voting Ensemble of Classification
      #Create Submodels
      num_folds = 10
      seed =7
      kfold = KFold(n_splits=num_folds, random_state=seed)
      estimators = []
      model1 =LogisticRegression()
      estimators.append(('LR',model1))
      model2 = KNeighborsClassifier()
      estimators.append(('KNN',model2))
      model3 = GradientBoostingClassifier()
      estimators.append(('GBM',model3))
      #Create the ensemble
      ensemble = VotingClassifier(estimators,voting='soft')
      results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
      print(results)


      The results printed are the results of the 10 CV fold training. If I run this code block several times I get the following results:



      1:



      [0.70588235 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.9375 ]


      2:



      [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.875 ]


      3:



      [0.76470588 0.94117647 1. 0.82352941 0.94117647 0.88235294
      0.8125 0.875 0.8125 0.875 ]


      4:



      [0.76470588 0.94117647 1. 0.82352941 1. 0.88235294
      0.8125 0.875 0.625 0.875 ]


      So it appears my random_state=seed isn't holding.



      What is incorrect?



      Thanks in advance.







      python scikit-learn ensemble






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Mar 23 at 15:13









      Windstorm1981Windstorm1981

      1466




      1466




      closed as off-topic by jbowman, Sycorax, Robert Long, Michael Chernick, mdewey Mar 24 at 11:30


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Sycorax, Robert Long, Michael Chernick, mdewey
      If this question can be reworded to fit the rules in the help center, please edit the question.







      closed as off-topic by jbowman, Sycorax, Robert Long, Michael Chernick, mdewey Mar 24 at 11:30


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Sycorax, Robert Long, Michael Chernick, mdewey
      If this question can be reworded to fit the rules in the help center, please edit the question.




















          1 Answer
          1






          active

          oldest

          votes


















          2












          $begingroup$

          Random seed of models (LogisticRegression, GradientBoostingClassifier) needs to be fixed too, so that their random behavior becomes reproducible. Here is a working example that produces the same result over multiple runs:



          import sklearn
          from sklearn.model_selection import KFold, cross_val_score
          from sklearn.linear_model import LogisticRegression
          from sklearn.neighbors import KNeighborsClassifier
          from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
          import numpy as np

          #Voting Ensemble of Classification
          #Create Submodels
          num_folds = 10
          seed =7

          # Data
          np.random.seed(seed)
          feature_1 = np.random.normal(0, 2, 10000)
          feature_2 = np.random.normal(5, 6, 10000)
          X_train = np.vstack([feature_1, feature_2]).T
          Y_train = np.random.randint(0, 2, 10000).T

          kfold = KFold(n_splits=num_folds, random_state=seed)
          estimators = []
          model1 =LogisticRegression(random_state=seed)
          estimators.append(('LR',model1))
          model2 = KNeighborsClassifier()
          estimators.append(('KNN',model2))
          model3 = GradientBoostingClassifier(random_state=seed)
          estimators.append(('GBM',model3))
          #Create the ensemble
          ensemble = VotingClassifier(estimators,voting='soft')
          results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
          print('sklearn version', sklearn.__version__)
          print(results)


          Output:



          sklearn version 0.19.1
          [0.502 0.496 0.483 0.513 0.515 0.508 0.517 0.499 0.515 0.504]





          share|cite|improve this answer











          $endgroup$












          • $begingroup$
            Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:34











          • $begingroup$
            @Windstorm1981 My bad. Updated.
            $endgroup$
            – Esmailian
            Mar 23 at 17:44






          • 1




            $begingroup$
            ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:46






          • 1




            $begingroup$
            @Windstorm1981 Exactly!
            $endgroup$
            – Esmailian
            Mar 23 at 17:47

















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $begingroup$

          Random seed of models (LogisticRegression, GradientBoostingClassifier) needs to be fixed too, so that their random behavior becomes reproducible. Here is a working example that produces the same result over multiple runs:



          import sklearn
          from sklearn.model_selection import KFold, cross_val_score
          from sklearn.linear_model import LogisticRegression
          from sklearn.neighbors import KNeighborsClassifier
          from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
          import numpy as np

          #Voting Ensemble of Classification
          #Create Submodels
          num_folds = 10
          seed =7

          # Data
          np.random.seed(seed)
          feature_1 = np.random.normal(0, 2, 10000)
          feature_2 = np.random.normal(5, 6, 10000)
          X_train = np.vstack([feature_1, feature_2]).T
          Y_train = np.random.randint(0, 2, 10000).T

          kfold = KFold(n_splits=num_folds, random_state=seed)
          estimators = []
          model1 =LogisticRegression(random_state=seed)
          estimators.append(('LR',model1))
          model2 = KNeighborsClassifier()
          estimators.append(('KNN',model2))
          model3 = GradientBoostingClassifier(random_state=seed)
          estimators.append(('GBM',model3))
          #Create the ensemble
          ensemble = VotingClassifier(estimators,voting='soft')
          results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
          print('sklearn version', sklearn.__version__)
          print(results)


          Output:



          sklearn version 0.19.1
          [0.502 0.496 0.483 0.513 0.515 0.508 0.517 0.499 0.515 0.504]





          share|cite|improve this answer











          $endgroup$












          • $begingroup$
            Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:34











          • $begingroup$
            @Windstorm1981 My bad. Updated.
            $endgroup$
            – Esmailian
            Mar 23 at 17:44






          • 1




            $begingroup$
            ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:46






          • 1




            $begingroup$
            @Windstorm1981 Exactly!
            $endgroup$
            – Esmailian
            Mar 23 at 17:47















          2












          $begingroup$

          Random seed of models (LogisticRegression, GradientBoostingClassifier) needs to be fixed too, so that their random behavior becomes reproducible. Here is a working example that produces the same result over multiple runs:



          import sklearn
          from sklearn.model_selection import KFold, cross_val_score
          from sklearn.linear_model import LogisticRegression
          from sklearn.neighbors import KNeighborsClassifier
          from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
          import numpy as np

          #Voting Ensemble of Classification
          #Create Submodels
          num_folds = 10
          seed =7

          # Data
          np.random.seed(seed)
          feature_1 = np.random.normal(0, 2, 10000)
          feature_2 = np.random.normal(5, 6, 10000)
          X_train = np.vstack([feature_1, feature_2]).T
          Y_train = np.random.randint(0, 2, 10000).T

          kfold = KFold(n_splits=num_folds, random_state=seed)
          estimators = []
          model1 =LogisticRegression(random_state=seed)
          estimators.append(('LR',model1))
          model2 = KNeighborsClassifier()
          estimators.append(('KNN',model2))
          model3 = GradientBoostingClassifier(random_state=seed)
          estimators.append(('GBM',model3))
          #Create the ensemble
          ensemble = VotingClassifier(estimators,voting='soft')
          results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
          print('sklearn version', sklearn.__version__)
          print(results)


          Output:



          sklearn version 0.19.1
          [0.502 0.496 0.483 0.513 0.515 0.508 0.517 0.499 0.515 0.504]





          share|cite|improve this answer











          $endgroup$












          • $begingroup$
            Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:34











          • $begingroup$
            @Windstorm1981 My bad. Updated.
            $endgroup$
            – Esmailian
            Mar 23 at 17:44






          • 1




            $begingroup$
            ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:46






          • 1




            $begingroup$
            @Windstorm1981 Exactly!
            $endgroup$
            – Esmailian
            Mar 23 at 17:47













          2












          2








          2





          $begingroup$

          Random seed of models (LogisticRegression, GradientBoostingClassifier) needs to be fixed too, so that their random behavior becomes reproducible. Here is a working example that produces the same result over multiple runs:



          import sklearn
          from sklearn.model_selection import KFold, cross_val_score
          from sklearn.linear_model import LogisticRegression
          from sklearn.neighbors import KNeighborsClassifier
          from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
          import numpy as np

          #Voting Ensemble of Classification
          #Create Submodels
          num_folds = 10
          seed =7

          # Data
          np.random.seed(seed)
          feature_1 = np.random.normal(0, 2, 10000)
          feature_2 = np.random.normal(5, 6, 10000)
          X_train = np.vstack([feature_1, feature_2]).T
          Y_train = np.random.randint(0, 2, 10000).T

          kfold = KFold(n_splits=num_folds, random_state=seed)
          estimators = []
          model1 =LogisticRegression(random_state=seed)
          estimators.append(('LR',model1))
          model2 = KNeighborsClassifier()
          estimators.append(('KNN',model2))
          model3 = GradientBoostingClassifier(random_state=seed)
          estimators.append(('GBM',model3))
          #Create the ensemble
          ensemble = VotingClassifier(estimators,voting='soft')
          results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
          print('sklearn version', sklearn.__version__)
          print(results)


          Output:



          sklearn version 0.19.1
          [0.502 0.496 0.483 0.513 0.515 0.508 0.517 0.499 0.515 0.504]





          share|cite|improve this answer











          $endgroup$



          Random seed of models (LogisticRegression, GradientBoostingClassifier) needs to be fixed too, so that their random behavior becomes reproducible. Here is a working example that produces the same result over multiple runs:



          import sklearn
          from sklearn.model_selection import KFold, cross_val_score
          from sklearn.linear_model import LogisticRegression
          from sklearn.neighbors import KNeighborsClassifier
          from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
          import numpy as np

          #Voting Ensemble of Classification
          #Create Submodels
          num_folds = 10
          seed =7

          # Data
          np.random.seed(seed)
          feature_1 = np.random.normal(0, 2, 10000)
          feature_2 = np.random.normal(5, 6, 10000)
          X_train = np.vstack([feature_1, feature_2]).T
          Y_train = np.random.randint(0, 2, 10000).T

          kfold = KFold(n_splits=num_folds, random_state=seed)
          estimators = []
          model1 =LogisticRegression(random_state=seed)
          estimators.append(('LR',model1))
          model2 = KNeighborsClassifier()
          estimators.append(('KNN',model2))
          model3 = GradientBoostingClassifier(random_state=seed)
          estimators.append(('GBM',model3))
          #Create the ensemble
          ensemble = VotingClassifier(estimators,voting='soft')
          results = cross_val_score(ensemble, X_train, Y_train,cv=kfold)
          print('sklearn version', sklearn.__version__)
          print(results)


          Output:



          sklearn version 0.19.1
          [0.502 0.496 0.483 0.513 0.515 0.508 0.517 0.499 0.515 0.504]






          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Mar 23 at 17:49

























          answered Mar 23 at 17:10









          EsmailianEsmailian

          42615




          42615











          • $begingroup$
            Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:34











          • $begingroup$
            @Windstorm1981 My bad. Updated.
            $endgroup$
            – Esmailian
            Mar 23 at 17:44






          • 1




            $begingroup$
            ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:46






          • 1




            $begingroup$
            @Windstorm1981 Exactly!
            $endgroup$
            – Esmailian
            Mar 23 at 17:47
















          • $begingroup$
            Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:34











          • $begingroup$
            @Windstorm1981 My bad. Updated.
            $endgroup$
            – Esmailian
            Mar 23 at 17:44






          • 1




            $begingroup$
            ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
            $endgroup$
            – Windstorm1981
            Mar 23 at 17:46






          • 1




            $begingroup$
            @Windstorm1981 Exactly!
            $endgroup$
            – Esmailian
            Mar 23 at 17:47















          $begingroup$
          Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
          $endgroup$
          – Windstorm1981
          Mar 23 at 17:34





          $begingroup$
          Thanks for your quick reply. Not sure I follow completely. random_state=seed fixes my cross validation. I note your line np.random.seed(seed). Intuitively it suggests to me it is ensuring repeatable generation of toy data. I already have a data set. How does that apply to 'fixing seed of models'?
          $endgroup$
          – Windstorm1981
          Mar 23 at 17:34













          $begingroup$
          @Windstorm1981 My bad. Updated.
          $endgroup$
          – Esmailian
          Mar 23 at 17:44




          $begingroup$
          @Windstorm1981 My bad. Updated.
          $endgroup$
          – Esmailian
          Mar 23 at 17:44




          1




          1




          $begingroup$
          ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
          $endgroup$
          – Windstorm1981
          Mar 23 at 17:46




          $begingroup$
          ha! Clear now. So fixing the cv fixes the data splits. Fixing the models fixes how the models handle the (fixed) data splits?
          $endgroup$
          – Windstorm1981
          Mar 23 at 17:46




          1




          1




          $begingroup$
          @Windstorm1981 Exactly!
          $endgroup$
          – Esmailian
          Mar 23 at 17:47




          $begingroup$
          @Windstorm1981 Exactly!
          $endgroup$
          – Esmailian
          Mar 23 at 17:47



          Popular posts from this blog

          Solar Wings Breeze Design and development Specifications (Breeze) References Navigation menu1368-485X"Hang glider: Breeze (Solar Wings)"e

          Kathakali Contents Etymology and nomenclature History Repertoire Songs and musical instruments Traditional plays Styles: Sampradayam Training centers and awards Relationship to other dance forms See also Notes References External links Navigation menueThe Illustrated Encyclopedia of Hinduism: A-MSouth Asian Folklore: An EncyclopediaRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to Play10.1353/atj.2005.0004The Illustrated Encyclopedia of Hinduism: A-MEncyclopedia of HinduismKathakali Dance-drama: Where Gods and Demons Come to PlaySonic Liturgy: Ritual and Music in Hindu Tradition"The Mirror of Gesture"Kathakali Dance-drama: Where Gods and Demons Come to Play"Kathakali"Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceMedieval Indian Literature: An AnthologyThe Oxford Companion to Indian TheatreSouth Asian Folklore: An Encyclopedia : Afghanistan, Bangladesh, India, Nepal, Pakistan, Sri LankaThe Rise of Performance Studies: Rethinking Richard Schechner's Broad SpectrumIndian Theatre: Traditions of PerformanceModern Asian Theatre and Performance 1900-2000Critical Theory and PerformanceBetween Theater and AnthropologyKathakali603847011Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceBetween Theater and AnthropologyBetween Theater and AnthropologyNambeesan Smaraka AwardsArchivedThe Cambridge Guide to TheatreRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeThe Garland Encyclopedia of World Music: South Asia : the Indian subcontinentThe Ethos of Noh: Actors and Their Art10.2307/1145740By Means of Performance: Intercultural Studies of Theatre and Ritual10.1017/s204912550000100xReconceiving the Renaissance: A Critical ReaderPerformance TheoryListening to Theatre: The Aural Dimension of Beijing Opera10.2307/1146013Kathakali: The Art of the Non-WorldlyOn KathakaliKathakali, the dance theatreThe Kathakali Complex: Performance & StructureKathakali Dance-Drama: Where Gods and Demons Come to Play10.1093/obo/9780195399318-0071Drama and Ritual of Early Hinduism"In the Shadow of Hollywood Orientalism: Authentic East Indian Dancing"10.1080/08949460490274013Sanskrit Play Production in Ancient IndiaIndian Music: History and StructureBharata, the Nāṭyaśāstra233639306Table of Contents2238067286469807Dance In Indian Painting10.2307/32047833204783Kathakali Dance-Theatre: A Visual Narrative of Sacred Indian MimeIndian Classical Dance: The Renaissance and BeyondKathakali: an indigenous art-form of Keralaeee

          Method to test if a number is a perfect power? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Detecting perfect squares faster than by extracting square rooteffective way to get the integer sequence A181392 from oeisA rarely mentioned fact about perfect powersHow many numbers such $n$ are there that $n<100,lfloorsqrtn rfloor mid n$Check perfect squareness by modulo division against multiple basesFor what pair of integers $(a,b)$ is $3^a + 7^b$ a perfect square.Do there exist any positive integers $n$ such that $lfloore^nrfloor$ is a perfect power? What is the probability that one exists?finding perfect power factors of an integerProve that the sequence contains a perfect square for any natural number $m $ in the domain of $f$ .Counting Perfect Powers