Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29

Thread: Lineup Analysis App

  1. #1
    Join Date
    Mar 2002
    Location
    New Hampshire
    Posts
    1,930

    Lineup Analysis App

    Greetings! As discussed in the "Ideas for Another App" thread, I have developed a standalone app based on this web page. You enter in your lineup and each player's OBP and SLG, and based on the formulas developed by the people referenced at the link I just gave, you will get the optimal lineup based on the players entered.

    You can choose two eras: 1989-2002 and 1959-2004. The latter encompasses more types of eras, and is more likely to be accurate for historical sims. The former is probably better with modern sims.

    If your pitcher is hitting, you can enter his hitting stats or enter the stats for all of the pitchers on your team as a whole (can be gathered using the Box Score Parser).

    The app takes about 90 seconds on average to generate the best three lineups given the stats entered. This is slower than the web page (most likely due to the fact that TCL is slower at calcs than Python), but the advantage is that you do not need an internet connection to get the optimal lineup any more.

    You can save lineups under different names, and can edit them directly in the INI file if you wish, using the button provided.

    Screenshot:

    Name:  LA1.jpg
Views: 2385
Size:  78.8 KB

    The number in the first column is the number of runs per game that the lineup (which follows) should generate.

    Here is the zip file: LineupAnalysis.zip

  2. #2
    Join Date
    Dec 2006
    Location
    Pangea
    Posts
    6,985

    Re: Lineup Analysis App

    I think you need to factor in speed because it just told me to bat Todd Helton lead-off
    Quote Originally Posted by President View Post
    For some reason I thought rockies was a big black guy.

    I was wrong.
    Back at this dynasty thing again: Resurrecting The Rockies: 2001 Onward

  3. #3
    Join Date
    Mar 2002
    Location
    New Hampshire
    Posts
    1,930

    Re: Lineup Analysis App

    Quote Originally Posted by rockiesfan4ever View Post
    I think you need to factor in speed because it just told me to bat Todd Helton lead-off
    If you look at the web site that I got this from, and the underlying logic from the supporting pages, you will realize that they only use OBP and SLG. If you can find me a formula that uses speed, or if you want to develop one, I can incorporate it.

  4. #4
    Join Date
    Jul 2007
    Location
    airstrip one, oceania
    Posts
    9,474

    Re: Lineup Analysis App

    My issue seems to be more with the lineup formula used (just can't see myself batting Fielder 2nd). App works perfectly though

  5. #5
    Join Date
    May 2008
    Location
    Republic of Georgia
    Posts
    12,797

    Re: Lineup Analysis App

    Quote Originally Posted by etothep View Post
    My issue seems to be more with the lineup formula used (just can't see myself batting Fielder 2nd). App works perfectly though
    Who bats 8th and 9th?
    What are the OBP's?

  6. #6
    Join Date
    Jul 2007
    Location
    airstrip one, oceania
    Posts
    9,474

    Re: Lineup Analysis App

    It's 6 games into the season, so I entered projected stats verse righties to see how similar my lineup is to theirs.

    Here's what the lineup analyser gave me as the best lineup:
    1) Ryan Sweeney - RF (.356/.419)
    2) Prince Fielder - 1B (.402/.606)
    3) Maicer Izturis - 2B (.343/.388)
    4) Ryan Braun - LF (.360/.545)
    5) Adam Lind - DH (.358/.520)
    6) Mat Gamel - 3B (.336/.429)
    7) Alex Avila - C (.345/.421)
    8) Alcides Escobar - SS (.322/.363)
    9) Julio Borbon - CF (.356/.397)


    The lineup I've used so far (if interested):
    1 - Borbon
    2 - Sweeney
    3 - Braun
    4 - Fielder
    5 - Lind
    6 - Avila
    7 - Gamel
    8 - Izturis
    9 - Escobar


    Probably just a matter of taste, as a lot of people are likely to handle the same lineup differently, but I can't bat my best slugger second. The changes of the other 2 lineups given have Borbon batting leadoff, Sweeney batting 3rd, Izturis batting 9th, while they switch having Avila & Gamel in the 6th & 7th spots

  7. #7
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    Batting Fielder 2nd, to maximize his plate appearances but with more chance of runners on than the #1 slot, is quite reasonable when your lineup features a couple of other good sluggers like Braun and Lind. What I find hard to accept from the lineup generator is that it consistently places one of the worst hitters in the #3 slot (where tradition dictates your best hitter should go.) Tango/Lichtman/Dolphin's The Book indicates the #3 hitter should be your fifth best overall. The logic is best 5 at the top of the order, with #1 emphasizing OBA, #4 emphasizing power, #2 generally the best unless you need his power at #4, and #5 better than #3 (who comes up the most with two outs and no runners on base.)

  8. #8
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    Another conflict between the lineup generator and T/L/D's advice is the generator consistently buries a good OBA guy at #9; T/L/D found this worked only in the National League where dropping your 8th best hitter after the pitcher helped. There had to be a very large disparity in skill between the 8th and 9th best hitters to justify flip-flopping them.

  9. #9
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    Following a link on the name of the first author to get at the underlying logic,
    http://www.beyondtheboxscore.com/sto.../12/133645/296
    I see that this was based on regression analysis of actual team runs vs. OBA and SLG by position. Further down there is a chart of Hit%, Walk% and Extra base% by position. By comparison, T/L/D use theoretical analysis of the value of different events in a hypothetical batting order.

    I'm skeptical of building a lineup based on the regression analysis because in real life, every team throughout the era analyzed (1989-2002) followed much the same strategy: best hitter #3, speedy guy #1, good "bat handler" #2 (often a poor hitter), sluggers at #4 and #5, pitcher or worst hitter #9. So the regression only tells you the value of OBA and SLG within the context of a traditional lineup. You could use that info, for example, to analyze the value of a trade which improved your hitting at a particular spot in the lineup. T/L/D's work is based on computer simulation of various lineups, with the explicit goal of determining an optimal lineup.

  10. #10
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    One way to look at this is that, with every team having a very good hitter at #3, differences at that slot were much less important than at, say, #4. A team with a great #3 and not so great #4 would be worse off than a team with two good hitters back-to-back. But that's a far cry from putting your next to worst hitter in the third slot! This looks like a classic example of extrapolating outside the range of the actual data -- no one batted such a terrible hitter in the third slot.

    Nice idea for an app, Mizerak, but I don't trust the results.

  11. #11
    Join Date
    Mar 2002
    Location
    New Hampshire
    Posts
    1,930

    Re: Lineup Analysis App

    Quote Originally Posted by Lex Logan View Post
    One way to look at this is that, with every team having a very good hitter at #3, differences at that slot were much less important than at, say, #4. A team with a great #3 and not so great #4 would be worse off than a team with two good hitters back-to-back. But that's a far cry from putting your next to worst hitter in the third slot! This looks like a classic example of extrapolating outside the range of the actual data -- no one batted such a terrible hitter in the third slot.

    Nice idea for an app, Mizerak, but I don't trust the results.
    Well, that raises an interesting challenge for the BBM community. If you do not like the calc used to set up the lineup, or think the calc needs more input parameters...what should they be?

    This forum has never been about "Gee, that's not right and there is nothing we can do about it"...this is the MODS forum. We CORRECT issues here.

  12. #12
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    I did not actually see what formulas were used; I saw the regression results. Point me to the formulas and I'll see if I can adapt T/L/D's data. I might have to ask Tom Tango for permission before we publish things here, but I would guess with a plug for The Book he'd be agreeable.

  13. #13
    Join Date
    Mar 2002
    Location
    New Hampshire
    Posts
    1,930

    Re: Lineup Analysis App

    Here is the basis for the code I am using:

    1989-2002
    Lineup Slot, OBP multiplier, SLG multiplier
    1,2.997,.931
    2,2.255,1.263
    3,2.141,.933
    4,1.670,1.504
    5,2.254,1.146
    6,1.346,1.237
    7,1.528,1.164
    8,1.188,.825
    9,2.550,.539

    1959-2004
    Lineup Slot, OBP multiplier, SLG multiplier
    1,2.658,.946
    2,2.133,1.351
    3,1.689,1.206
    4,1.903,1.237
    5,1.745,1.240
    6,1.578,1.021
    7,1.792,.910
    8,1.458,1.174
    9,2.036,.593

  14. #14
    Join Date
    Aug 2002
    Location
    Atlanta, GA
    Posts
    1,033

    Re: Lineup Analysis App

    Quote Originally Posted by rockiesfan4ever View Post
    I think you need to factor in speed because it just told me to bat Todd Helton lead-off
    Who says you need speed in the leadoff spot?
    --- Chris J. Nelson ---

    Quote Originally Posted by CaseyWebNet View Post
    I am using HoustonGM's rosters and ChrisJNelson's picture packs.... because if you don't, then why even bother playing the game?
    Quote Originally Posted by glennrwordman View Post
    You may be the greatest American of all time. Of this I have no doubt.

  15. #15
    Join Date
    Feb 2007
    Posts
    1,749

    Re: Lineup Analysis App

    Well, I set up a spreadsheet with the T/L/D data and generated some plausible numbers, but so far it involves a lot of assumptions. Is there any way you can make the multipliers adjustable, some sort of settings file perhaps, so I can play around with things?

    By the way, it takes over 20 minutes to run your app on my XP machine, with a 1 GHz Duron and 256 mb memory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •