Skip to main content

Posts

Showing posts from August, 2022

TOP 10 Mostly asked Basic Programs in python

  1. Python Program for factorial of a number Factorial of a number is products of all natural number to till that number. for eg: 5!=5*4*3*2*1=120 100!=1*2*3*...........................................99*100 Logic: Suppose we have to find the the factorial of a number n then we required to multiply all number starting from 1 to n n!=1*2*3*4*.........................(n-1)*n! So we need to multiply all these numbers in this range 1 to n+1 why did I not  take range 1 to n because range function gives values less than 1  OUTPUT: Implementation  using Loop                                                          Implementation  using  Recursion

Multivariable Regression in Machine Learning

  Multivariable regression : A more complex, multi-variable linear equation might look like this, where  w  represents the coefficients, or weights, our model will try to learn.   f(x,y,z)=w 1 x+w 2 y+w 3 z The variables  x ,y,z  represent the attributes, or distinct pieces of information, we have about each observation. For sales predictions, these attributes might include a company’s advertising spend on radio, TV, and newspapers. Sales = w 1 Radio + w 2 TV + w 3 News Let’s say we are given  data  on TV, radio, and newspaper advertising spend for a list of companies, and our goal is to predict sales in terms of units sold. Company TV Radio News Units Amazon 230.1 37.8 69.1 22.1 Google 44.5 39.3 23.1 10.4 Facebook 17.2 45.9 34.7 18.3 ...