What is Random State in Machine Learning?

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024

Комментарии • 136

  • @Aubrey1Silver
    @Aubrey1Silver 3 года назад +4

    Very helpful! Clear explanation! Thank you

  • @zalakthakker6846
    @zalakthakker6846 Год назад +2

    Thank you sir, very much clear to the point explanation

  • @learnupwards
    @learnupwards 7 месяцев назад +1

    Nicely and neatly explained the concept!

    • @DataMites
      @DataMites  7 месяцев назад

      Glad you liked it!

  • @shadabs000
    @shadabs000 2 года назад +1

    Thanks a lot this 11 minute video beats every other explanation available on this topic on internet

  • @anurag17091977
    @anurag17091977 3 года назад +3

    Ashok, very nicely explained. Thank you very much for clearing the concept.

    • @DataMites
      @DataMites  3 года назад

      Welcome and Best of Luck!

  • @rehanbaig71
    @rehanbaig71 3 года назад +2

    Thanks for giving such a comprehensive explanation of Random State.

  • @arjungoud3450
    @arjungoud3450 3 года назад +1

    Subscribed after your explanation. thank you.

    • @DataMites
      @DataMites  3 года назад +1

      Thanks and welcome

  • @georgez.7278
    @georgez.7278 Год назад +1

    I'm imprest with the way you explain in a so humanly manner
    it is super easy to understand
    thank you

    • @DataMites
      @DataMites  Год назад

      Thank You! Keep Watching

  • @abhishekranjan2617
    @abhishekranjan2617 3 года назад +3

    wow, your teaching and explanation both are great, awesome..
    You cleared my doubt sir..
    this video is very helpful for me.
    Thanks a lot sir jii👌👌👌👌😊😘🥰😍🙏🙏🙏

    • @DataMites
      @DataMites  3 года назад +1

      Glad it was helpful!

  • @csprusty
    @csprusty 2 года назад +1

    Simple and easy to grasp ..cheers

  • @prateeksachdeva1611
    @prateeksachdeva1611 Год назад +1

    I was searching for this topic but was not satisfied anywhere. Sir has explained it very well

  • @jitendrarathod2455
    @jitendrarathod2455 3 года назад +1

    Very helpful Sir 🙏

    • @DataMites
      @DataMites  3 года назад

      Glad to hear that. Thank you

  • @tuanminhvu2954
    @tuanminhvu2954 2 года назад

    Very clear explaination, thank you sir

  • @dikshitlenka
    @dikshitlenka 3 года назад

    Nobody has ever explained this concept the way you have explained. Thank you. Learnt something new.

    • @DataMites
      @DataMites  3 года назад +1

      Glad it was helpful Thank you!

  • @mayamathew4669
    @mayamathew4669 2 года назад

    Thank you for the very useful and informative video

  • @lifechamp007
    @lifechamp007 3 года назад

    Thank you very much - Finally I understood what is random state. Stay blessed n happy

  • @22cmartinez
    @22cmartinez 2 года назад

    Gracias por la explicación me ayudo mucho !!! bendiciones

    • @DataMites
      @DataMites  2 года назад

      Glad! It helped you.

  • @CreatingUtopia
    @CreatingUtopia 4 года назад +1

    it was really good explanation

  • @rohitpant6473
    @rohitpant6473 2 года назад

    thanks crisp and clear

  • @vaibhavkhobragade9773
    @vaibhavkhobragade9773 3 года назад

    Clear explanation with a simple example. Thank you!

  • @srihitharavu9141
    @srihitharavu9141 3 года назад

    Excellent explanation

    • @DataMites
      @DataMites  3 года назад

      Glad it was helpful!

  • @sanahnahk7312
    @sanahnahk7312 2 года назад

    good explanation .. thank you !

  • @nurulamin7982
    @nurulamin7982 2 года назад

    great explanation

  • @VidharthiRanjan
    @VidharthiRanjan 3 года назад +1

    Sir No need of Udemy , Coursera courses After watching your video .....Awesome content

    • @DataMites
      @DataMites  3 года назад +1

      Hi Vidharthi Ranjan, Glad to hear that. Thank You!

  • @ashishtarun7584
    @ashishtarun7584 4 года назад

    Thanks for your efforts. It is now clear to me.

  • @zameelvisharathodi7859
    @zameelvisharathodi7859 3 года назад

    Well explained!

  • @dineshshenoy5180
    @dineshshenoy5180 3 года назад

    so beautifully explained. thanks a lot

  • @mikemichel4820
    @mikemichel4820 2 года назад

    very helpful thanks

  • @statproacademy
    @statproacademy 3 года назад +4

    thank you for the explanation.Please can you tell me what are the softwares do you use to make this wonderful writing??

  • @camilomurcia5564
    @camilomurcia5564 3 года назад

    Man, pretty good explanation.

  • @poulameepal8065
    @poulameepal8065 3 года назад

    Thank you . Very well explained.

  • @derbaur2330
    @derbaur2330 3 года назад

    very clear explanation thanks for sharing your content !

    • @DataMites
      @DataMites  3 года назад +1

      Glad you enjoyed it!

  • @LovedbyGod4ever
    @LovedbyGod4ever 2 года назад

    Great.
    Thank u bro

  • @colabwork1910
    @colabwork1910 2 года назад

    Simply.. Wao

  • @MainstreamMoviegoer
    @MainstreamMoviegoer 4 года назад

    nice and clear explanation. thank you!

  • @abdussamad9399
    @abdussamad9399 2 года назад

    Thanks a lot

  • @satyendrarathore6318
    @satyendrarathore6318 3 года назад

    nice explaination

  • @pushkarpatil6123
    @pushkarpatil6123 Год назад

    Nice Explanation! Thank You. Is There Technique to select best Random State?

    • @DataMites
      @DataMites  Год назад

      Hi Pushkar Patil, If you see it has significant impact on model's performance, then you can include that in hyperparameter tuning. Generally, it doesn't affect the performance.

  • @amitpanigrahi5442
    @amitpanigrahi5442 3 года назад

    superb bro!u explained it brilliantly!

  • @DavidCVdev
    @DavidCVdev 3 года назад

    thank you

  • @adiflorense1477
    @adiflorense1477 3 года назад

    I like what you teach

  • @farhadkhan3893
    @farhadkhan3893 2 года назад

    got it, thank u

  • @babritbehera4087
    @babritbehera4087 4 года назад +2

    Does the random state concept similar to the approach of seed which we use ??

    • @DataMites
      @DataMites  3 года назад +1

      Yes but it will consider your data.
      Random state ensures that the splits that you generate are reproducible. Scikit-learn uses random permutations to generate the splits. The random state that you provide is used as a seed to the random number generator.

  • @maryamsadatseifi4118
    @maryamsadatseifi4118 3 года назад +1

    Thank you for such a clear explanation. I used random forest with same random state for my data which normalize with zscore and min max and conclude same result(f1 score & accuracy). I don't understand why the result are the same, could you guide me?

    • @DataMites
      @DataMites  3 года назад +1

      "Hi maryam sadat seifi, thanks for your comment.
      F1 score is the harmonic mean of Precision and Recall while accuracy is the measure of all the correctly identified cases. Accuracy is used when the True Positives and True negatives are more important while F1-score is used when the False Negatives and False Positives are crucial. And in your case you get the same f1 and accuracy.
      Suppose you have something like this:
      >>> trueY = [0,1,0,1]
      >>> predY = [0,1,1,0]
      Here both accuracy and f1_score(binary) are same i.e both are 0.5
      But when you have something like this:
      >>> trueY = [0,1,0,1,0]
      >>> predY = [0,1,1,0,0]
      Here you will have accuracy=0.6 anf f1_score(binary)=0.5
      I hope you understand."

  • @vigneshsridharan5379
    @vigneshsridharan5379 3 года назад

    From lot of videos and explanation, I find this is the best . I have question on how to find that how many random states created for the data set? Is there any API available ?

    • @DataMites
      @DataMites  3 года назад

      Hi VIGNESH SRIDHARAN, you can use the same procedure as used in the video to find the available number of random state for the given datasets.

  • @AldiyarM
    @AldiyarM Год назад

    great video, thanks! But why do people use mostly 42 or 0 as a random state in Random Forest?

    • @DataMites
      @DataMites  Год назад

      There is no specific reason. It doesn't have any impact on performance. It's just being followed by many.

    • @AldiyarM
      @AldiyarM Год назад

      @@DataMites great, thanks for the reply!

  • @panchajanyanaralasetty7370
    @panchajanyanaralasetty7370 3 года назад

    Can you tell what is the significance of Random State in Kmeans, Sk learn library ?

    • @DataMites
      @DataMites  3 года назад

      If you ignore random_state in the code, then whatever your execution be, a new random value is generated and train-test dataset would have different values each time.

  • @RaviSharma-tg6yx
    @RaviSharma-tg6yx 3 года назад

    Is the model test score of (x_train,y_train) is greater than (x_test, y_test)?

    • @DataMites
      @DataMites  3 года назад +1

      "Hi Ravi Sharma, thank you for the comment.
      Seems like you are asking about model score instead of model test score. Yes generally model score (i.e accuracy, f1-score, auc, roi) is higher in training dataset than in test dataset."

  • @hochinhd8409
    @hochinhd8409 3 года назад

    awesome

  • @zameelvisharathodi7859
    @zameelvisharathodi7859 3 года назад

    Wouldn't there be 119 possible states (not 120) when counting starts from zero, in the example mentioned in the video ?

    • @DataMites
      @DataMites  3 года назад

      Hi, yes you will have total 120 (0 to 119) different state.

  • @bijayamanandhar3890
    @bijayamanandhar3890 3 года назад

    I'm a new learner. Could you please tell me why we sometimes use train_test_split function, and sometimes not, thanks

    • @DataMites
      @DataMites  3 года назад +1

      Hi Bijaya Manandhar, you should always use train-test split while training to find how your model is actually performing with those inputs that that have not been used for training.

  • @MaximumZebra
    @MaximumZebra 4 года назад

    I realize that this depends on the data set, but would it be safe to assume that the higher the number of the random_state, the better "trained" the model would be?

    • @DataMites
      @DataMites  3 года назад

      Not always but yes trial and error you must do

  • @akshayranpise7487
    @akshayranpise7487 3 года назад

    Hey thats a very good explaination. but i have s doubt here....you said instead of using ramdom state in loop, do hyper parameter tuning of parameters in the model. So while tuning the parameters should we use random state or not

    • @akshayranpise7487
      @akshayranpise7487 3 года назад

      Also what if i havent set the random state and my accuracy varies largely for each run. What does that indicate?. Ideally the accurscy should not chsnge much

    • @DataMites
      @DataMites  3 года назад

      Hi akshay ranpise,you can use random state while tuning the parameters.

    • @DataMites
      @DataMites  3 года назад

      Yes, you can use seed() method to overcome that. For more: docs.python.org/3/library/random.html

  • @ardavalilable
    @ardavalilable 2 года назад

    Thank you for explanation, though isn't ML supposed to predict the same value for any data? I mean you train the data based on a training set, after validating the model you use it in a real world application where the random state is basically not necessarily existing! Or, am I missing something here?

    • @DataMites
      @DataMites  2 года назад

      "Hi thank you for your question.
      Here random state is used so that you can have random training and test set. Random state 24 will produce a different outcome when compared to 42, which can be used to evaluate your experiment in distinct scenarios."

  • @antonyjoy5494
    @antonyjoy5494 3 года назад

    suppose in a model, with a random_state 19, I am getting greater accuracy. So should I stick on to that random state, ie should I deploy the model with that random_state? or should my model perform well with all other random_state?

    • @DataMites
      @DataMites  3 года назад

      "Hi, Antony Joy,
      While deploying and predicting, you do not need to interact with randomness like you faced in training, you can deploy your model as it is."

  • @shushmakothapalli9657
    @shushmakothapalli9657 10 месяцев назад

    sir how to find best random state ?
    tell me with the code

    • @DataMites
      @DataMites  7 месяцев назад

      @shushmakothapalli9657 When you set a random state to a specific value, the random number generator will produce the same sequence of random numbers each time you run the algorithm with that specific random state.E.g., X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42). Setting random_state=42 ensures that every time you run this code, you'll get the same split of data into training and testing sets

  • @MB-sh9ur
    @MB-sh9ur 2 года назад

    Sir, why everytime random state is selected as 42? What's the logic behind it?

    • @DataMites
      @DataMites  2 года назад

      When you use random_state, it gives you same data points for training and test test, no matter how many times you execute your code the result would be the same. And it doesnt matter what value you give. You can give any number. Since many practioners use 42, the leaners also follows this. Changing the values for random_state, is not going affect the performance of the model.

  • @krishnendudey7155
    @krishnendudey7155 3 года назад

    How to determine what value of random state would give me the best score for a given model ?

    • @DataMites
      @DataMites  3 года назад +1

      "Hi Krishnendu Dey, You can use looping for it, but it's better to do hyperparameter tuning regarding the train test split and other different estimators of ml algorithm instead of the random state."

  • @manjunathreddy4461
    @manjunathreddy4461 3 года назад

    If I've 8000 rows with 30 columns...how can I find which is the best random_state

    • @DataMites
      @DataMites  3 года назад +1

      Hi, It doesn't matter if the random_state is 0 or 1 or any other integer. What matters is that it should be set the same value, if you want to validate your processing over multiple runs of the code.

  • @mehmetarslan2034
    @mehmetarslan2034 3 года назад

    Why do we choose random state as 42 very often during training a machine learning model? why we dont choose 12 or 32 or 5?
    ***Is there a scientific explanation?***

    • @DataMites
      @DataMites  3 года назад +1

      Hi Mehmet Arslan, You can choose any random state. Please watch the whole video to understand the concept of random state.

    • @mehmetarslan2034
      @mehmetarslan2034 3 года назад

      @@DataMites thanks i will watch

  • @__________________________6910
    @__________________________6910 2 года назад

    noice

  • @maverick_always
    @maverick_always 3 года назад

    Please correct the formula nCr = n! / (n-r)! r!

    • @DataMites
      @DataMites  3 года назад

      Hi srikant raman, thanks for pointing it out. Calculation was done with (n-r) value but seems there was some error showcasing the formula.

    • @maverick_always
      @maverick_always 3 года назад

      @@DataMites No issues ! Greatly appreciate the response

  • @rohitpant6473
    @rohitpant6473 2 года назад

    wrong combi formula

    • @DataMites
      @DataMites  2 года назад

      nCr= n!/r!(n-r)! at 5:01 in the video, the formula should be changed to the given formula

  • @rameshmadhubhashitha
    @rameshmadhubhashitha 4 года назад +1

    good explanation. thank you!

  • @sambitsekhar2820
    @sambitsekhar2820 3 года назад

    Thank you for such a clear explanation.

    • @DataMites
      @DataMites  3 года назад +1

      Glad it was helpful!

  • @ankushkothiyal5372
    @ankushkothiyal5372 2 года назад

    thank you