hey good morning thanks for watching So today we're going to be going over what we got from week one betting and then I'm going to um uh so we're going to look at week one the basically I'll just explain stuff real quick so um where is it I'll just show it on my YouTube uh let's make sure this is was working before I exit out um so I was able to get a gaussian process classifier I guess I'll just talk about it I got a gaussian process classifier to give positive returns for nice on average average positive returns or just total positive returns for every season 20 2014 through 2021 one if I have at least 7 years of training data um the plan was to apply that to uh last week's results um but uh I'm missing the last two years of data 2021 and 20 or sorry 2022 and 23 I don't have any data um I have data from 2007 through 2021 um so then um as I was coding it on Sunday I tried to go through and [Music] um you know get it to uh return positive results but I wasn't able to get it to do that and it actually was returning extremely bad results like the only picks it was making was losses I think it made like six or seven picks and only one of those ended up winning the Steelers um and so that made me think that uh maybe it's just you're I'm just feeding in um the home team spread swing for the away team and the away team spread swing for the home team so it's picking opposite of what it learns um so that's the first thing I want to look at today is am I using the classifier correctly or is it picking the opposite of what it should be all right um we also want to assess results from week one oh let's just call this one picks so we didn't actually make any picks in week one just that na a now let's make another one for week two and the first game is coming up tomorrow uh Miami versus Buffalo um so hopefully we'll be able to make a pick on that by the end of the stream and then what else is this coding week one results there's something else I oh um okay so to um test whether classifier is being used properly um okay then we want to do first analysis of [Music] game of money line swings okay now week two get rid of that oh and assess results from week one um do soft analysis for buffalo versus Miami okay um where are we picks make this one analysis now week two to buffalo versus Miami all right so then what matters performance last week um injuries uh so we care how the team performed last week we care about injuries we care about uh you care about how much the game matters if it's later in the season early in the season of course it matters uh rivalry cuz especially in NFL teams play each other really hard um maybe this would be easier as a table all right performance last week injuries rivalry uh and then local markets we'll make the third one and then two of these oops insert okay 3x3 okay now this one's Miami Buffalo [Music] um performance last week injuries um all right how did they perform last week how are the injuries meaningfulness of game um oh right local markets what do local markets say all right um let's go look at ESPN NFL thanks for watching whoever's watching um yeah I forgot how to access the chat show all into whatever um I guess I could see it there okay so let's go to Miami Buffalo or sorry just Miami 1058 okay how did the DOL do last week blah blah blah blah blah oh so [Music] Jacksonville was winning the Dolphins came back oh they won on a last second field goal h okay so last week the significant things Miami won on a last one on a last second field goal um dominated Jags defense in second half um dominated Jaguars defense Jaguars are pretty good um is there a box yes so see what's their Total Defense in the second quarter or total offense in the second quarter Miami controlled time of possession [Music] um okay now let's get Dolphins injuries okay then let's put Here Local sources so we want to know um what is what are good sources of information for each media Market um went down early Buffalo okay oh dude are there any injuries Raheem Moss starts out say a chain game time decision Washington Ramy yeah okay um meaningfulness of game this is a division game right I think it is AFC East yep um division game uh we have to find out what local markets say home of the Dolphins there's got to be one one of those [Music] Dolphins um media coverage we could just go to Reddit should we try that Miami [Music] Dolphins I don't know how to determine if it's a good source of information um we have Dolphins wire they might just have that for every team come on oh I got to get out of that table um sources two attack of ioa not worried about M white blah blah blah where the Dolphins landed in power ranking two point favorite versus Bills okay what are the big story lines according to Dolphin wire Miami Dolphins take down division rival Buffalo Bills Miami is writing the momentum of second half come from behind win over the Jacksonville Jaguars in week one and quarterback Tua yeah Tu is in a contract year we all know to is in a contract here um I was reading on odd shark that uh what's his name struggles on the road whatever that guy's name is I can't think of his name right now Josh something dolphins are fully aware this is a match up at home they must win dolphins and bills both secured wins in week one both games of season go okay yeah this has been a good rivalry recently games against the bills are must-win yeah I think that's what happened to Miami last year is that they didn't get a home playoff game cuz they lost to the bills in the last game of the season I think a win on Thursday night would put the Dolphins in an incredible position going into week three matchup they want the Dolphins to win so bad uh let's go dolphins are looking to end a losing streak against Buffalo that's all they're talking about how will the Dolphins distribute targets um Dolphins offense was very Reliant heavy Reliance on Star players I don't know what to make of that I don't think that matters who cares if they rely on Star players what the [ __ ] Malik question Dolphins offensive line what do we who cares about this guy they're just grasping at straws here all right let's get out of here um did we learn anything um dolphins need to break losing streak against bills okay that's not very um I mean of course the team thinks that of course the team is going to hate the bills and be very motivated to beat them I'll just say um highly motivated to beat the bills but they they also didn't look that great last week they finished the game strong but Jacksonville is a pretty good team so um I don't really know what to make of all this uh let's try Reddit real quick Reddit dolphin um yeah obviously hit the bills okay let's go or top uh this week save this game so they're pretty close to losing tyre's touchdown bang um oh the Dolphins went down 140 I went down 14-0 and what was the final score god damn it oh so they scored dude they all scored them 20 to three so I'd say they just got off to a slow start slow start 20 to three run after going down 14 to zero all right now what do we think about Buffalo come on any comments nope okay Buffalo what do we think Josh thre an interception but he had a good game obviously they love Josh Allen all right now how did the Bills do oh they beat the Cardinals they had a boat race versus the card Cardinals their offense looked really good everybody thinks the Cardinals suck um but the Cardinals are way better this year um one in a boat race versus Cardinals all right um now what happened in this game a little back and forth uh [Music] um Arizona touchdown so Kyler's only passing touchdown came halfway through the first quarter that's not good for him but buffalo's defense looked pretty good all right so was a little back and forth Buffalo took control at the after halftime [Music] 1710 um really yeah we could say it was back and forth in the first half bills took control in the second half now time of possession was split bills got way more yards one turnover each bills had more first downs 23 first downs is a lot okay now let's look at injuries Dwayne Smoot Okay now what's that mean for them okay maybe it doesn't matter if there's not a single post on DNE Smoot is dway smoot a controversial player Dwayne Smoot okay so he's new this year um D de Smoot all right oh he's still injured all right whatever nothing important meaningfulness of game division game have dominated rivalry have dominated a competitive rivalry in recent years um and what a local market say about it finally ability to adapt on the Fly help B's defense Spurs season opening win over Cardinals new look and Young defense should poison being able to adapt on the Fly and helping us a comeback season okay so this is interesting young defense struggled at the start of the Arizona game but held it down in second half or win but they could have a porous defense at least the bills are concerned about it this that's an article that's is that a whole article all right Josh Allen's National profile who cares teron Johnson is teron Johnson important okay teron Johnson had one tackle all right so that doesn't matter get out of here oh just seven snaps into the game okay that's the same thing billswire Buffalo Bills neigh rumors yard Barker they might have some good stuff okay local news this is nice yes that's what we need what do the Bills fans think is going to happen let's add a table RIT okay Shir has a TD but it may be closer than we think all day I wouldn't be surprised to go down one or two scores early then start rolling I'd like to see these new dudes on defense get after it as well make it a headache oh oh this guy nailed it close game I wouldn't be surprised to go down one or two scores early and then start rolling this guy knows his stuff okay whatever um Rising all right um take that out okay I think we're good on this so we'll have to do the other games as they come up now let's go back to here test weather classifiers oh yes so we have to test the classifier now oops I don't like that color new window grass okay slash NFL that okay use classifier okay so let's go turn that on take off optimize okay and so this is making picks for last week all right so now we're getting a nan value from that um Excel sheet so we have to go troubleshoot that here we go uh um where's that Excel file oh maybe I'll just open Excel and it will be in recents oh I know where it is it's blah blah blah blah 2024 data line history week one. EXL oh there it is okay um man I hope we didn't lose that let's go to odd shark and see Lion's Rams well might be able to see it on here oh my God I hate numbers all right here we go so opened it minus 179 and 159 opened atus 179 and 159 oops 159 and then where did it close - 250 to10 okay home odds yep okay we should be good to run this whoa and what are we printing are we printing um yeah what are we printing results home swing equals home swing a away swing equals away swing well that can't be misinterpreted probability of zero zero for the home team so we would have picked the lion what if we take 2018 out of the training Seasons h Steelers at Falcon so this is the oh it would have picked the RS okay now what if we just switched it around okay so print all right if this crap if that whole thing that crap is less than okay so we're going to say pick equals data of home if that whole thing comma 2 is greater than greater than or equal to threshold then we're going to say threshold go 0.5 now uh see how that looks oh else okay whatever if whatever then we could say pick equals data of Home El if um is greater than threshold otherwise if that whole monstrosity okay so now we have the probability that the home team wins probability of Z One okay so then this is just 100 minus that whole thing greater than threshold um then we could say pick equals data of away ya away and then we could say else pick equals none because we don't care what the pick is what happened pick pick equals data oh data of home of C yeah oh but it makes a pick so if oh start 0.5 so let's make it 0.6 still made a pick for everyone otherwise if 100 so let's say it's 40 100 minus 40 okay so if the probability is 60 then the probability is 40 then that is 60 Now 60 is greater than threshold oh should be in a percent all right nice okay so if we had a threshold of 60 here are the picks we would have made last week NFL full scoreboard come on thing scoreboard uh week one all right so we picked the Steelers which won nice Cardinals who lost not nice Bengals who lost not nice but anyone would have picked that and then Rams who lost not nice and then if I just switch around for C swings and enumerate zip data home Swing Away swing home Swing Away swing equals swings home swing equals home Swing Away swing so what if we flip them what picks does it make then it just picks Falcons okay that lost bills good pick Patriots good pick Seahawks good pick Browns bad pick so we don't really know what to make of this the I think the top thing right now is that I need more data um we're going to conclude for now that this is being used properly uh threshold equals 60 all right um now let's open a new file and let's just call it analyze line movement F okay here just don't want to miss any comments okay now we're good to code so we want to look at the line movement for looking at how the bedding lines move um and maybe we could I'm hoping we could represent this as some gaussian noise or something um and then you know we could see how the line is deviating and uh you know predict uh regression to the mean um okay so if we're looking at betting lines move now oh okay it's in there 2024 line history file okay import OS now files equals os. list dur and we want to list 2024 data SL line history and we want to get each file file for file in that if um file do split so if we split it on a period and then the end of it is CSV then we want to get it then we could say for file in files um let's just open one of these profile and files DF equals okay now we need pandas PD then we could just say pd. read CSV and the file we're reading is that slash file okay and then once we read in the file okay let's just do let's try over here oops three not four okay so I'm going to import pandas DF is equal to pd. read CSV 2024 data slash line history [Music] slash uh let's just go Broncos at seahawks. CSV right DF what's that look like DF do dat um of minus one so it should be September 8 2024 355 okay so from date time import date time now what if we just do date time of that yes I did mean date time oh okay um okay so let's get that let's do that do split and how do we want to split that we want to split it on the [Music] dash so we kind of want to turn it into a dat I don't want to look at data going back to may I just want to look at data for the week leading up to the game so is there the same amount of data points um no it's going to be different for each one so yeah we're going to have to get the date so let's do that okay okay then here we're just going to do test date splitter is equal to true if test date splitter is equal to true then we're going to go through and do this whole thing um um yeah that's fine all right okay so now we're getting the last element in the date column oh DF is not defined is not happening shouldn't uh I don't get that for file and files so then we get DF but that never goes through print files get out of here fly all right what's that look like okay oh so it's not getting any files all right back to that [Music] analyze line movement yeah that's fine okay okay import OS os. list dur 2024 data slash history F that's minus one that's what the problem is yeah okay I don't need to print all that crap okay so now we've got that now we got let call that date okay then okay so then we have day is equal day time is equal to date dot uh split going to split it on dash okay then we could say print day time I don't care print daytime that's fine print day I'll just put it on separate lines print day print time all right now what do we have to do for date time date time date time time Delta python create date time object [Music] Max split date time. date time so you put year month day python date time strip time returns of date time can corresponding to a date string date time. strip time year month day hour year month day hour minute second Okay now what's that called it's a suffix suffix is equal to day dot split split it on the space and get the second object suffix suffix that we can comment out for now is no suffix okay uh let's go back in here date time you have to date import pandas as PD now we can run that uh DF do date do values of minus [Music] one uh do split on the dash and get the first item get the second item I mean do split so let's just go minus one uh get out of here fly all right then that whole thing do split on the space oops Yeah do split on the minus one you just do do split on the space oh because I did day do spit du all right back here exit good um and how long is that suffix should be two yep all right um now if uh all right so we have suffix [Music] PM hour all right all right time dosit now new time time is equal to time.it split on that and then just get the first element so that we drop pm and then we can say that hour minute second is equal to time dos split and now we just have to split it on the colon um and then we could say if suffix is equal to if suffix do lower is equal to PM um we could say hour increment hour by 12 if suffix low PM otherwise just let it be um okay hour [Music] hour [Music] minute [Music] minute minute sln [Music] second second let's just say [Music] time expected three got one okay put the debugger in there from pdb import set Trace as St time not split ahuh one can only concatenate string not into string oh hour minute second and int of I for I in that should fixed it up hour 24 um and hour is less than 12 else hour okay so if it's 12 then just leave it the same nope um is is let just say not equal to 12 nope um R plus equals 12 if that and hour is not equal to 12 if the hour is 12 let it B if suffix do lower is equal to pm and hour is not equal to 12 how does that make any sense print that thing oops no tell us what we're trying to look at it's true therefore suffix do lower is equal to PM oh guess we should put that before we increment our false um and hour is not equal to 12 so that's false that evaluates to false so we're not we shouldn't be doing anything to hour the hour we're getting print hour here should be 12 yeah so the hour we're getting is 12 and hour is not equal to 12 if suffix do lower is equal to pm and hours not equal to 12 I guess I'm guess I'm writing that wrong hour is equal to 12 suffix is equal to PM hour plus = 12 if suffix is equal to pm and hour is not equal to 12 L hour hour why did that get incremented suffix I just don't understand why that's getting incremented because we're saying if suffix is equal to p.m and hour is not 12 then increment it by 12 otherwise just let it be suffix is equal to pm and hour is not 12 this is stupid but if I increment it nothing will change yeah that wouldn't do anything okay and then so if the hour is equal to 12 then it should be zero so we could just say increment hour by 12 if we're in p.m okay so then 12:00 p.m. becomes 24 um midnight will be at a.m so then midnight will still show 12 something so then we could just subtract everything yeah and and finally hour minus = 12 if um if our in else hour okay and we want to make it minus = 12 if it's 24 or 12 um okay let's test it hour 12 minute 16 second 45 all right then day September 8th so okay then we could say month day year is equal to day do split split it on the comma print month day and year okay what if we just split that on the space hell yeah heyo yeah okay and then month Dom for day of month is month day dos split all the space month day of month all right print month day of month and then year okay now let's see does date time take that all right 224 now if instead of that what if we just say set okay date time python date time use string month oh that's even easier did I not need to be doing this whole thing thef that okay all right um from date time import date time and we could say d equals date time. strip time and we want to strip DF do do date do value minus one and then the format is week day is local abbreviate name sa sa sap hour good one say okay so first we have September 8 so first we have percent B then space then the week day not zero p a decimal how about just day of month as a normal decimal that's what I have oh my God so stupid okay whatever present D see if this works okay then comma space percent y then space- space hour hour percent I hour um where is it hour minute per m whatever percent M and then percent s s and then space and then percent P I think it is yeah D holy [ __ ] nice uh okay so September 8th 2024 at 3:55 38 p.m. hell yeah that works okay I got to go to the bathroom real quick for for for for e e okay I'm back so we have our date time we've gotten that now let's go blah blah blah blah blah um all right turn that off uh for file and files get the data frame now for okay from date time import time Delta um and then D minus time Delta days equals 4 nice there equals 7 oh yeah so most recent is equal to that thing and then we could say for Row in DF Doer rows okay then we could just say Min time is equal to from date time import date time and time Delta then Min time is equal to most recent minus time Delta and days is equal to 7 um and then DF is equal to DF do whereare uh DF do whereare DF dot I see datetime do strip time of tf. dat and then that thing is greater than Min time do drop in a and then we could say for C comma space file in enumerate files then we're just going to say we're on the first iteration throw the debugger in there all right let's run it oh pandas perform a function on an entire column come on hurry up how are we doing oh we're getting viewers in and out nice uh no comments that's fine um exit out of that the apply right uh apply method applies the function to each column but you can use the axis param parameter to apply the function to each row instead all right Lambda X is x + one so then just add one to each all right [Music] um most recent metime DF of pretty time is equal to um DF of pretty time is equal to DF time DF do date dot apply Lambda X is defined as strip time of x okay now let's try that very good now let's see what DF looks like who is that pretty time yeah then we could just say DF is equal to DF do where DF do pretty time is greater than Min time greater than or equal to uh otherwise drop it now let's do that now I should just show the last week worth of stuff that's just weird [Music] man is this Broncos at cawks huh oh yeah I mean that works fine um H okay LDA X so then we get the date time but um days from start date time that strip time what's the issue again is there even an issue we want to get where pretty time is greater than or equal to M time oh minus [Music] mtime or we could just do most recent minus that [Music] oh time Delta difference between two date times python C = A minus B that's what I did most recent minus whatever that [ __ ] is and what did it give us invalid comparison time Delta 64 and date time time Delta 64 [Music] Min what's the time Delta is it time Delta just cuz it's a minus H you can subtract time Deltas or date times and output are time Deltas which are converted to seconds pd. 2 time Delta T1 finish so this was minus time Delta day equal 7 so Min time is a Time Delta but there's no what the hell is a Time Delta here because it's pandas most recent okay we could just make this one pretty time time until let's just say time since open DF of time since open is equal to DF of [Music] time minus DF dod. L apply do pretty time do apply we want to apply Lambda X and we want to return xus Min time [Music] right okay come on run oh uh pt. plot DF do time since open DF Dot all right so initial home odds is equal to uh DF of hell's taking that so long all right so home spread away spread home odds away odds cool so initial home odds is equal to DF of Home odds dot values of zero initial away ODS is equal to DF of away odds do values of zero uh then we could just say DF of home change is equal to DF of Home odds minus initial home ODS likewise we could do the same thing for away change initial aways okay come on let's analyze the line data frame has no attribute home change did you mean home oh yeah I did label is equal to file. split split it on the dot and get the zeroth element um I think we could just do pl. Legend pl. tile week one line changes PLT xlim just going to call it days since open okay unsupported operand types string and Str DF of Home odds what well home change equals DF of Home odds minus initial home odds all right let's go to the DF oh so there's strings so [Music] pandas change data type of array okay that as type [Music] all right so int um as type to numeric pd. 2 numeric um okay so these we could say are we could just say uh DF of a equals pd. 2 numeric of DF of a DF of Home odds is equal to PD do2 the hell two numeric of P of of oops of um okay now we could just say back here now let's just say do this for each key so for key and home odds away odds let's just do that DF of key PD do2 numeric of DF of key now that should work save exit let's run it we want to investigate normalization and regular regularization 1 two three exclamation too many values to unpack Left Right 360 oh my god Set X liim I even do that oh label not limb wonder if uh wonder if there's a way to get the what happened oh forgot to show the plot okay let's see how this looks this should run come [Music] on huh so Vikings at Giants I don't know what happened there wow this is cool though this we could um this I think is useful cuz you could get some average movement and then you see oh is this deviating from the average and let's take it but um huh well I don't know what to make of that but I can throw it in over time this one we could call week one 2024 that's how the spread swing is looked okay I think that's it for this stream thanks for watching I'll be streaming every day from here on out for the rest of the season so please tune in if you're interested thanks for watching