Bayesian Analysis

abby
abby New Altair Community Member
edited November 2024 in Community Q&A
Firstly, I have identified the primary influencing factor A and the secondary influencing factor B. These factors are the influencing factors of customer satisfaction in hotels, for example, A is the room environment, then B is the bed. The influence of these factors on customer satisfaction was investigated through a questionnaire using a three-level Likert scale.

Based on the questionnaire data, I must perform a Bayesian analysis to exclude the less influential factors. How can I do this?
Tagged:

Answers

  • RolandJones
    RolandJones
    Altair Employee
    Hi, out of the box we support Naive Bayes modelling. You could then take this and use, say, an Explain Predictions operator to identify the least impactful parameters and filter these attributes out in the future (using the global weights measure where higher is more impactful). Is this the sort of thing you were looking for? I've added a short example process below.

    <?xml version="1.0" encoding="UTF-8"?><process version="10.2.000">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="10.2.000" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
        <parameter key="logverbosity" value="init"/>
        <parameter key="random_seed" value="2001"/>
        <parameter key="send_mail" value="never"/>
        <parameter key="notification_email" value=""/>
        <parameter key="process_duration_for_mail" value="30"/>
        <parameter key="encoding" value="UTF-8"/>
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="10.2.000" expanded="true" height="68" name="Retrieve Iris" origin="GENERATED_TUTORIAL" width="90" x="112" y="136">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="split_data" compatibility="10.1.003" expanded="true" height="103" name="Split Data" origin="GENERATED_TUTORIAL" width="90" x="246" y="136">
            <enumeration key="partitions">
              <parameter key="ratio" value="0.6"/>
              <parameter key="ratio" value="0.4"/>
            </enumeration>
            <parameter key="sampling_type" value="stratified sampling"/>
            <parameter key="use_local_random_seed" value="false"/>
            <parameter key="local_random_seed" value="1992"/>
          </operator>
          <operator activated="true" class="naive_bayes" compatibility="10.2.000" expanded="true" height="82" name="Naive Bayes" origin="GENERATED_TUTORIAL" width="90" x="380" y="136">
            <parameter key="laplace_correction" value="true"/>
          </operator>
          <operator activated="true" class="apply_model" compatibility="10.2.000" expanded="true" height="82" name="Apply Model" origin="GENERATED_TUTORIAL" width="90" x="514" y="187">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance_classification" compatibility="10.2.000" expanded="true" height="82" name="Performance" origin="GENERATED_TUTORIAL" width="90" x="648" y="187">
            <parameter key="main_criterion" value="first"/>
            <parameter key="accuracy" value="true"/>
            <parameter key="classification_error" value="false"/>
            <parameter key="kappa" value="false"/>
            <parameter key="weighted_mean_recall" value="false"/>
            <parameter key="weighted_mean_precision" value="false"/>
            <parameter key="spearman_rho" value="false"/>
            <parameter key="kendall_tau" value="false"/>
            <parameter key="absolute_error" value="false"/>
            <parameter key="relative_error" value="false"/>
            <parameter key="relative_error_lenient" value="false"/>
            <parameter key="relative_error_strict" value="false"/>
            <parameter key="normalized_absolute_error" value="false"/>
            <parameter key="root_mean_squared_error" value="false"/>
            <parameter key="root_relative_squared_error" value="false"/>
            <parameter key="squared_error" value="false"/>
            <parameter key="correlation" value="false"/>
            <parameter key="squared_correlation" value="false"/>
            <parameter key="cross-entropy" value="false"/>
            <parameter key="margin" value="false"/>
            <parameter key="soft_margin_loss" value="false"/>
            <parameter key="logistic_loss" value="false"/>
            <parameter key="skip_undefined_labels" value="true"/>
            <parameter key="use_example_weights" value="true"/>
            <list key="class_weights"/>
          </operator>
          <operator activated="true" class="model_simulator:explain_predictions" compatibility="10.2.000" expanded="true" height="124" name="Explain Predictions" width="90" x="581" y="340">
            <parameter key="maximal explaining attributes" value="3"/>
            <parameter key="apply maximum to importances output" value="false"/>
            <parameter key="local sample size" value="500"/>
            <parameter key="only create predictions" value="false"/>
            <parameter key="normalize global weights" value="false"/>
            <parameter key="sort_weights" value="true"/>
            <parameter key="sort_direction" value="descending"/>
          </operator>
          <connect from_op="Retrieve Iris" from_port="output" to_op="Split Data" to_port="example set"/>
          <connect from_op="Split Data" from_port="partition 1" to_op="Naive Bayes" to_port="training set"/>
          <connect from_op="Split Data" from_port="partition 2" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Naive Bayes" from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_op="Naive Bayes" from_port="exampleSet" to_op="Explain Predictions" to_port="training data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Apply Model" from_port="model" to_op="Explain Predictions" to_port="model"/>
          <connect from_op="Performance" from_port="performance" to_port="result 1"/>
          <connect from_op="Performance" from_port="example set" to_op="Explain Predictions" to_port="test data"/>
          <connect from_op="Explain Predictions" from_port="global weights output" to_port="result 2"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
        </process>
      </operator>
    </process>