Given X and Y sample data as something like [ <mtable rowspacing="4pt" columnsp

Poftethef9t

Poftethef9t

Answered question

2022-06-21

Given X and Y sample data as something like
[ 1 2 2 3 ]
[ 7 8 ]
In such an arrangement how do I include B3? I would think I would want to add it in as always 1 in X. IE
[ 1 2 2 3 1 1 ]

Answer & Explanation

benedictazk

benedictazk

Beginner2022-06-22Added 22 answers

Usually the sample data is represented as a 'design matrix' X in which each row represents one training vector. For your X it would look like this:
[ 1 2 1 2 3 1 ]
In general, you need to insert column of 1's as the first (or last) column in you design matrix.
The X you proposed would be correct if each column, not row, represented a training example.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Inferential Statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?