JSON-AI Config
- api.high_level.code_from_json_ai(json_ai)[source]
- Autogenerates custom code based on the details you specified inside your JsonAI. - Parameters:
- json_ai ( - JsonAI) – A- JsonAIobject
- Return type:
- str
- Returns:
- Code (text) generate based on the - JsonAIyou created
 
- api.high_level.code_from_problem(df, problem_definition)[source]
- Parameters:
- df ( - DataFrame) – The raw data
- problem_definition ( - Union[- ProblemDefinition,- dict]) – The manual specifications for your predictive problem
 
- Return type:
- str
- Returns:
- The text code generated based on your data and problem specifications 
 
- api.high_level.json_ai_from_problem(df, problem_definition)[source]
- Creates a JsonAI from your raw data and problem definition. Usually you would use this when you want to subsequently edit the JsonAI, the easiest way to do this is to unload it to a dictionary via to_dict, modify it, and then create a new object from it using lightwood.JsonAI.from_dict. It’s usually better to generate the JsonAI using this function rather than writing it from scratch. - Parameters:
- df ( - DataFrame) – The raw data
- problem_definition ( - Union[- ProblemDefinition,- dict]) – The manual specifications for your predictive problem
 
- Return type:
- JsonAI
- Returns:
- A - JsonAIobject generated based on your data and problem specifications
 
- api.high_level.predictor_from_code(code)[source]
- Parameters:
- code ( - str) – The- Predictor’s code in text form
- Return type:
- PredictorInterface
- Returns:
- A lightwood - Predictorobject
 
- api.high_level.predictor_from_json_ai(json_ai)[source]
- Creates a ready-to-train - Predictorobject based on the details you specified inside your JsonAI.- Parameters:
- json_ai ( - JsonAI) – A- JsonAIobject
- Return type:
- PredictorInterface
- Returns:
- A lightwood - Predictorobject
 
- api.high_level.predictor_from_problem(df, problem_definition)[source]
- Creates a ready-to-train - Predictorobject from some raw data and a- ProblemDefinition. Do not use this if you want to edit the JsonAI first. Usually you’d want to next train this predictor by calling the- learnmethod on the same dataframe used to create it.- Parameters:
- df ( - DataFrame) – The raw data
- problem_definition ( - Union[- ProblemDefinition,- dict]) – The manual specifications for your predictive problem
 
- Return type:
- PredictorInterface
- Returns:
- A lightwood - Predictorobject
 
- api.high_level.predictor_from_state(state_file, code=None)[source]
- Parameters:
- state_file ( - str) – The file containing the pickle resulting from calling- saveon a- Predictorobject
- code ( - Optional[- str]) – The- Predictor’s code in text form
 
- Return type:
- PredictorInterface
- Returns:
- A lightwood - Predictorobject