🎲 random.seed() — Small line. Big impact. Every time we split data, initialize models, or run cross-validation, randomness is involved. Without setting a seed → results change every run. With a seed → experiments become reproducible. Python uses a deterministic algorithm (Mersenne Twister). Same seed = Same sequence. It doesn’t improve accuracy. It improves credibility. Reproducibility is not optional in production-grade data science. #DataScience #MachineLearning #Python #MLOps #AI
Setting a seed for reproducible data science results
More Relevant Posts
-
Day 1 of my AI & Data Science journey Started simple today — I built a Student Marks Analyzer 📊 using Python. I realized how important these fundamentals really are. What I worked on: • Lists (handling data) • Loops (processing data step by step) • Conditions (making decisions) • Basic stats — average, max, min The biggest realization? Before jumping into fancy AI models, you need to be comfortable working with data and logic. Would love to hear your suggestions or feedback! #Python #DataScience #AI #LearningInPublic #Consistency #100DaysOfCode
To view or add a comment, sign in
-
-
🧠 Day 26 – The 30-Day AI & Analytics Sprint 🌜 🔥 Python Tricky Question! What will be the output of this code? def tricky(n, lst=[]): if n > 0: lst.append(n) return tricky(n-2, lst) return lst print(tricky(5)) print(tricky(4)) ❓ Choose the correct answer: A) [5, 3, 1] [4, 2] B) [5, 3, 1] [5, 3, 1, 4, 2] C) [5, 3, 1] [4, 2, 1] D) Error 💡 Hint: Default arguments in Python are evaluated only once! 👇 Drop your answer before checking the solution! 🚀 Why this matters? This question reveals one of the most common pitfalls in Python: 👉 Using mutable objects as default arguments It can lead to unexpected bugs in real-world applications 😅 #Python #Programming #AI #DataScience #CodingChallenge #30DayChallenge #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Starting my journey in AI & Machine Learning Currently learning the fundamentals and practicing basic data operations using Pandas in Python. In this video, I worked with a sample hotel dataset to explore: • Reading CSV files • Understanding datasets using head(), tail(), info(), and describe() • Filtering data • Dropping rows and columns • Using loc[] and iloc[] for indexing Building strong foundations before moving into Machine Learning projects. #Python #Pandas #MachineLearning #ArtificialIntelligence #PythonDeveloper #FullStackDeveloper
To view or add a comment, sign in
-
🚀 Day 4 of My Generative & Agentic AI Journey! Today’s focus was on one of the most commonly used data types in Python — Strings. Here’s what I learned: 🔤 Strings in Python: • Strings are immutable — once created, they cannot be changed • Any modification creates a new string instead of changing the original 🔍 Indexing & Slicing: • Accessing individual characters using indexing • Extracting parts of a string using slicing • Learned how powerful slicing is for handling text data 🔐 Encoding & Decoding: • Understood how strings are converted into bytes (encoding) • And how bytes are converted back to strings (decoding) • Important for handling data, APIs, and real-world applications 👉 Key takeaway: Strings are everywhere — from user input to AI models — and understanding how to work with them efficiently is a must. Another step closer to mastering the fundamentals 💪 #Day4 #Python #GenerativeAI #AgenticAI #LearningJourney #BuildInPublic
To view or add a comment, sign in
-
-
🚀 Post 1 — Day 25 🧠 Day 25 – The 30-Day AI & Analytics Sprint Today's Python question 👇 a = [1, 2, 3] b = a b += [4, 5] print(a) ❓ What will be the output? A) [1, 2, 3] B) [4, 5] C) [1, 2, 3, 4, 5] D) Error 💡 Hint: Remember that Lists in Python are mutable objects. Also think about: What happens when we assign b = a? Does += create a new list or modify the existing one? 👇 Write your answer in the comments before checking the solution! #Python #Programming #AI #DataScience #CodingChallenge #30DayChallenge
To view or add a comment, sign in
-
Day 4 of my Data Science & AI/ML journey Today I spent time pushing further into Python fundamentals, mainly focusing on repeating tasks and organizing code. Covered things like: • while and for loops • break & continue statements • Creating functions • Lambda functions One thing I noticed today… Variable Scope (Local vs. Global) is trickier than it looks! I realized we can easily read a variable created outside a function, but if we try to modify it directly inside, Python quietly creates a new local variable instead. As my code gets longer, keeping track of where variables live and how they interact is going to be super important to avoid bugs. Still learning, still improving — one step at a time. #Python #LearningInPublic #DataScienceJourney #AI #MachineLearning #100DaysOfCode
To view or add a comment, sign in
-
TimesFM is a foundation forecasting model developed by Google Research that has been pre-trained on a time series corpus of 100 billion data points, and shows impressive performance on various benchmarks from diverse domains. Google has recently released TimesFM 2.5, hence topping the GiFT-Eval leaderboard on all accuracy metrics, while using fewer parameters than before! TimesFM can be easily accessed via the Hugging Face Python library. You can visit the link below for more information and follow us for regular data science content! 𝗧𝗶𝗺𝗲𝘀𝗙𝗠 𝗚𝗶𝘁𝗵𝘂𝗯 𝗽𝗮𝗴𝗲: https://lnkd.in/dyAyTuvD #AI #python #forecasting #deeplearning
To view or add a comment, sign in
-
-
🚀 Exploring Scikit-Learn – The Backbone of Machine Learning in Python! From data preprocessing to model evaluation, Scikit-Learn makes building ML models intuitive and efficient. Whether it's Supervised Learning (Linear Regression, KNN, Decision Trees) or Unsupervised Learning (K-Means, PCA), this library provides a clean API and powerful tools to turn data into insights. Understanding core modules like linear_model, tree, ensemble, cluster, and metrics is essential for every aspiring Data Scientist and ML Engineer. Consistent practice + the right tools = impactful machine learning solutions 💡 #ScikitLearn #MachineLearning #Python #DataScience #ArtificialIntelligence #MLAlgorithms #DataAnalytics #LearningJourney #TechSkills #WomenInTech
To view or add a comment, sign in
-
-
Day16-Problem of the day Given the root of a binary tree and an integer k, determine the number of downward-only paths where the sum of the node values in the path equals k. Why it works: By keeping track of the cumulative sums we've seen so far, we can determine if a sub-path summing to $k$ exists in $O(1)$ time at each node. It transforms a potential $O(N^2)$ bottleneck into a sleek $O(N)$ linear traversal. 🚀 Key Takeaway: Data structures like Hash Maps aren't just for flat arrays; they are incredibly powerful for optimizing recursive traversals by "remembering" the history of a branch. #CodingChallenge #DataStructures #Algorithms #Python #GFG #Learning
To view or add a comment, sign in
-
-
👀 How can you know if a year is a LEAP YEAR ❓ ❓ ❓ 🐍 Python already includes the calendar module. So you only need: calendar.isleap(year) 💡 However, for a year to be a leap year, one of two conditions must be met.: ✅ The year is divisible by 4 and is not divisible by 100 ✅ The year is divisible by 400 With that rule, you can build a simple condition. #Python #AI #Maths #MachineLearning #SolveProblems #Algorithms #TechInterviews
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development