The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"Using MyKLRLearner and getting errors"

GarettGarett Member Posts: 10 Contributor II
edited May 2019 in Help
HI, I am trying to create a logistic regression model and I am getting an error:

Polynomial attributes not supported.

There aren't any polynomial attributes in my data (no text). Also, I read somewhere that excel has formatting problems sometimes, so I double checked and all the fields are formatted to number.  Also, I imported the data to an Access database and started getting another error:
numerical label not supported  ???

My label is the second column and is either a 0 or a 1. Isn't this correct for a logistic regression that only uses two values for inputs?


My XML:

<operator name="Root" class="Process" expanded="yes">
    <operator name="ExcelExampleSource" class="ExcelExampleSource">
        <parameter key="excel_file" value="C:\Users\user1\Desktop\hands\examples1.xls"/>
        <parameter key="create_label" value="true"/>
        <parameter key="label_column" value="2"/>
        <parameter key="create_id" value="true"/>
    </operator>
    <operator name="MyKLRLearner" class="MyKLRLearner">
    </operator>
</operator>

I attached my spreadsheet too.

[attachment deleted by admin]
Tagged:

Answers

  • haddockhaddock Member Posts: 849 Maven
    Hola!

    You had two problems, firstly that the label column was an integer, rather than a binominal, column, secondly that column 7 had an "I" ( capital letter i ) rather than a "1" (integer one). The following straightens things out...
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExcelExampleSource" class="ExcelExampleSource" breakpoints="after">
            <parameter key="excel_file" value="C:\Users\CJFP\Documents\examples1\examples1.xls"/>
            <parameter key="create_label" value="true"/>
            <parameter key="label_column" value="2"/>
            <parameter key="create_id" value="true"/>
        </operator>
        <operator name="FeatureNameFilter" class="FeatureNameFilter">
            <parameter key="skip_features_with_name" value=".*\(7\)"/>
        </operator>
        <operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="no">
            <parameter key="condition_class" value="attribute_name_filter"/>
            <parameter key="attribute_name_regex" value=".*\(2\)"/>
            <parameter key="process_special_attributes" value="true"/>
            <operator name="Numerical2Binominal" class="Numerical2Binominal">
            </operator>
        </operator>
        <operator name="MyKLRLearner" class="MyKLRLearner">
        </operator>
    </operator>
  • GarettGarett Member Posts: 10 Contributor II
    Thank you!  ;D
  • GarettGarett Member Posts: 10 Contributor II
    Haddock,
    Would you happen to know how to use the evolutionary parameter optimization with the KLRLeanrer? I keep trying to use the example, but I get an error. It works with the LibSVM, any ideas on how I could use my example above to optimize the C and degree?
  • haddockhaddock Member Posts: 849 Maven
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExcelExampleSource" class="ExcelExampleSource" breakpoints="after">
            <parameter key="excel_file" value="C:\Documents and Settings\Alien\My Documents\rm_workspace\examples1.xls"/>
            <parameter key="create_label" value="true"/>
            <parameter key="label_column" value="2"/>
            <parameter key="create_id" value="true"/>
        </operator>
        <operator name="FeatureNameFilter" class="FeatureNameFilter">
            <parameter key="skip_features_with_name" value=".*\(7\)"/>
        </operator>
        <operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="no">
            <parameter key="condition_class" value="attribute_name_filter"/>
            <parameter key="attribute_name_regex" value=".*\(2\)"/>
            <parameter key="process_special_attributes" value="true"/>
            <operator name="Numerical2Binominal" class="Numerical2Binominal">
            </operator>
        </operator>
        <operator name="EvolutionaryParameterOptimization" class="EvolutionaryParameterOptimization" expanded="yes">
            <list key="parameters">
              <parameter key="MyKLRLearner.C" value="[-1.0;1.0]"/>
            </list>
            <operator name="XValidation" class="XValidation" expanded="yes">
                <parameter key="number_of_validations" value="7"/>
                <operator name="MyKLRLearner" class="MyKLRLearner">
                    <parameter key="C" value="0.24676120099825494"/>
                </operator>
                <operator name="OperatorChain" class="OperatorChain" expanded="yes">
                    <operator name="ModelApplier" class="ModelApplier">
                        <list key="application_parameters">
                        </list>
                    </operator>
                    <operator name="ClassificationPerformance" class="ClassificationPerformance">
                        <parameter key="accuracy" value="true"/>
                        <list key="class_weights">
                        </list>
                    </operator>
                </operator>
            </operator>
        </operator>
    </operator>
  • GarettGarett Member Posts: 10 Contributor II
    Thank you Haddock, that gets me started. I was wondering if I can choose C values outside of the 0 to 1 range? I'm trying different things but still getting horrible results. 

    I am trying to model the probability of a player winning in the showdown for a game of online fixed limit holdem.  I have hundreds of thousands of hands with examples we parsed from the hand histories.  If you could help me, I would be more than happy to give you the final poker bot.  The excel file now is for the PREFLOP round, and we're doing 1 round at a time. It takes the gamestate info like #number of players playing, and the holecards (14 for ace 2 for deuce), and then a 0 if the player lost and 1 if the player won. The excel file has many of those examples from many players.

    If anybody wants to work on this with me just contact me, the team of other people I'm working with have made successful bots on the past.  I'm also  Gman on the pokerbotting forums www.maxinmontreal.com.

    Thanks,
    gman

    [attachment deleted by admin]
Sign In or Register to comment.