Skip to main content

Posts

Linear Regression (Python Implementation)

  Linear regression is perhaps one of the most well known and well-understood algorithms in statistics and machine learning. In this post, you will discover the linear regression algorithm, how it works, and how you can best use it in on your machine learning projects. Contents… •Linear Regression •Simple Linear Regression •Multiple Linear Regression •Assumptions •Applications L inear Regression A statistical approach for modeling relationship between a dependent variable with a given set of independent variables. We refer dependent variables as response and independent variables as  features Simple Linear Regression Simple linear regression is an approach for predicting a response using a single feature. It is assumed that the two variables are linearly related. Hence, we try to find a linear function that predicts the response value(y) as accurately as possible as a function of the feature or independent variable(x). Let us consider a dataset where we have a value of response y for
Recent posts

JavaScript important array functions

  Not really next-gen JavaScript, but also important: JavaScript array functions like   map()   ,   filter()   ,   reduce()   etc. You’ll see me use them quite a bit since a lot of React concepts rely on working with arrays (in immutable ways). The following page gives a good overview of the various methods you can use on the array prototype — feel free to click through them and refresh your knowledge as required:  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array map()  =>  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map find()  =>  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find findIndex()  =>  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex filter()  =>  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter reduce()  =>  https://developer.mozilla.org/en-US/d

Next-gen JavaScript Features

In this module, I provided a brief introduction to some core next-gen JavaScript features. Here’s a quick summary! let & const Read more about let :  https://developer.mozilla.org/en-US/  docs/Web/JavaScript/Reference/Statements/let Read more about const:  https://developer.mozilla.org/enUS/docs/Web/JavaScript/Reference/Statements/const let and const basically replace var . You use let instead of var and const instead of var if you plan on never re-assigning this “variable” (effectively turning it into a constant, therefore). ES6 Arrow Functions  Read more:  https://developer.mozilla.org/en-US/docs/Web/  JavaScript/Reference/Functions/Arrow_functions Arrow functions  are a different way of creating functions in JavaScript. Besides a shorter syntax, they offer advantages when it comes to keeping the scope of this keyword (see here). Arrow function syntax may look strange but it’s actually simple. function callMe(name) { console.log(name); } which you could also write as: const c

How to Run/Compile C/C++ code in Vs code Windows

Linked list implementation [Best explanation] || Method 1

MongoDB - Create Database

MongoDB - Create Database If you want to check your databases list, use the command show dbs Your created database (mydb) is not present in list. To display database, you need to insert at least one document into it. MongoDB use DATABASE_NAME is used to create a database. > use database_name

MongoDB - Create Collection

MongoDB - Create Collection MongoDB db.createCollection(name, options) is used to create collection. Syntax Basic syntax of createCollection() command is as follows − db.createCollection(name, options) In the command, name is name of collection to be created. Options is a document and is used to specify configuration of collection. Parameter Type Description Name String Name of the collection to be created Options Document (Optional) Specify options about memory size and indexing Options parameter is optional, so you need to specify only the name of the collection. Following is the list of options you can use − Field Type Description capped Boolean (Optional) If true, enables a capped collection. Capped collection is a fixed size collection that automatically overwrites its oldest entries when it reaches its maximum size. If you specify true, you need to specify size parameter also. autoIndexId Boolean (Optional) If true, automatically create index on _id field.s Default value i