Initializing Ophelian Session

📦 Importing and Initializing Ophelian

To initialize Ophelian with an embedded Spark session, use:

from ophelian.start import OphelianSession
ophelian = OphelianSession("Spark App Name")
sc = ophelian.Spark.build_spark_context()
  ____          _            _  _               
 / __ \        | |          | |(_)              
| |  | | _ __  | |__    ___ | | _   __ _  _ __  
| |  | || '_ \ | '_ \  / _ \| || | / _` || '_ \ 
| |__| || |_) || | | ||  __/| || || (_| || | | |
 \____/ | .__/ |_| |_| \___||_||_| \__,_||_| |_|
        | |                                     
        |_|                                     
  ____         
 / __ \        
| |  | | _ __  
| |  | || '_ \ 
| |__| || | | |
 \____/ |_| |_|       
               
 __  __                    _ 
|  \/  |                  | |
| \  / |  __ _  _ __  ___ | |
| |\/| | / _` || '__|/ __|| |
| |  | || (_| || |   \__ \|_|
|_|  |_| \__,_||_|   |___/(_)

Main class objects provided by initializing the Ophelian session:

  • read & write
from ophelian.ophelian_spark.read.spark_read import Read
from ophelian.ophelian_spark.write.spark_write import Write
  • generic & functions
from ophelian.ophelian_spark.functions import (
  Shape, Rolling, Reshape, CorrMat, CrossTabular, 
  PctChange, Selects, DynamicSampling
)
from ophelian.ophelian_spark.generic import (
  split_date, row_index, lag_min_max_data, regex_expr, remove_duplicate_element,
  year_array, dates_index, sorted_date_list, feature_pick, binary_search,
  century_from_year, simple_average, delta_series, simple_moving_average, average,
  weight_moving_average, single_exp_smooth, double_exp_smooth, initial_seasonal_components,
  triple_exp_smooth, row_indexing, string_match
)
  • ML package for unsupervised, sampling and feature_miner objects
from ophelian.ophelian_spark.ml.sampling.synthetic_sample import SyntheticSample
from ophelian.ophelian_spark.ml.unsupervised.feature import PCAnalysis, SingularVD
from ophelian.ophelian_spark.ml.feature_miner import (
  BuildStringIndex, BuildOneHotEncoder, 
  BuildVectorAssembler, BuildStandardScaler,
  SparkToNumpy, NumpyToVector
)