Query in using Palettes

Abhijith Moni
Abhijith Moni Altair Community Member
edited August 2022 in Community Q&A

Hello, I am using Altair Activate to simulate a reduced order task. My model is a linear model and after training the model, I have two input variables (two columns) based on which the result is predicted (ideally the output will be one column of data). I am using the FromCSV palette as input and the ToCSV palette as output. But these two are time-dependent whereas my model is a linear model. The output I am getting is a single value instead of a column of data. Please help me with the input and output palette options where I think I am making a mistake. I have attached an image for your reference. Thanks in advance.

Answers

  • João Marabisa
    João Marabisa
    Altair Employee
    edited August 2022

    Hi Abhijith,

    In that case, you can use both 'csvread' and 'csvwrite' functions on OML Initialization and Finalization sections, respectively:

    image

    I attached the model that should work for your purposes. Please, don't forget to change to your own directory path.

    Hope it helps you,

    João.

  • Abhijith Moni
    Abhijith Moni Altair Community Member
    edited August 2022

    Hi João Marabisa, 

    Thanks for your quick reply and help. I tried the workflow as suggested where the inputs work fine but the output still prints out only one data where I'm expecting a column of data. Please advise on the same. I have attached an image for your reference.

     

    I have also attached an instance evaluation graph from romAI, where the pressure_coefficient (output) has multiple data after training as expected. I'm looking to recreate the same with different inputs. 

    The error I get is: Error: Incompatible port sizes in function setio at line number 175 in file MatrixConcatenation.oml

     

    I really appreciate your time and help. 

     

    Thanks. 

    Abhijith

  • João Marabisa
    João Marabisa
    Altair Employee
    edited August 2022

    Hi João Marabisa, 

    Thanks for your quick reply and help. I tried the workflow as suggested where the inputs work fine but the output still prints out only one data where I'm expecting a column of data. Please advise on the same. I have attached an image for your reference.

     

    I have also attached an instance evaluation graph from romAI, where the pressure_coefficient (output) has multiple data after training as expected. I'm looking to recreate the same with different inputs. 

    The error I get is: Error: Incompatible port sizes in function setio at line number 175 in file MatrixConcatenation.oml

     

    I really appreciate your time and help. 

     

    Thanks. 

    Abhijith

    Hi Abhijith,

    I think your "Display" block is working as expected. You have a single variable (Pressure_Coefficient2) that is varying, so it is expected to see just one value on Display block.

    Please try to use the "ToCSV" block, you should see a complete column of all the values that were calculated through "n-Xaxis":

    image

    Hope it helps you,

    João.