Hand ranking with pattern recognition

5 views (last 30 days)
Alem Zolota
Alem Zolota on 12 Jun 2016
Edited: Alem Zolota on 13 Jun 2016
I have the data in this format.
The attributes have following meaning:
COL 1) S1 "Suit of card #1" Ordinal (1-4) representing {Hearts, Spades, Diamonds, Clubs}
COL 2) C1 "Rank of card #1" Numerical (1-13) representing (Ace, 2, 3, ... , Queen, King)
COL 3) S2 "Suit of card #2" Ordinal (1-4) representing {Hearts, Spades, Diamonds, Clubs}
COL 4) C2 "Rank of card #2" Numerical (1-13) representing (Ace, 2, 3, ... , Queen, King)
COL 5) S3 "Suit of card #3" Ordinal (1-4) representing {Hearts, Spades, Diamonds, Clubs}
COL 6) C3 "Rank of card #3" Numerical (1-13) representing (Ace, 2, 3, ... , Queen, King)
COL 7) S4 "Suit of card #4" Ordinal (1-4) representing {Hearts, Spades, Diamonds, Clubs}
COL 8) C4 "Rank of card #4" Numerical (1-13) representing (Ace, 2, 3, ... , Queen, King)
COL 9) S5 "Suit of card #5" Ordinal (1-4) representing {Hearts, Spades, Diamonds, Clubs}
COL 10) C5 "Rank of card 5" Numerical (1-13) representing (Ace, 2, 3, ... , Queen, King)
COL 11) CLASS "Poker Hand" Ordinal (0-9)
0: Nothing in hand; not a recognized poker hand 1: One pair; one pair of equal ranks within five cards 2: Two pairs; two pairs of equal ranks within five cards 3: Three of a kind; three equal ranks within five cards 4: Straight; five cards, sequentially ranked with no gaps 5: Flush; five cards with the same suit 6: Full house; pair + different rank three of a kind 7: Four of a kind; four equal ranks within five cards 8: Straight flush; straight + flush 9: Royal flush; {Ace, King, Queen, Jack, Ten} + flush
I want to train a nn to sort hands based on their Rank.So I split this matrix into two matrices, one with the first 10 columns and the second with just the ranks ( Column 11).
When I now want to train my nn I cant select the second matrix as my target
:) Thank you

Answers (1)

Image Analyst
Image Analyst on 12 Jun 2016
To get the last column of your matrix you can use end:
pokerRank = yourData(:, end);
Beyond that I don't know what you want. Define "targets". And what is UCI (University of California at Irvine?). What is an instance (a row that indicates a particular hand that was dealt???) and what is an attribute (a column that has some special meaning?) And you might read this so we can help you better.

Categories

Find more on Card games in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!